Esempio n. 1
0
        private static GamePref CreateUserAccount(ulong id)
        {
            var newAccount = new GamePref()
            {
                mapSize  = new int[6, 6],
                gameMode = "mapless"
            };

            return(newAccount);
        }
Esempio n. 2
0
 static GamePrefStorage()
 {
     if (DataStorage.SaveExists(GamePrefsFile))
     {
         prefs = DataStorage.LoadGamePrefs(GamePrefsFile);
     }
     else
     {
         prefs = new GamePref();
     }
 }
Esempio n. 3
0
        public static void UpdateInfo(int[,] mapSize = null, string gameMode = "mapless")
        {
            //! Storing incase ref:  mapSize = new int[,] { { 6, 6 } };
            GamePref preferences = GetPreferences();

            if (preferences.mapSize != mapSize)
            {
                preferences.mapSize = mapSize;
            }

            if (preferences.gameMode != gameMode)
            {
                preferences.gameMode = gameMode;
            }

            SaveGameprefs();
        }