示例#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);
     }
 }
示例#2
0
    public void DrawCard(int deckId)
    {
        Net_DrawCardREQ msg = new Net_DrawCardREQ(_playerId, deckId);

        SendToServer(msg);
    }