Inheritance: BinaryClient
Exemplo n.º 1
0
 public Player(Game game, YGOClient client)
 {
     Game = game;
     Type = (int)PlayerType.Undefined;
     State = PlayerState.None;
     _client = client;
 }
Exemplo n.º 2
0
        public void AddClient(YGOClient client)
        {
            _clients.Add(client);
            Player player = new Player(Game, client);

            client.PacketReceived += packet => player.Parse(packet);
            client.Disconnected += packet => player.OnDisconnected();
        }
Exemplo n.º 3
0
        public void Start()
        {
            Connection = new YGOClient();
            _behavior = new GameBehavior(this);

            Connection.Connected += OnConnected;
            Connection.PacketReceived += OnPacketReceived;

            Connection.Connect(IPAddress.Parse(_serverHost), _serverPort);
        }