Ejemplo n.º 1
0
 private void SendMessage(BE_Message pMessage)
 {
     if (ClientMessageReceived != null)
     {
         ClientMessageReceived(pMessage);
     }
 }
Ejemplo n.º 2
0
        /* Private methods */
        private void RouteMessage(BE_Message pMessage)
        {
            switch (pMessage.Type)
            {
            case BE_MessageType.Connected:
                AddPlayer((BE_Player)pMessage.Content);
                break;

            case BE_MessageType.Disconnected:
                RemovePlayer((BE_Player)pMessage.Content);
                break;

            case BE_MessageType.Unverified:
                UpdatePlayer((BE_Player)pMessage.Content);
                break;

            case BE_MessageType.Verified:
                UpdatePlayer((BE_Player)pMessage.Content);
                break;

            case BE_MessageType.Players:
                PlayerList((List <BE_Player>)pMessage.Content);
                break;

            case BE_MessageType.ServerConnected:
                Connected();
                break;

            case BE_MessageType.ServerDisconnected:
                Disconnected();
                break;

            default:
                break;
            }
        }