public void AlertedToPlayer(PlayerMovement player) { this.player = player; alarmedByPlayer = true; if (ui != null) { ui.AlarmedByPlayer(); } }
public void AlertedToPlayer(PlayerMovement player) { this.player = player; gameObject.GetComponent <NavMeshAgent>().enabled = true; currentAlarmState = enemyState.AlarmedbyPlayer; currentMovementState = enemyState.Chasing; if (ui != null) { ui.AlarmedByPlayer(); } }