Beispiel #1
0
        public void LoadPlayer(PlayerHolder p, PlayerStatUI statUI)
        {
            if (p == null)
            {
                return;
            }
            currentPlayer   = p;
            p.currentHolder = this;
            foreach (CardInstance c in p.handCards)
            {
                Settings.SetParentForCard(c.viz.gameObject.transform, handCardsGrid.value.transform);
                //c.viz.gameObject.transform.SetParent(handCardsGrid.value.transform);
            }

            foreach (CardInstance c in p.cardsDown)
            {
                Settings.SetParentForCard(c.viz.gameObject.transform, cardsDownGrid.value.transform);
                //c.viz.gameObject.transform.SetParent(cardsDownGrid.value.transform);
            }

            foreach (ResourceHolder c in p.resourceList)
            {
                Settings.SetParentForCard(c.cardObj.gameObject.transform, resourceCardsGrid.value.transform);
                //c.cardObj.gameObject.transform.SetParent(handCardsGrid.value.transform);
            }
            p.statUI = statUI;
            p.LoadPlayerOnStatUI();
        }
Beispiel #2
0
 public void LoadPlayerOnHolder(PlayerHolder p, CardHolder h, PlayerStatUI statUI)
 {
     h.LoadPlayer(p, statUI);
 }