Beispiel #1
0
 public void Execute()
 {
     Idle();
     if (enemy.Target != null)
     {
         enemy.ChangeState(new PatrolState());
     }
 }
Beispiel #2
0
 public void Execute()
 {
     Patrol();
     enemy.Move();
     if (enemy.Target != null)
     {
         enemy.ChangeState(new RangeState());
     }
 }
Beispiel #3
0
    //private Collision2D Ho;

    public void Execute()
    {
        if (enemy.Target != null)
        {
            enemy.TouchEdge = false;
            enemy.Move();
        }
        else
        {
            enemy.ChangeState(new IdleState());
        }
        enemyAttack();
    }