Example #1
0
 protected virtual void RaiseJoinGameRecieved(JoinGameMessage message)
 {
     if (JoinGameRecieved != null)
     {
         JoinGameRecieved(this, new MessageEventArgs <JoinGameMessage>(message));
     }
 }
Example #2
0
 /// <summary>
 /// Sends the join game message that adds the user into the game and joins the appropiate channels
 /// </summary>
 /// <returns><c>true</c>, if join game was sent, <c>false</c> otherwise.</returns>
 /// <param name="message">Message.</param>
 public bool SendJoinGame(JoinGameMessage message)
 {
     EnsureUsername(message);
     if (client.IsSubscribed(Channel))
     {
         SendHello(new HelloMessage());
     }
     else
     {
         client.Subscribe(Channel, true, OnMessageCallback);
     }
     return(true);
 }