示例#1
0
    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");
    }
示例#2
0
 void KillPlayer()
 {
     Instantiate(poof, transform.position, Quaternion.identity);
     deathScreenScript.StartCoroutine("DeathProtocol");
     Destroy(gameObject);
 }