public void Execute() { Debug.Log("Idling"); if (enemy.Target != null) { enemy.changeState(new PatrolState()); } Idle(); }
public void Execute() { Debug.Log("Patrolling"); Patrol(); enemy.Move(); if (enemy.Target != null) { enemy.changeState(new AttackState()); } }
public void Execute() { if (enemy.Target != null) { enemy.Move(); } else { enemy.changeState(new IdleState()); } }