public void Execute() { if (enemy.Target != null) { enemy.ChangeState(new PatrolState()); } else if (enemy.Target == null) { Idle(); } }
public void Execute() { if (enemy.InMeeleRange) { Attack(); } else if (!enemy.InMeeleRange && enemy.Target != null) { enemy.ChangeState(new PatrolState()); } else if (enemy.Target == null) { enemy.ChangeState(new IdleState()); } }
public void Execute() { if (enemy.Target == null) { Patrol(); enemy.Move(); } else if (enemy.Target != null && enemy.InMeeleRange) { enemy.ChangeState(new MeeleState()); } else { enemy.Move(); } }