Ejemplo n.º 1
0
        public void SetClient(GameClient client)
        {
            Game = client;
            AI   = null;
            Stop();

            if (client != null)
            {
                AI = new BattleAI(client);
                client.ConnectionOpened += Client_ConnectionOpened;
                client.ConnectionFailed += Client_ConnectionFailed;
                client.ConnectionClosed += Client_ConnectionClosed;
                client.BattleMessage    += Client_BattleMessage;
                client.SystemMessage    += Client_SystemMessage;
                client.DialogOpened     += Client_DialogOpened;
            }
            ClientChanged?.Invoke();
        }
Ejemplo n.º 2
0
        public void SetClient(GameClient client)
        {
            Game = client;
            AI = null;
            Stop();

            if (client != null)
            {
                AI = new BattleAI(client);
                client.ConnectionOpened += Client_ConnectionOpened;
                client.ConnectionFailed += Client_ConnectionFailed;
                client.ConnectionClosed += Client_ConnectionClosed;
                client.BattleMessage += Client_BattleMessage;
                client.SystemMessage += Client_SystemMessage;
                client.DialogOpened += Client_DialogOpened;
            }
            ClientChanged?.Invoke();
        }