IEnumerator VoiceSequence() { firstPopup.SetActive(true); yield return(new WaitForSeconds(timer1)); firstPopup.SetActive(false); secondPopup.SetActive(true); yield return(new WaitForSeconds(timer2)); secondPopup.SetActive(false); thirdPopup.SetActive(true); fadeoutScript.StartCoroutine(fadeoutScript.DeathProtocol()); yield return(new WaitForSeconds(timer3)); SceneManager.LoadScene("Game"); }
void KillPlayer() { Instantiate(poof, transform.position, Quaternion.identity); deathScreenScript.StartCoroutine("DeathProtocol"); Destroy(gameObject); }