public void StopClient() { if (tankAClient != null) { tankAClient.Stop(); // Wait for client to properly send shutdown message. Thread.Sleep(100); tankAClient.Dispose(); tankAClient = null; } role = GameLogicMode.Undefined; TankAGame.ThisGame.Services.RemoveService(typeof(ITankAClient)); }
public void StartClient() { tankAClient = new TankAClient(); role = GameLogicMode.Client; TankAGame.ThisGame.Services.AddService(typeof(ITankAClient), tankAClient); }