public static bool checkSwitch(string switchName) { if (gameSwitches == null) { GameSwitchManager.loadSwitches(); } if (gameSwitches.gameSwitches.ContainsKey(switchName)) { return(gameSwitches.gameSwitches[switchName]); } else { //switch does not exist return(false); } }
public static void setSwitch(string switchName, bool value) { if (gameSwitches == null) { GameSwitchManager.loadSwitches(); } if (gameSwitches.gameSwitches.ContainsKey(switchName)) { gameSwitches.gameSwitches[switchName] = value; } else { //switch does not exist gameSwitches.gameSwitches.Add(switchName, value); } return; }