Exemple #1
0
 public void ChangeToLevel(string scene)
 {
     DontDestroyOnLoad(this.gameObject);
     if (scene.Contains("World1"))
     {
         musicManager.ChangeMusicToGame(menuMusic, gameMusic, 0);
     }
     else if (scene.Contains("World2"))
     {
         musicManager.ChangeMusicToGame(menuMusic, gameMusic, 1);
     }
     else if (scene.Contains("World3"))
     {
         musicManager.ChangeMusicToGame(menuMusic, gameMusic, 2);
     }
     AudioManager.Click();
     Application.LoadLevel(scene);
 }