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(); }
public void LoadPlayerOnHolder(PlayerHolder p, CardHolders h, PlayerStatsUI ui) { h.LoadPlayer(p, ui); }