예제 #1
0
    IEnumerator RestartLevel()
    {
        yield return(new WaitForSeconds(m_waitTimeAfterDie));

        // launch fade to black
        if (m_gui)
        {
            m_gui.LoadLevel(SceneManager.GetActiveScene().name);
        }

        // remove player
        gameObject.SetActive(false);
    }
예제 #2
0
    IEnumerator RestartLevel()
    {
        yield return(new WaitForSeconds(m_waitTimeAfterDie));

        // launch fade to black
        if (m_gui)
        {
            m_gui.LoadLevel(Application.loadedLevelName);
        }

        // remove player
        gameObject.SetActive(false);
    }