コード例 #1
0
ファイル: CardHolders.cs プロジェクト: priseceanpaul/DM
        public void LoadPlayer(PlayerHolder p, PlayerStatsUI statsUI)
        {
            if (p == null)
            {
                return;
            }
            playerHolder = p;

            foreach (CardInstance c in playerHolder.cardsDown)
            {
                Settings.SetParentForCard(c.viz.gameObject.transform, downGrid.value.transform);
            }

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

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

            p.statsUI = statsUI;
            p.LoadPlayerOnStatsUI();
        }
コード例 #2
0
 public void LoadPlayerOnHolder(PlayerHolder p, CardHolders h, PlayerStatsUI ui)
 {
     h.LoadPlayer(p, ui);
 }