예제 #1
0
 /// <summary>
 /// Draws the number of cards stored in currentDrawCount (incremented by PLUS cards)
 /// for the current player.
 /// </summary>
 public static void DrawCardsForPlayer(PlayerConnection player, int drawCount)
 {
     while (drawCount >= 0)
     {
         player.CmdGetCard();
         drawCount--;
     }
 }
예제 #2
0
    public void DrawCards()
    {
        // Start coroutine to wait until we get cards from the server
        StartCoroutine(WaitForCardsToArrive(currentDrawCount + MyCards.Count));

        while (currentDrawCount > 0)
        {
            connection.CmdGetCard();  // Get a card from the server.
            if (!connection.isServer) // If we are on the server the server will decrement the count for us
            {
                currentDrawCount--;
            }
        }
    }