Beispiel #1
0
        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));
        }
Beispiel #2
0
        public void StartClient()
        {
            tankAClient = new TankAClient();

            role = GameLogicMode.Client;
            TankAGame.ThisGame.Services.AddService(typeof(ITankAClient), tankAClient);
        }