Esempio n. 1
0
    private void LoadPlayerDeck()
    {
        playerDeck = new Deck(this);
        //Retrieve information about the cards that the players has in their deck.
        LoadDeck();
        //Retrieve the 50 cubes corresponding to the 50 player's cards.
        GameObject[]  go = GameObject.FindGameObjectsWithTag("PlayerCard");

        for(int i = 0; i < 50; i++)
        {
            //Attach a GameObject to each Card Object in the player deck.
            playerDeck.linkGameObjectToCard(go[i], (HandleMouse)go[i].GetComponent("HandleMouse"), i);
        }
        //Set the gameobjects positions to fit in the deck zone.
        playerDeck.SetDeckPosition();
    }