void LoadAndSetHighScore()
        {
            thisPlayerDataManager.SetFileIndex(0);
            if (!thisPlayerDataManager.PlayerDataIsLoaded())
            {
                thisPlayerDataManager.Load();
            }
            int highScore = thisPlayerDataManager.GetHighScore();

            thisScoreManager.SetHighScore(highScore);

            thisPlayerDataManager.Save();
        }
Пример #2
0
        void SavePlayerData()
        {
            IPlayerDataManager manager = playerDataManagerAdaptor.GetPlayerDataManager();

            manager.SetFileIndex(thisSelectedFileIndex);
            manager.Save();
        }
        /* Data Manipulation */
        public void TrySetEquippedBow(int index)
        {
            if (!thisPlayerDataManager.PlayerDataIsLoaded())
            {
                thisPlayerDataManager.Load();
            }
            int prevEquippedBowIndex = thisPlayerDataManager.GetEquippedBowIndex();

            if (prevEquippedBowIndex != index)
            {
                IBowConfigData configData = thisPlayerDataManager.GetBowConfigDataArray()[index];
                if (configData.IsUnlocked())
                {
                    thisPlayerDataManager.SetEquippedBow(index);
                    thisPlayerDataManager.Save();

                    IBowPanel panelToEquip   = thisBowPanels[index];
                    IBowPanel panelToUnequip = thisBowPanels[prevEquippedBowIndex];

                    panelToEquip.SetEquippedness(true, false);
                    panelToUnequip.SetEquippedness(false, false);
                }
            }
        }
Пример #4
0
 public void SavePlayerData()
 {
     thisPlayerDataManager.Save();
 }