Пример #1
0
 void Awake()
 {
     if (controller == null)
     {
         DontDestroyOnLoad(gameObject);
         controller = this;
     }
     else if (controller != this)
     {
         Destroy(gameObject);
     }
     persistenceController = new PersistenceController();
     maps = new string[] { "IntroMap", "DebugMap" };
     persistenceController.loadGame();
     unlocksController             = GameObject.Find("Unlocks").transform.GetChild(0).GetChild(0).GetChild(0).gameObject.GetComponent <UnlocksController>();
     unlocksController.weaponsList = persistenceController.saveData.weapons;
 }