/// <summary> /// Execute this code when the player dies. /// </summary> public void OnDie() { //Play Death animation m_Animator.PlayerDead(true); m_PlayerController.DisableMovement(); m_Damageable.EnableInvulnerability(); m_PlayerAudio.PlayDeathAudioClip(); //Respawn Player StartCoroutine(DieRespawnCoroutine(true, true)); }