Beispiel #1
0
 public void LoadStatistics()
 {
     this.stats = LevelStats.Deserialize(SceneManager.GetActiveScene().name);
     if (this.stats == null)
     {
         this.stats = new LevelStats();
     }
 }
Beispiel #2
0
 void Awake()
 {
     //PlayerPrefs.DeleteAll();
     levelname = "Level" + " " + id;
     if (id > 1)
     {
         string     prevLevel = "Level" + " " + (id - 1);
         LevelStats stats     = LevelStats.Deserialize(prevLevel);
         if (stats == null || !stats.levelPassed)
         {
             but.interactable = false;
         }
         else
         {
             but.interactable = true;
         }
     }
 }