コード例 #1
0
 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);
     }
 }
コード例 #2
0
 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;
 }