home *** CD-ROM | disk | FTP | other *** search
- class com.KidFighting.skills.SklScissors extends com.KidFighting.objects.CSkill
- {
- var name;
- var keys;
- var effStartFrame;
- var hurtValue;
- var type;
- var effect;
- var performing;
- var owner;
- function SklScissors()
- {
- super();
- this.name = "Scissors";
- this.keys = com.KidFighting.Input.DOWN + "," + com.KidFighting.Input.RIGHT + "," + com.KidFighting.Input.A;
- this.effStartFrame = 4;
- this.hurtValue = 10;
- this.type = "flyItem";
- }
- function condition()
- {
- return !this.effect.performing && super.condition();
- }
- function perform()
- {
- this.performing = true;
- this.effect = com.KidFighting.EffectSys.generate(this.name,this.owner._twnF,this.owner,this.owner.ani._x + this.owner.side * 5,this.owner.orgY - 35);
- this.effect.effStartFrame = this.effStartFrame;
- this.effect.hurtValue = this.hurtValue;
- this.effect.looping = true;
- this.effect.movingSpeed = this.owner.side * this.effect.movingSpeed;
- this.effect.addEffectListener(this);
- ds.controls.SoundPlayer.playSound("barber_special1");
- }
- function onMotionStopped()
- {
- this.effect.removeEffectListener(this);
- this.performing = false;
- this.owner.setSkillMotionFinished(this);
- }
- }
-