//public typeslogic public virtual void OnSetType(CardViz viz) { Element t = Settings.GetResourcesManager().typeElement; CardVizProperties type = viz.GetProperty(t); type.text.text = typeName; }
void CreateStartingCards() { ResourcesManager rm = Settings.GetResourcesManager(); for (int j = 0; j < allPlayers.Length; j++) { for (int i = 0; i < allPlayers[j].startingCards.Length; i++) { GameObject go = Instantiate(cardPrefab) as GameObject; CardViz cardViz = go.GetComponent <CardViz>(); cardViz.LoadCard(rm.GetCardInstance(allPlayers[j].startingCards[i])); CardInstance inst = go.GetComponent <CardInstance>(); inst.currentLogic = allPlayers[j].handLogic; Settings.SetParentForCard(go.transform, allPlayers[j].currentHolder.handGrid.value.transform); allPlayers[j].handCards.Add(inst); } allPlayers[j].currentHolder.LoadPlayer(allPlayers[j], allPlayers[j].statsUI); Settings.RegisterEvent("Created cards for player" + allPlayers[j].username, Color.white); } }
public override void OnSetType(CardViz viz) { base.OnSetType(viz); viz.statsHolder.SetActive(false); }
void Start() { viz = GetComponent <CardViz>(); }