public void Stop() { AssetLoader.Clear(); GameScheduler.Tasks.Clear(); Events.Clear(); GameThread.Stop(); TcpHandler?.Stop(); Running = false; }
// mainly for tests to make sure everything gets cleaned up public void Stop() { AssetLoader.Clear(); GameScheduler.Tasks.Clear(); Events.Clear(); GameThread?.Stop(); TcpHandler?.Stop(); Running = false; Server.Map.Chunks = new Dictionary <string, ServerChunk>(); foreach (var player in Players.ToList()) { player.Tcp.Stop(); } Players.Clear(); PacketsToProccess.Clear(); }
public void Stop() { GameThread.Abort(); TcpHandler.Stop(); _running = false; }