private GameObject CardFromEntity(GameObject representation) { GameObject card = Instantiate(cardObject); CardUIController cardControl = card.GetComponent <CardUIController>(); cardControl.representation = representation; return(card); }
public CardUIController AddEntry(Card source) { CardUIController newEntry = Instantiate(LeaderCardPrefab).GetComponent <CardUIController>(); newEntry.SourceCard = source; newEntry.UpdateUI(); cards.Add(newEntry); return(newEntry); }