public void Execute() { Patrol(); enemy.Move(); if (enemy.Target != null) { enemy.ChangeState(new AttackState()); } }
public void Execute() { if (enemy.Target != null) { if (enemy.isRanged) { enemy.SetSpeed(0); } else { enemy.Move(); } } else { enemy.ChangeState(new IdleState()); } }