home *** CD-ROM | disk | FTP | other *** search
- class com.KidFighting.effects.EffBlade extends com.KidFighting.objects.CEffect
- {
- var type;
- var ani;
- var owner;
- var hurtValue;
- var movingSpeed = 15;
- function EffBlade($ani, twn, ch, x, y)
- {
- super();
- $ani._xscale *= ch.side;
- this.type = "flyItem";
- this.init($ani,twn,ch,x,y);
- }
- function onEffectMotionUpdated()
- {
- this.ani._x += this.movingSpeed;
- var _loc2_ = com.KidFighting.EffectSys.getOpponentFlyEffItem(this.ani);
- if(_loc2_ && this.ani.hitTest(_loc2_))
- {
- com.KidFighting.EffectSys.generate("Hurt",null,this.owner,this.ani._x,this.ani._y);
- _loc2_.owner.stop();
- this.stop();
- return undefined;
- }
- if(this.ani._x < -50 || this.ani._x > Stage.width + 50)
- {
- this.stop();
- }
- if(this.owner.hitTest(this.ani,null,this.hurtValue))
- {
- this.stop();
- }
- }
- }
-