예제 #1
0
        public static void GoToDeathScene()
        {
            CCSimpleAudioEngine.SharedEngine.StopBackgroundMusic(true);
            var scene = new DeathScene(mainWindow);

            director.ReplaceScene(scene);
        }
예제 #2
0
    public void RestartLevel()
    {
        FindObjectOfType <AudioManager> ().PlayAudio("Menu Out");

        if (SceneManager.GetActiveScene().buildIndex == 1)
        {
            SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
        }
        else if (SceneManager.GetActiveScene().buildIndex == 2)
        {
            if (Checkpoint.check != null)
            {
                DeathScene.SetActive(false);
                Checkpoint.check.RespawnPlayer();
                Cursor.visible = false;
            }
            else
            {
                SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
            }
        }
    }
예제 #3
0
 public void Death()
 {
     Cursor.visible = true;
     DeathScene.SetActive(true);
 }