private static GamePref CreateUserAccount(ulong id) { var newAccount = new GamePref() { mapSize = new int[6, 6], gameMode = "mapless" }; return(newAccount); }
static GamePrefStorage() { if (DataStorage.SaveExists(GamePrefsFile)) { prefs = DataStorage.LoadGamePrefs(GamePrefsFile); } else { prefs = new GamePref(); } }
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(); }