/// <summary> /// Set the stun value of the enemy and toggle the movement navigation /// </summary> private void SetStunned(bool isStunned) { // Disable the nav and stun the brain if (Agent) { Agent.enabled = !isStunned; } Brain.SetStunned(isStunned); }
/// <summary> /// Set the stun value of the enemy and toggle the movement navigation /// </summary> private void SetStunned(bool isStunned) { // Disable the nav and stun the brain _agent.enabled = !isStunned; _brain.SetStunned(isStunned); }