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

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