home *** CD-ROM | disk | FTP | other *** search
Wrap
package classes.game { import classes.basic.Button.*; import classes.basic.Events.TFEvent; import classes.basic.MovieClip.TFMovieClip; import classes.basic.Sound.TFSound; import classes.global.*; import flash.display.MovieClip; public class ManagerGamePlay { private var chairsContainers:Array; private var stationsContainer:Array; private var lastTime:Number; private var started:Boolean; private var isShowScore:Boolean; private var countCustomer:Number; private var supplyClean:MainCharActionButton; private var mainChar:MainChar; private var garbagecanClean:MainCharActionButton; private var numberCustomer:Number; private var dialog:MovieClip; private var timeCustomer:Number; private var time:Number; private var garbagecanCream:MainCharActionButton; private var garbagecanTowel:MainCharActionButton; private var maxCustomers:Number; private var supplyCream:MainCharActionButton; private var supplyTowel:MainCharActionButton; private var customers:Array; public function ManagerGamePlay(param1:Number, param2:Number, param3:Number) { var _loc4_:MovieClip = null; var _loc5_:CustomerContainer = null; var _loc6_:Number = NaN; super(); this.numberCustomer = param3; this.countCustomer = 0; time = 0; this.customers = new Array(); this.maxCustomers = param1; this.timeCustomer = param2; this.lastTime = this.timeCustomer - 1000; this.chairsContainers = new Array(); this.mainChar = new MainChar(onFinishWalking); this.started = false; isShowScore = false; _loc6_ = 0; while(_loc6_ < 6) { switch(_loc6_) { case 0: _loc4_ = Global.main.mcChair1; break; case 1: _loc4_ = Global.main.mcChair2; break; case 2: _loc4_ = Global.main.mcChair3; break; case 3: _loc4_ = Global.main.mcChair4; break; case 4: _loc4_ = Global.main.mcChair5; break; case 5: _loc4_ = Global.main.mcChair6; break; } _loc5_ = new WaitingCustomerContainer(_loc4_); this.chairsContainers.push(_loc5_); _loc6_++; } this.stationsContainer = new Array(); createStation(); supplyClean = new MainCharActionButton(Global.main.mcSupplyClean,onEventSupplyClean); supplyTowel = new MainCharActionButton(Global.main.mcSupplyTowel,onEventSupplyTowel); supplyCream = new MainCharActionButton(Global.main.mcSupplyCream,onEventSupplyCream); garbagecanClean = new MainCharActionButton(Global.main.mcGarbagecanClean,onEventGarbagecanClean); garbagecanTowel = new MainCharActionButton(Global.main.mcGarbagecanTowel,onEventGarbagecanTowel); garbagecanCream = new MainCharActionButton(Global.main.mcGarbagecanCream,onEventGarbagecanCream); Global.main.mcTextGoal.text = Global.xmlLocalization.game.goal; Global.main.mcGoal.text = Global.xmlLocalization.symbol_cash + String(Levels.stages.stage[Levels.indexStage].levels.level[Levels.indexLevel].goal); Global.cash = 0; Global.main.mcTextCash.text = Global.xmlLocalization.game.cash; Global.main.mcCash.text = Global.xmlLocalization.symbol_cash + String(Global.cash); Global.main.mcLeft.text = String(this.numberCustomer - this.countCustomer); switch(Levels.indexStage) { case 0: Global.soundTrackStage1.play(); break; case 1: Global.soundTrackStage2.play(); break; case 2: Global.soundTrackStage3.play(); break; case 3: Global.soundTrackStage4.play(); } } private function onEventGarbagecanClean(param1:TFEvent) : * { switch(param1.event) { case TFEvent.EVENT_MOUSEUP: if(Global.mouse.getLastLocal() != null) { Global.mouse.getLastLocal().addCustomer(Global.mouse.removeCustomer()); } break; case TFEvent.EVENT_MOUSECLICK: mainChar.gotoGarbagecanClean(); garbagecanClean.setQueue(mainChar.getIndexQueue()); Global.soundsFX["move_mainchar"].play(); } } private function showScore() : * { var _loc1_:Class = null; mainChar.removeAllItem(); isShowScore = true; Global.main.mcBathtub1.gotoAndStop("empty"); Global.main.mcBathtub2.gotoAndStop("empty"); Global.main.mcBathtub3.gotoAndStop("empty"); Global.main.mcBathtub4.gotoAndStop("empty"); Global.main.mcRoom1.gotoAndStop("empty"); Global.main.mcRoom2.gotoAndStop("empty"); Global.main.mcRoom3.gotoAndStop("empty"); _loc1_ = Global.main.getAsset("scoreScreen"); dialog = new _loc1_(); TFMovieClip.addLabelScript(dialog,"loadScore",onLoadScore); Global.main.mcDialogDummy.enabled = true; Global.main.mcDialogDummy.mouseEnabled = true; Global.main.mcDialogDummy.addChild(dialog); dialog.x = 300; dialog.y = 225; if(Global.cash >= Levels.stages.stage[Levels.indexStage].levels.level[Levels.indexLevel].goal) { dialog.mcBgCompleted.visible = true; dialog.mcBgFail.visible = false; dialog.mcTitle.mcText.text = Global.xmlLocalization.scorescreen.title; dialog.mcTitleBlink.mcText.text = Global.xmlLocalization.scorescreen.title; } else { dialog.mcBgCompleted.visible = false; dialog.mcBgFail.visible = true; dialog.mcTitle.mcText.text = Global.xmlLocalization.scorescreen.fail; dialog.mcTitleBlink.mcText.text = Global.xmlLocalization.scorescreen.fail; } dialog.play(); TFMovieClip.addLabelScript(dialog,"levelText",onShowLevelText); TFMovieClip.addLabelScript(dialog,"levelValue",onShowLevelValue); TFMovieClip.addLabelScript(dialog,"totalText",onShowTotalText); TFMovieClip.addLabelScript(dialog,"totalValue",onShowTotalValue); if(Global.cash >= Levels.stages.stage[Levels.indexStage].levels.level[Levels.indexLevel].goal) { Global.soundLevelCompleted.play(); } else { Global.soundLevelFail.play(); } switch(Levels.indexStage) { case 0: Global.soundTrackStage1.stop(); break; case 1: Global.soundTrackStage2.stop(); break; case 2: Global.soundTrackStage3.stop(); break; case 3: Global.soundTrackStage4.stop(); } } private function createStation() : * { var _loc1_:XMLList = null; var _loc2_:StationCustomerContainer = null; var _loc3_:* = undefined; Global.main.mcTreatment1.visible = false; Global.main.mcTreatment2.visible = false; Global.main.mcTreatment3.visible = false; Global.main.mcTreatment4.visible = false; Global.main.mcBathtub1.visible = false; Global.main.mcBathtub2.visible = false; Global.main.mcBathtub3.visible = false; Global.main.mcBathtub4.visible = false; Global.main.mcRoom1.visible = false; Global.main.mcRoom2.visible = false; Global.main.mcRoom3.visible = false; _loc1_ = Levels.stages.stage[Levels.indexStage].levels.level[Levels.indexLevel].stations.name; for each(_loc3_ in _loc1_) { switch(_loc3_.toString()) { case Desires.MASSAGE: _loc2_ = new TreatmentStation(Global.main.mcTreatment1,Desires.MASSAGE); break; case Desires.SOLARIUM: _loc2_ = new TreatmentStation(Global.main.mcTreatment2,Desires.SOLARIUM); break; case Desires.ACUPUNCTURE: _loc2_ = new TreatmentStation(Global.main.mcTreatment3,Desires.ACUPUNCTURE); break; case Desires.EXFOLIATING: _loc2_ = new TreatmentStation(Global.main.mcTreatment4,Desires.EXFOLIATING); break; case Desires.HYDRO: _loc2_ = new BathStation(Global.main.mcBathtub1,Desires.HYDRO); break; case Desires.ICE: _loc2_ = new BathStation(Global.main.mcBathtub2,Desires.ICE); break; case Desires.HERB: _loc2_ = new BathStation(Global.main.mcBathtub3,Desires.HERB); break; case Desires.OFURO: _loc2_ = new BathStation(Global.main.mcBathtub4,Desires.OFURO); break; case Desires.SAUNA: _loc2_ = new RoomStation(Global.main.mcRoom1,Desires.SAUNA); break; case Desires.SWIMMING: _loc2_ = new RoomStation(Global.main.mcRoom2,Desires.SWIMMING); break; case Desires.YOGA: _loc2_ = new RoomStation(Global.main.mcRoom3,Desires.YOGA); } if(_loc2_ != null) { _loc2_.addListener(StationCustomerContainer.EVENT_REQUEST_MAINCHAR,onRequestMainChar); this.stationsContainer.push(_loc2_); } } } private function addCustomer() : * { var _loc1_:Number = NaN; var _loc2_:Number = NaN; var _loc3_:Number = NaN; var _loc4_:Number = NaN; var _loc5_:Number = NaN; var _loc6_:Customer = null; if(this.customers.length >= this.maxCustomers || this.countCustomer >= this.numberCustomer) { return; } _loc1_ = 0; while(_loc1_ < chairsContainers.length) { if(chairsContainers[_loc1_].isEmpty() && chairsContainers[_loc1_] != Global.mouse.getLastLocal() && this.countCustomer < this.numberCustomer) { _loc2_ = Math.random(); _loc3_ = Math.round((Customers.xml.customer.length() - 1) * _loc2_); _loc4_ = (_loc4_ = Math.round(Math.random() * (Levels.stages.stage[Levels.indexStage].levels.level[Levels.indexLevel].maxDesiresCustomer - Levels.stages.stage[Levels.indexStage].levels.level[Levels.indexLevel].minDesiresCustomer))) + Number(Levels.stages.stage[Levels.indexStage].levels.level[Levels.indexLevel].minDesiresCustomer); _loc5_ = Number(Levels.stages.stage[Levels.indexStage].levels.level[Levels.indexLevel].stressMeterInitial) + Number(Customers.xml.customer[_loc3_].stress); if(Customers.xml.customer[_loc3_].symbol.toString() != "customer8") { _loc6_ = new Customer(Customers.xml.customer[_loc3_].name,Customers.xml.customer[_loc3_].symbol,onCustomerIdle,onCustomerError,_loc4_,_loc5_,Customers.xml.customer[_loc3_].increaseRate,Customers.xml.customer[_loc3_].delay); } else { _loc6_ = new CCGCustomer(Customers.xml.customer[_loc3_].name,Customers.xml.customer[_loc3_].symbol,onCustomerIdle,onCustomerError,_loc4_,_loc5_,Customers.xml.customer[_loc3_].increaseRate,Customers.xml.customer[_loc3_].delay); } _loc6_.onIdle(); customers.push(_loc6_); ++this.countCustomer; chairsContainers[_loc1_].addCustomer(_loc6_); break; } _loc1_++; } } private function onCustomerError(param1:Customer) : * { mainChar.action("error"); } private function onLoadScore() : * { dialog.stop(); TFMovieClip.addLabelScript(dialog,"loadScore",null); dialog.ok = new TFTextButton(dialog.btnOk,Global.xmlLocalization.scorescreen.ok,onEventScoreScreenOK); dialog.ok.setFxOver(Global.soundsFX["mouse_over"]); dialog.ok.setFxClick(Global.soundsFX["mouse_click"]); } private function onEventSupplyClean(param1:TFEvent) : * { switch(param1.event) { case TFEvent.EVENT_MOUSEUP: if(Global.mouse.getLastLocal() != null) { Global.mouse.getLastLocal().addCustomer(Global.mouse.removeCustomer()); } break; case TFEvent.EVENT_MOUSECLICK: if(mainChar.checkQueue(Desires.CLEAN) < 2) { mainChar.gotoClean(); supplyClean.setQueue(mainChar.getIndexQueue()); Global.soundsFX["move_mainchar"].play(); } } } private function onShowLevelText() : * { TFMovieClip.addLabelScript(dialog,"levelText",null); dialog.mcTextLevel.text = Global.xmlLocalization.scorescreen.levelscore; } private function onShowTotalValue() : * { TFMovieClip.addLabelScript(dialog,"totalValue",null); dialog.mcTotal.text = Global.score; } private function onEventScoreScreenOK(param1:TFEvent) : * { switch(param1.event) { case TFEvent.EVENT_MOUSECLICK: Global.main.mcDialogDummy.enabled = false; Global.main.mcDialogDummy.mouseEnabled = false; Global.main.mcDialogDummy.removeChild(dialog); dialog = null; Global.manager.nextLevel(); } } public function getTime() : Number { return time; } private function onEventGarbagecanCream(param1:TFEvent) : * { switch(param1.event) { case TFEvent.EVENT_MOUSEUP: if(Global.mouse.getLastLocal() != null) { Global.mouse.getLastLocal().addCustomer(Global.mouse.removeCustomer()); } break; case TFEvent.EVENT_MOUSECLICK: mainChar.gotoGarbagecanCream(); garbagecanCream.setQueue(mainChar.getIndexQueue()); Global.soundsFX["move_mainchar"].play(); } } private function onFinishWalking(param1:String) : * { var _loc2_:Number = NaN; var _loc3_:Number = NaN; var _loc4_:Number = NaN; var _loc5_:Number = NaN; var _loc6_:Number = NaN; var _loc7_:Number = NaN; var _loc8_:Number = NaN; var _loc9_:Number = NaN; var _loc10_:Number = NaN; var _loc11_:Number = NaN; switch(param1) { case Desires.CREAM: mainChar.addItem(param1); supplyCream.setQueue(0); break; case Desires.CLEAN: mainChar.addItem(param1); supplyClean.setQueue(0); break; case Desires.TOWEL: mainChar.addItem(param1); supplyTowel.setQueue(0); break; case Desires.EXFOLIATING: case Desires.ACUPUNCTURE: _loc2_ = 0; while(_loc2_ < stationsContainer.length) { if(stationsContainer[_loc2_].getType() == param1) { stationsContainer[_loc2_].setQueue(0); if(stationsContainer[_loc2_].isCash()) { _loc3_ = Number(stationsContainer[_loc2_].getCash()); mainChar.addCash(_loc3_); return; } if(!stationsContainer[_loc2_].isEmpty() && stationsContainer[_loc2_].isWaiting() && mainChar.isItem(Desires.CREAM)) { stationsContainer[_loc2_].start(); mainChar.removeItem(Desires.CREAM); Global.soundsFX["treatment"].play(); mainChar.action("west"); } break; } _loc2_++; } break; case Desires.MASSAGE: case Desires.SOLARIUM: _loc4_ = 0; while(_loc4_ < stationsContainer.length) { if(stationsContainer[_loc4_].getType() == param1) { stationsContainer[_loc4_].setQueue(0); if(stationsContainer[_loc4_].isCash()) { _loc5_ = Number(stationsContainer[_loc4_].getCash()); mainChar.addCash(_loc5_); return; } if(!stationsContainer[_loc4_].isEmpty() && stationsContainer[_loc4_].isWaiting() && mainChar.isItem(Desires.CREAM)) { stationsContainer[_loc4_].start(); mainChar.removeItem(Desires.CREAM); Global.soundsFX["treatment"].play(); mainChar.action("east"); } break; } _loc4_++; } break; case Desires.HERB: case Desires.OFURO: _loc6_ = 0; while(_loc6_ < stationsContainer.length) { if(stationsContainer[_loc6_].getType() == param1) { stationsContainer[_loc6_].setQueue(0); if(stationsContainer[_loc6_].isCash()) { _loc7_ = Number(stationsContainer[_loc6_].getCash()); mainChar.addCash(_loc7_); return; } if(Boolean(stationsContainer[_loc6_].isDirty()) && mainChar.isItem(Desires.CLEAN)) { stationsContainer[_loc6_].clean(); mainChar.removeItem(Desires.CLEAN); mainChar.action("east"); } break; } _loc6_++; } break; case Desires.HYDRO: case Desires.ICE: _loc8_ = 0; while(_loc8_ < stationsContainer.length) { if(stationsContainer[_loc8_].getType() == param1) { stationsContainer[_loc8_].setQueue(0); if(stationsContainer[_loc8_].isCash()) { _loc9_ = Number(stationsContainer[_loc8_].getCash()); mainChar.addCash(_loc9_); return; } if(Boolean(stationsContainer[_loc8_].isDirty()) && mainChar.isItem(Desires.CLEAN)) { stationsContainer[_loc8_].clean(); mainChar.removeItem(Desires.CLEAN); mainChar.action("west"); } break; } _loc8_++; } break; case Desires.YOGA: case Desires.SWIMMING: case Desires.SAUNA: _loc10_ = 0; while(_loc10_ < stationsContainer.length) { if(stationsContainer[_loc10_].getType() == param1) { stationsContainer[_loc10_].setQueue(0); if(stationsContainer[_loc10_].isCash()) { _loc11_ = Number(stationsContainer[_loc10_].getCash()); mainChar.addCash(_loc11_); return; } if(Boolean(stationsContainer[_loc10_].isDirty()) && mainChar.isItem(Desires.TOWEL)) { stationsContainer[_loc10_].clean(); mainChar.removeItem(Desires.TOWEL); } break; } _loc10_++; } break; case "GARBAGECAN_TOWEL": if(mainChar.isItem(Desires.TOWEL)) { mainChar.removeItem(Desires.TOWEL); } garbagecanTowel.setQueue(0); break; case "GARBAGECAN_CLEAN": if(mainChar.isItem(Desires.CLEAN)) { mainChar.removeItem(Desires.CLEAN); } garbagecanClean.setQueue(0); break; case "GARBAGECAN_CREAN": if(mainChar.isItem(Desires.CREAM)) { mainChar.removeItem(Desires.CREAM); } garbagecanCream.setQueue(0); } updateQueue(); } private function updateQueue() : * { var _loc1_:Number = NaN; var _loc2_:Number = NaN; _loc1_ = 0; while(_loc1_ < mainChar.getQueueSize()) { switch(mainChar.getQueueType(_loc1_)) { case Desires.CREAM: supplyCream.setQueue(_loc1_ + 1); break; case Desires.CLEAN: supplyClean.setQueue(_loc1_ + 1); break; case Desires.TOWEL: supplyTowel.setQueue(_loc1_ + 1); break; case Desires.EXFOLIATING: case Desires.ACUPUNCTURE: case Desires.MASSAGE: case Desires.SOLARIUM: case Desires.HERB: case Desires.OFURO: case Desires.HYDRO: case Desires.ICE: case Desires.YOGA: case Desires.SWIMMING: case Desires.SAUNA: _loc2_ = 0; while(_loc2_ < stationsContainer.length) { if(stationsContainer[_loc2_].getType() == mainChar.getQueueType(_loc1_)) { stationsContainer[_loc2_].setQueue(_loc1_ + 1); } _loc2_++; } break; case "GARBAGECAN_TOWEL": garbagecanTowel.setQueue(_loc1_ + 1); break; case "GARBAGECAN_CLEAN": garbagecanClean.setQueue(_loc1_ + 1); break; case "GARBAGECAN_CREAN": garbagecanCream.setQueue(_loc1_ + 1); break; } _loc1_++; } } private function onCustomerIdle(param1:Customer) : * { var _loc2_:Number = NaN; var _loc3_:Number = NaN; var _loc4_:Boolean = false; var _loc5_:Number = NaN; var _loc6_:Number = NaN; if(param1.isNextDesire()) { _loc2_ = int(stationsContainer.length * Math.random()); _loc3_ = _loc2_; _loc4_ = false; while(_loc4_ == false) { if(!param1.checkUseDesire(stationsContainer[_loc3_].getType())) { _loc5_ = 0; _loc6_ = 0; while(_loc6_ < customers.length) { if(customers[_loc6_].getDesire() == this.stationsContainer[_loc3_].getType()) { _loc5_++; } _loc6_++; } if(_loc5_ < 2) { param1.setDesire(this.stationsContainer[_loc3_].getType()); return; } } _loc3_++; if(_loc3_ >= stationsContainer.length) { _loc3_ = 0; } if(_loc3_ == _loc2_) { param1.setDesire(Desires.CASH); _loc4_ = true; } } } else { param1.setDesire(Desires.CASH); } } private function onEventSupplyTowel(param1:TFEvent) : * { switch(param1.event) { case TFEvent.EVENT_MOUSEUP: if(Global.mouse.getLastLocal() != null) { Global.mouse.getLastLocal().addCustomer(Global.mouse.removeCustomer()); } break; case TFEvent.EVENT_MOUSECLICK: if(mainChar.checkQueue(Desires.TOWEL) < 2) { mainChar.gotoTowel(); supplyTowel.setQueue(mainChar.getIndexQueue()); Global.soundsFX["move_mainchar"].play(); } } } private function onEventGarbagecanTowel(param1:TFEvent) : * { switch(param1.event) { case TFEvent.EVENT_MOUSEUP: if(Global.mouse.getLastLocal() != null) { Global.mouse.getLastLocal().addCustomer(Global.mouse.removeCustomer()); } break; case TFEvent.EVENT_MOUSECLICK: mainChar.gotoGarbagecanTowel(); garbagecanTowel.setQueue(mainChar.getIndexQueue()); Global.soundsFX["move_mainchar"].play(); } } private function onEventSupplyCream(param1:TFEvent) : * { switch(param1.event) { case TFEvent.EVENT_MOUSEUP: if(Global.mouse.getLastLocal() != null) { Global.mouse.getLastLocal().addCustomer(Global.mouse.removeCustomer()); } break; case TFEvent.EVENT_MOUSECLICK: if(mainChar.checkQueue(Desires.CREAM) < 2) { mainChar.gotoCream(); supplyCream.setQueue(mainChar.getIndexQueue()); Global.soundsFX["move_mainchar"].play(); } } } public function start() : * { this.started = true; } private function onShowLevelValue() : * { var _loc1_:Number = NaN; var _loc2_:Number = NaN; TFMovieClip.addLabelScript(dialog,"levelValue",null); _loc1_ = 300 - int(time / 1000); if(_loc1_ < 0) { _loc1_ = 0; } if(Global.cash == 0) { _loc1_ = 0; } _loc2_ = 0; if(Global.cash >= Levels.stages.stage[Levels.indexStage].levels.level[Levels.indexLevel].goal) { _loc2_ = Global.cash * 10 + _loc1_ * 10; } Global.score += _loc2_; dialog.mcLevel.text = _loc2_; } public function process(param1:Object) : * { var _loc2_:Array = null; var _loc3_:Number = NaN; var _loc4_:Number = NaN; if(!this.started) { return; } _loc2_ = new Array(); _loc3_ = this.customers.length - 1; while(_loc3_ >= 0) { if(this.customers[_loc3_].isDisable()) { this.customers.splice(_loc3_,1); } else { this.customers[_loc3_].process(param1); } _loc3_--; } Global.main.mcLeft.text = String(this.numberCustomer - this.countCustomer); if(this.countCustomer >= this.numberCustomer && this.customers.length == 0 && !isShowScore) { showScore(); return; } time += param1.time; this.lastTime += param1.time; if(lastTime > this.timeCustomer) { this.lastTime = 0; addCustomer(); } _loc4_ = 0; while(_loc4_ < this.stationsContainer.length) { this.stationsContainer[_loc4_].process(param1); _loc4_++; } mainChar.processWalking(param1); } private function onShowTotalText() : * { TFMovieClip.addLabelScript(dialog,"totalText",null); dialog.mcTextTotal.text = Global.xmlLocalization.scorescreen.totalscore; } public function pause() : * { var _loc1_:Number = NaN; var _loc2_:TFSound = null; var _loc3_:Number = NaN; this.started = !this.started; if(this.started) { switch(Levels.indexStage) { case 0: Global.soundTrackStage1.play(); break; case 1: Global.soundTrackStage2.play(); break; case 2: Global.soundTrackStage3.play(); break; case 3: Global.soundTrackStage4.play(); } _loc1_ = 0; while(_loc1_ < stationsContainer.length) { stationsContainer[_loc1_].playAnima(); _loc1_++; } } else { Global.soundTrackStage1.stop(); Global.soundTrackStage2.stop(); Global.soundTrackStage3.stop(); Global.soundTrackStage4.stop(); for each(_loc2_ in Global.soundsFX) { _loc2_.stop(); } _loc3_ = 0; while(_loc3_ < stationsContainer.length) { stationsContainer[_loc3_].stopAnima(); _loc3_++; } } } private function onRequestMainChar(param1:String, param2:StationCustomerContainer) : * { if(mainChar.checkQueue(param2.getType()) == 0) { switch(param2.getType()) { case Desires.ACUPUNCTURE: mainChar.gotoAcupuncture(); break; case Desires.EXFOLIATING: mainChar.gotoExfoliating(); break; case Desires.MASSAGE: mainChar.gotoMassage(); break; case Desires.SOLARIUM: mainChar.gotoSolarium(); break; case Desires.YOGA: mainChar.gotoYoga(); break; case Desires.SAUNA: mainChar.gotoSauna(); break; case Desires.SWIMMING: mainChar.gotoSwimming(); break; case Desires.HYDRO: mainChar.gotoHydro(); break; case Desires.HERB: mainChar.gotoHerb(); break; case Desires.OFURO: mainChar.gotoOfuro(); break; case Desires.ICE: mainChar.gotoIce(); } Global.soundsFX["move_mainchar"].play(); param2.setQueue(mainChar.getIndexQueue()); } } } }