public void LoadCard()
        {
            if (currentCard.instance == null)
            {
                return;
            }

            currentCard.instance.gameObject.SetActive(false);
            cardViz.LoadCard(currentCard.instance.viz.card);
            cardViz.gameObject.SetActive(true);
        }
Exemple #2
0
        void CreateStartingCards()
        {
            ResourcesManager rm = Settings.GetResourcesManager();

            for (int i = 0; i < currentPlayer.startingCards.Length; i++)
            {
                GameObject go = Instantiate(cardPrefab) as GameObject;
                CardViz    v  = go.GetComponent <CardViz>();
                v.LoadCard(rm.GetCardInstance(currentPlayer.startingCards[i]));
                CardInstance inst = go.GetComponent <CardInstance>();
                inst.currentLogic = currentPlayer.handLogic;
                Settings.SetParentForCard(go.transform, currentPlayer.handGrid.value);
            }
        }