public void SetArcanaAndCard(MajorAspect majorAspect, string card, Transform parentContainer) { _aspect = majorAspect; _card = card; this.GetComponent <Text>().text = this._aspect.GetAspectName; if (parentContainer) { this.gameObject.transform.SetParent(parentContainer, false); } }
public void Awake() { //add 3 major arcana cards. //create a major arcana card and then give it a name. _divineArcana = (Instantiate(Resources.Load("Prefabs/MajorArcanaCard")) as GameObject).GetComponent <MajorArcanaCard>(); _mindArcana = (Instantiate(Resources.Load("Prefabs/MajorArcanaCard")) as GameObject).GetComponent <MajorArcanaCard>(); _bodyArcana = (Instantiate(Resources.Load("Prefabs/MajorArcanaCard")) as GameObject).GetComponent <MajorArcanaCard>(); MajorAspect divineAspect = new MajorAspect("Divine"); MajorAspect mindAspect = new MajorAspect("Mind"); MajorAspect bodyAspect = new MajorAspect("Body"); _divineArcana.SetArcanaAndCard(divineAspect, "The Fool", this.gameObject.transform); _mindArcana.SetArcanaAndCard(mindAspect, "Lovers", this.gameObject.transform); _bodyArcana.SetArcanaAndCard(bodyAspect, "Wheel of Fortune", this.gameObject.transform); _selectedArcana = _divineArcana; }