Пример #1
0
        public void LoadPlayer(PlayerHolder p, PlayerStatsUI statsUI)
        {
            if (p == null)
            {
                return;
            }

            playerHolder    = p;
            p.currentHolder = this;

            foreach (CardInstance c in p.downCards)
            {
                if (!p.attackingCards.Contains(c))
                {
                    Settings.SetParentForCard(c.viz.gameObject.transform, downGrid.value.transform);
                }
            }

            foreach (CardInstance c in p.handCards)
            {
                if (c.viz != null)
                {
                    Settings.SetParentForCard(c.viz.gameObject.transform, handGrid.value.transform);
                }
            }

            foreach (ResourceHolder c in p.resourcesList)
            {
                Settings.SetParentForCard(c.cardObj.transform, resourcesGrid.value.transform);
            }

            foreach (CardInstance c in p.attackingCards)
            {
                SetCardsOnBatlleLine(c);
            }

            p.statsUI = statsUI;
            p.LoadPlayerOnStatsUI();
        }
Пример #2
0
 public void LoadPlayerOnHolder(PlayerHolder p, CardHolders h, PlayerStatsUI ui)
 {
     h.LoadPlayer(p, ui);
 }