Пример #1
0
        private void GetRecords()
        {
            _records = new List <GameRecord>();
            var tmp = 0;

            while (PlayerPrefs.HasKey(tmp.ToString()))
            {
                _records.Add(SerializeManager.Deserialize <GameRecord>(PlayerPrefs.GetString(tmp.ToString())));
                tmp++;
            }
            _recordBoard.SetSizeWithCurrentAnchors(RectTransform.Axis.Vertical, 120 * _records.Count + 300);
        }
        public void GoToMenu()
        {
            SetActive("LoadingImage", true);
            var tmp = 0;

            while (PlayerPrefs.HasKey(tmp.ToString()))
            {
                tmp++;
            }
            PlayerPrefs.SetString(tmp.ToString(), SerializeManager.Serialize <GameRecord>(record));
            SceneManager.LoadScene(0, LoadSceneMode.Single);
        }