public static ArenaMode _pInstance; // This is a singleton script, Initialized in Awake(). //-------------------------------------------------------------- // *** CONSTRUCTORS *** public void Awake() { // If the singleton has already been initialized yet if (_pInstance != null && _pInstance != this) { Destroy(this.gameObject); return; } // Set singleton _pInstance = this; }
public ArenaRuleset(ArenaMode mode) { Mode = mode; switch (mode) { case ArenaMode.Normal: { Rules = ArenaRule.None; break; } case ArenaMode.TwoTeams: { Rules = ArenaRule.TwoTeams; break; } case ArenaMode.FreeForAll: { Rules = ArenaRule.FastRegen | ArenaRule.NoPoolBiasing | ArenaRule.NoShrineBiasing | ArenaRule.NoTeams | ArenaRule.NoRaiseCall | ArenaRule.NoFriendlyOther; break; } case ArenaMode.CaptureTheFlag: { Rules = ArenaRule.CaptureTheFlag; break; } case ArenaMode.Deathmatch: { Rules = ArenaRule.NoTapping | ArenaRule.NoShrineBiasing | ArenaRule.NoRaiseCall; break; } case ArenaMode.ExpEvent: { Rules = ArenaRule.ExpEvent; break; } } }
public ArenaModifier(ArenaMode mode, string[] bools) { if (mode == ArenaMode.Survival) { xpMult = 5; } if (bools != null) { for (int i = 0; i < bools.Length; i++) { if (bools[i] == "1") { ArenaModifiers m = (ArenaModifiers)i; LoadMod(m); ActiveMods.Add(m); } } } }
public ArenaRuleset(ArenaRule rules) { Mode = ArenaMode.Custom; Rules = rules; }
public Arena(ArenaMode mode, string[] boolArray = null) { gameMode = mode; Modifiers = new ArenaModifier(mode, boolArray); }