public static TeamDeathMatch GetInstance(World world) { if (instance == null) { world_ = world; instance = new TeamDeathMatch(); startTime = DateTime.Now; task_ = new SchedulerTask(Interval, true).RunForever(TimeSpan.FromSeconds(1)); if (manualTeams) { timeDelay = 30; } } return(instance); }
public static void RevertGame() //Reset game bools/stats and stop timers { task_.Stop(); world_.gameMode = GameMode.NULL; isOn = false; instance = null; started = false; if (world_.gunPhysics) { world_.DisableGunPhysics(Player.Console, true); } world_ = null; redScore = 0; blueScore = 0; redTeamCount = 0; blueTeamCount = 0; RevertNames(); }