Beispiel #1
0
        public void Execute()
        {
            if (enemy.RangeInMeele && enemy is EnemyFighter)
            {
                enemy.ChangeState(new MeleeState());
            }

            else if (enemy.Target != null)
            {
                if (enemy is EnemyFighter)
                {
                    enemy.Petrol();
                }

                else if (enemy is EnemyShooter)
                {
                    enemy.Shoot = true;
                    ThrowKnife();
                }
            }
            else
            {
                enemy.ChangeState(new IdleState());
            }
        }
Beispiel #2
0
        public void Execute()
        {
            Idle();

            if (enemy.Target != null)
            {
                enemy.ChangeState(new PetrolState());
            }
        }
Beispiel #3
0
 public void Execute()
 {
     Petrol();
     enemy.Petrol();
     if (enemy.Target != null && enemy.RangeInThrow)
     {
         enemy.ChangeState(new RangeState());
     }
 }
Beispiel #4
0
        public void Execute()
        {
            AttackSword();

            if (enemy.RangeInThrow && !enemy.RangeInMeele)
            {
                if (enemy is EnemyFighter)
                {
                    enemy.Petrol();
                }
                else if (enemy is EnemyShooter)
                {
                    enemy.ChangeState(new RangeState());
                }
            }
            else if (enemy.Target == null)
            {
                enemy.ChangeState(new IdleState());
            }
        }