Ejemplo n.º 1
0
        public void OnFirstSceneLoaded()
        {
            UIManager.gameObject.SetActive(true);
            Data = SceneLoader.GetPlayerData();
            if (SceneLoader.IsLoadSuccesfull())
            {
                InitGameForLoadedData();
            }
            else
            {
                if (Data == null)
                {
                    Data = new PlayerData(Element.Air);
                }

                InitializeGameForFirstPlay();
            }

            MageButtons.OnFirstSceneLoaded();

            MageButtons.AddPlayerButton();

            UIManager.SkillCancelButton.SetActive(false);

            AssignActions();

            // Give Daily Bonus
            DailyBonusManager.InitiateRewardPage();

            AchievementManager.SetAchievementKeeper(Data.GetAchievementData());
            OnSceneChange(Data.GetLoadedScene());
            if (PlayerPrefs.GetString("_gameCloseTime") != "")
            {
                //idle income generation
                CalculateIdleIncomeAndShowNotification();
            }
        }