private void OnDestroy() { if (player != null) { player.EnableJump(this); } }
/// <summary> /// Waits a predetermined amount of time before allowing the player to move again. /// </summary> private IEnumerator _WaitToEnableControls() { player.FSM.Reset(); yield return(new WaitForSeconds(RESPAWN_DELAY)); player.EnableCrouch(this); player.EnableJump(this); player.EnableMove(this); isDead = false; }