Esempio n. 1
0
        /// <summary>
        /// Assuming we have saved before, load up saved data.
        /// If we haven't saved before, load nothing.
        /// </summary>
        public static void LoadSavedData()
        {
            saver = new GameSaver(0, "", 0, 0);
            SavedData data = saver.Load();

            if (data == null)
            {
                return;
            }
            Score        = data.score;
            CurrentLevel = data.progress;
            HighScore    = data.highscore;
        }
Esempio n. 2
0
 /// <summary>
 /// Using the GameSaver, save the game
 /// </summary>
 public static void Save()
 {
     saver = new GameSaver(Score, "Current", CurrentLevel, HighScore);
     saver.Save();
 }