IEnumerator RespawnAfterTime() { player.inputEnabled = false; tpc.target = null; audioManager.PlayOneShot(audioManager.death, tpc.transform.position); yield return(new WaitForSeconds(2.0f)); interfaceController.FadeOutScreen(1.0f); yield return(new WaitForSeconds(1.0f)); ammo = 0.0f; interfaceController.UpdateCounter(); player.transform.position = player.RespawnPosition; tpc.Restart(); player.inputEnabled = true; tpc.target = player.transform; yield return(new WaitForSeconds(1.0f)); interfaceController.FadeInScreen(1.0f); }