Exemple #1
0
    public void Execute()
    {
        Debug.Log("Idling");

        if (enemy.Target != null)
        {
            enemy.changeState(new PatrolState());
        }
        Idle();
    }
Exemple #2
0
    public void Execute()
    {
        Debug.Log("Patrolling");
        Patrol();

        enemy.Move();

        if (enemy.Target != null)
        {
            enemy.changeState(new AttackState());
        }
    }
Exemple #3
0
 public void Execute()
 {
     if (enemy.Target != null)
     {
         enemy.Move();
     }
     else
     {
         enemy.changeState(new IdleState());
     }
 }