Exemplo n.º 1
0
        //When this method's called, Server has just sent the deck information
        //needed to instantiate cards, so we instantiate cards
        public void setDeck(DeckData deckData)
        {
            this.deckData = deckData;

            //Takes the deck data and instatiates card GameObjects with AbstractCard scripts
            createDeck();
        }
Exemplo n.º 2
0
        // Get deck for player1 -- player2 only if Single player
        public void ProcessGetDeck(NetworkResponse response)
        {
            ResponseGetDeck args      = response as ResponseGetDeck;
            int             numFields = args.numFields;
            int             numCards  = args.numCards;
            DeckData        deck      = args.deck;

            //CardData card = deck.popCard();

            GameManager.player1.setDeck(deck);
            GameManager.player1.dealCard(3);
            // Don't allow player1 to move cards until they hasDeck
            GameManager.player1.hasDeck = true;
            GameManager.player2.dealDummyCard(3);
            // Only deal cards for opponent if
            if (Constants.SINGLE_PLAYER)
            {
                Debug.Log("Deal player2 Cards");
                GameManager.player2.setDeck(deck);
                GameManager.player2.dealCard(3);
            }

            Debug.Log("Protocols Deck Response: deck count: " + deck.getSize() +
                      " numCards: " + numCards + " num fields: " + numFields);
            //Debug.Log ("Card data: cardID: " + card.cardID + " diet Type: " +
            //          card.dietType + " SpeciesName: " + card.speciesName);
        }
Exemplo n.º 3
0
        public void ProcessGetDeck(NetworkResponse response)
        {
            ResponseGetDeck args      = response as ResponseGetDeck;
            int             numFields = args.numFields;
            int             numCards  = args.numCards;
            DeckData        deck      = args.deck;
            CardData        card      = deck.popCard();

            Debug.Log("Deck Response: deck count: " + deck.getSize() +
                      " numCards: " + numCards + " num fields: " + numFields);
            Debug.Log("Card data: cardID: " + card.cardID + " diet Type: " +
                      card.dietType + " SpeciesName: " + card.speciesName);
        }
Exemplo n.º 4
0
 public ResponseGetDeck()
 {
     deck        = new DeckData();
     protocol_id = NetworkCode.GET_DECK;
 }
Exemplo n.º 5
0
 public ResponseGetDeck()
 {
     deck = new DeckData();
     protocol_id = NetworkCode.GET_DECK;
 }
Exemplo n.º 6
0
        //When this method's called, Server has just sent the deck information
        //needed to instantiate cards, so we instantiate cards
        public void setDeck(DeckData deckData)
        {
            this.deckData = deckData;

            //Takes the deck data and instatiates card GameObjects with AbstractCard scripts
            createDeck ();
        }