home *** CD-ROM | disk | FTP | other *** search
- class com.KidFighting.EffectSys extends MovieClip
- {
- static var _es;
- static var addEventListener;
- static var dispatchEvent;
- static var removeEventListener;
- static var _evt = mx.events.EventDispatcher.initialize(com.KidFighting.EffectSys);
- function EffectSys()
- {
- super();
- com.KidFighting.EffectSys._es = this;
- com.KidFighting.effects.EffHurt;
- com.KidFighting.effects.EffBlock;
- com.KidFighting.effects.EffSlice;
- com.KidFighting.effects.EffYell;
- com.KidFighting.effects.EffWave;
- com.KidFighting.effects.EffAxe;
- com.KidFighting.effects.EffDynamite;
- com.KidFighting.effects.EffExplosion;
- com.KidFighting.effects.EffScissors;
- com.KidFighting.effects.EffBottle;
- com.KidFighting.effects.EffKnife;
- com.KidFighting.effects.EffBlade;
- com.KidFighting.effects.EffBuddhistPalm;
- com.KidFighting.effects.EffIcecream;
- com.KidFighting.effects.EffIcecreamSplash;
- com.KidFighting.effects.EffBottleSplash;
- }
- static function generate(clsName, twn, ch, x, y)
- {
- var _loc1_ = undefined;
- var _loc3_ = undefined;
- if(clsName == undefined)
- {
- clsName = "Hurt";
- }
- if(typeof clsName == "string")
- {
- _loc3_ = com.KidFighting.EffectSys._es.attachMovie("eff" + clsName + "_mc","eff" + com.KidFighting.EffectSys._es.getNextHighestDepth(),com.KidFighting.EffectSys._es.getNextHighestDepth());
- }
- _loc1_ = new com.KidFighting.effects["Eff" + clsName](_loc3_,twn,ch,x,y);
- if(_loc1_ == null)
- {
- _loc3_.removeMovieClip();
- }
- else
- {
- com.KidFighting.EffectSys.registerEffect(_loc1_);
- }
- return _loc1_;
- }
- static function registerEffect(eff)
- {
- com.KidFighting.EffectSys.addEventListener("onPauseGame",eff);
- com.KidFighting.EffectSys.addEventListener("onResumeGame",eff);
- eff.addEffectListener(com.KidFighting.EffectSys);
- }
- static function pauseGame(evtObj)
- {
- if(evtObj.value)
- {
- com.KidFighting.EffectSys.dispatchEvent({type:"onPauseGame"});
- }
- else
- {
- com.KidFighting.EffectSys.dispatchEvent({type:"onResumeGame"});
- }
- }
- static function onMotionStopped(twn)
- {
- twn.owner.removeEffectListener(com.KidFighting.EffectSys);
- com.KidFighting.EffectSys.removeEventListener("onPauseGame",twn.owner);
- com.KidFighting.EffectSys.removeEventListener("onResumeGame",twn.owner);
- }
- static function getOpponentFlyEffItem(aEffMc)
- {
- for(var _loc2_ in com.KidFighting.EffectSys._es)
- {
- if(com.KidFighting.EffectSys._es[_loc2_].type == "flyItem" && com.KidFighting.EffectSys._es[_loc2_] != aEffMc)
- {
- return com.KidFighting.EffectSys._es[_loc2_];
- }
- }
- return null;
- }
- }
-