示例#1
0
 public override void Action(CharacterBase character, SceneBattle battle)
 {
     if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
     {
         return;
     }
     if (character.waittime == 0)
     {
         character.animationpoint.X = -1;
         this.sound.PlaySE(SoundEffect.warp);
     }
     if (character.waittime == this.shot * 15 + 20 && this.shot < 6)
     {
         this.sound.PlaySE(SoundEffect.chain);
         for (int index = 0; index < 3; ++index)
         {
             int num1  = character.union == Panel.COLOR.red ? this.shot : 5 - this.shot;
             int num2  = index;
             var point = new Point(num1, num2);
             if (character.NoObject(point) && character.InAreaCheck(point))
             {
                 AttackBase a = new ThrowKnife(this.sound, battle, num1, num2, character.union, 10, this.Power(character), 30, 30, 3);
                 a.invincibility = false;
                 battle.attacks.Add(this.Paralyze(a));
             }
         }
         ++this.shot;
     }
     if (this.shot >= 6 && character.waittime >= 170)
     {
         if (!this.end)
         {
             this.animePoint.X = -1;
             battle.effects.Add(new MoveEnemy(this.sound, battle, character.position.X, character.position.Y));
             this.end = true;
         }
         if (this.BlackOutEnd(character, battle))
         {
             base.Action(character, battle);
         }
     }
     else
     {
         this.animePoint = this.Animation(character.waittime);
     }
 }
示例#2
0
        public override void Action(CharacterBase character, SceneBattle battle)
        {
            if (!this.BlackOut(character, battle, this.name, this.Power(character).ToString()))
            {
                return;
            }
            if (!this.init)
            {
                List <Point> pointList = new List <Point>();
                foreach (CharacterBase characterBase in battle.AllChara())
                {
                    if (characterBase.union == character.UnionEnemy && (!(characterBase is DammyEnemy) || !characterBase.nohit) && character.InAreaCheck(character.position))
                    {
                        pointList.Add(characterBase.position);
                    }
                }
                this.targets = pointList.ToArray();
                character.animationpoint.X = -1;
                this.sound.PlaySE(SoundEffect.warp);
                this.init = true;
            }
            if (character.waittime == this.shot * 20 + 20 && this.shot < this.targets.Length)
            {
                this.sound.PlaySE(SoundEffect.chain);
                for (int angle = 0; angle < 4; ++angle)
                {
                    int x = this.targets[this.shot].X;
                    int y = this.targets[this.shot].Y;
                    switch (angle)
                    {
                    case 0:
                        ++y;
                        break;

                    case 1:
                        x += this.UnionRebirth(character.union);
                        break;

                    case 2:
                        --y;
                        break;

                    case 3:
                        x -= this.UnionRebirth(character.union);
                        break;
                    }
                    var knifePos = new Point(x, y);
                    if (character.NoObject(knifePos) && character.InAreaCheck(knifePos))
                    {
                        AttackBase a = new ThrowKnife(this.sound, battle, x, y, character.union, 10, this.Power(character), 6, 30, angle);
                        a.invincibility = false;
                        battle.attacks.Add(this.Paralyze(a));
                    }
                }
                ++this.shot;
            }
            if (this.shot >= this.targets.Length && character.waittime >= this.targets.Length * 20 + 80)
            {
                if (!this.end)
                {
                    this.animePoint.X = -1;
                    battle.effects.Add(new MoveEnemy(this.sound, battle, character.position.X, character.position.Y));
                    this.end = true;
                }
                if (this.BlackOutEnd(character, battle))
                {
                    base.Action(character, battle);
                }
            }
            else
            {
                this.animePoint = this.Animation(character.waittime);
            }
        }
示例#3
0
 void Start()
 {
     charController   = this.GetComponent <CharacterController>();
     throwKnifeScript = this.GetComponent <ThrowKnife>();
 }