Esempio n. 1
0
 // Use this for initialization
 void Awake()
 {
     Time.timeScale = 1;
     if (instance == null)
     {
         instance = this;
         if (SceneManager.GetActiveScene().name != "Main Menu")
         {
             Load();
         }
     }
     else if (instance != this)
     {
         Destroy(gameObject);
     }
     instance.NewScene();
     DontDestroyOnLoad(this.gameObject);
 }