示例#1
0
        private void Start()
        {
            Time.fixedDeltaTime = 1 / 30f;

            Settings = new PlayerSettings();
            bool foundSettings = Util.LoadIntoObject(Util.OPTIONS_FILENAME, Settings);

            if (!foundSettings)
            {
                SaveSettings();
            }

            UpdateMusicSettings();

            bool foundSave = Util.LoadIntoObject(Util.SAVE_FILENAME, LootBoxModel.Instance);

            if (foundSave)
            {
                ViewManager.TitleScreen.GetComponent <TitleScreen>().StartGame.GetComponentInChildren <TextMeshProUGUI>().text = "Resume Game";
                SteamManager.CheckAchievements();
            }

            StartCoroutine(AutoSaveRoutine());

            if (!foundSave)
            {
                StartCoroutine(GGGameDevRoutine());
            }

#if DEBUG
            if (UnlockAll)
            {
                foreach (var kvp in LootBoxModel.Instance.UpgradeManager.Upgrades)
                {
                    LootBoxModel.Instance.UpgradeManager.Unlock(kvp.Key);
                }
            }
#endif
        }