Ejemplo n.º 1
0
 private void Login()
 {
     Console.Write("Username: ");
     var name = Console.ReadLine();
     ChatLoginPacket loginPacket = new ChatLoginPacket();
     loginPacket.Username = name;
     Send(loginPacket);
 }
Ejemplo n.º 2
0
        private void OnLogin(ChatLoginPacket obj)
        {
            LoginResponsePacket packet = new LoginResponsePacket();
            _bifrost.Send(packet, obj.Connection);

            _playerSystem.Add(new PlayerObject(
                displayName: obj.Username,
                networkNode: obj.Connection
                ));
        }