public void Complete(int stars) { Stars = stars; IsCompleted = true; PlayerPrefsMapper.Save(this); Debug.Log(string.Format("Level '{0}' is completed with stars '{1}'.", Number, Stars)); }
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; }
public void Complete(int stars) { Stars = stars; IsCompleted = true; PlayerPrefsMapper.Save(this); Debug.Log($"Level '{Number}' is completed with stars '{Stars}'."); }
public void Save() { PlayerPrefsMapper.Save(this); Debug.Log("GameState successfully saved."); }