home *** CD-ROM | disk | FTP | other *** search
- // %PARAMETERS = "CH20LIST C:\UT2004"
- //Identifies the package
- //SoundProp.uc
- //The test driver is CH20_07LIST
- //It extends the prop Class
- //#1
- class SoundProp extends Prop;
-
- //#2 Class attributes
-
- var private int iPlayPosition;
-
-
- //#3
- //-----------------------setSoundFileName---------------
- public function setSoundFileName(string des){
- szName = des;
-
- }
- //--------------------------init-----------------------
- public function string getSoundFileName(){
- return szName;
- }
-
- //#4
- //-----------------------getPPos---------------------
- public function int getPPos(){
- return iPlayPosition;
- }
-
- //------------------------setPPos---------------------
- public function setPPos(int pos){
- iPlayPosition = pos;
- }
-
- //#5
- //------------------------setAction--------------------
- public function setAction(string des){
-
- if(des == "Play"){
- szAction = "Playing";
- }
-
- else if(des == "Pause"){
- szAction = "Paused";
- }
- else{
- Log("Set sound to play or pause.");
- }
- }
-
- //------------------------getAction--------------------
- public function string getAction(){
- return szAction;
- }
- //#6
- //---------------------setPrimaryX------------------
- public function setPrimaryX(int xValue){
-
- local Vector locVec;
- locVec.x = xValue;
- Super.setPos(locVec);
- }
-
- //---------------------getPrimaryX-------------------
- public function float getPrimaryX(){
- local Vector locVec;
- locVec = Super.getPos();
- return locVec.x;
- }
-
-
-
-
-