Esempio n. 1
0
    IEnumerator WinOrLose(string status)
    {
        GameObject gameOverPanel = GameObject.Find("GameOverPanel");
        Text       gameOverText  = gameOverPanel.GetComponentInChildren <Text>();

        gameOverPanel.transform.localPosition = new Vector3(0, 0, 0);
        gameOverText.text = status;

        yield return(new WaitForSeconds(3));

        sceneManager.LoadByIndex(0);
    }