Esempio n. 1
0
 void Awake()
 {
     rutaArchiu = Application.persistentDataPath + "/data.dat";
     if (inmortal == null)
     {
         inmortal = this;
         DontDestroyOnLoad(gameObject);
         PlayGamesPlatform.Activate();
     }
     else if (inmortal != this)
     {
         Destroy(gameObject);
     }
 }
Esempio n. 2
0
 private void Awake()
 {
     if (Time.timeScale == 0f)
     {
         Time.timeScale = 1f;
     }
     if (inmortal != null && inmortal != this)
     {
         Destroy(this.gameObject);
         return;
     }
     inmortal = this;
     GameObject.DontDestroyOnLoad(this.gameObject);
 }