示例#1
0
 public void Awake()
 {
     PlayerPrefsMapper.Load(this);
     Debug.Log("SubscriptionEndDate: " + SubscriptionEndDate);
     Debug.Log("LastDailyRewardDate: " + LastDailyRewardDate);
     Debug.Log("GameState successfully loaded.");
 }
示例#2
0
        private IEnumerator TestCoroutine()
        {
            InteractableCanvas.interactable = false;
            for (;;)
            {
                _count++;
                OperationsCount.text = string.Format("Operations count: {0}/{1}", _count, TotalCount);

                //save
                float start = Time.realtimeSinceStartup;
                PlayerPrefsMapper.Save(GameState);
                float finish = Time.realtimeSinceStartup;

                _totalSaveTime    += finish - start;
                TotalSaveTime.text = "Total save time: " + _totalSaveTime;

                //load
                start = Time.realtimeSinceStartup;
                PlayerPrefsMapper.Load(GameState);
                finish = Time.realtimeSinceStartup;

                _totalLoadTime    += finish - start;
                TotalLoadTime.text = "Total load time: " + _totalLoadTime;

                yield return(null);

                if (_count == TotalCount)
                {
                    break;
                }
            }
            InteractableCanvas.interactable = true;
        }
示例#3
0
 public void Awake()
 {
     PlayerPrefsMapper.Load(Levels);
 }