public static FFA GetInstance(World world) { if (instance == null) { world_ = world; instance = new FFA(); startTime = DateTime.Now; task_ = new SchedulerTask(Interval, true).RunForever(TimeSpan.FromSeconds(1)); stoppedEarly = false; //to catch bugs when there is an unexpected crash (for testing/debugging) } return(instance); }
public static void RevertGame() //Reset game bools/stats and stop timers { task_.Stop(); world_.gameMode = GameMode.NULL; instance = null; started = false; if (world_.gunPhysics) { world_.DisableGunPhysics(Player.Console, true); } world_ = null; playerCount = 0; stoppedEarly = false; }