Esempio n. 1
0
 void OnDrawCardREQ(int connectionId, int chanelId, int recHostId, Net_DrawCardREQ msg)
 {
     if (IsAbleToDraw(msg.PlayerId, msg.DeckId))
     {
         int             cardId = GetRandomCardFromDeck(msg.DeckId);
         Net_DrawCardCFM dc     = new Net_DrawCardCFM(msg.PlayerId, msg.DeckId, cardId, GetDeckActualSize(msg.DeckId));
         //SendToClient(recHostId, connectionId, dc);
         SendToAllClients(dc);
     }
 }
Esempio n. 2
0
 void OnDrawCardCFM(int connectionId, int chanelId, int recHostId, Net_DrawCardCFM msg)
 {
     if (msg.PlayerId != _connectionData.playerId)
     {
         GameController.instance.UpdateDeckSize(msg.DeckId, msg.DeckSize);
     }
     else
     {
         GameController.instance.DrawCardCFM(msg.PlayerId, msg.DeckId, msg.CardId, msg.DeckSize);
     }
 }