public void CreateElements(int num) { //Only for testing use for (int i = 0; i < num; ++i) { PTFlatGroupElement element = Instantiate(elementPrefab).GetComponent <PTFlatGroupElement>(); ptZone.Add(element.transform, timerAnimation); } UpdateContent(); }
public virtual void Deal(PTZone zone, int amount, bool faceup) { for (int i = 0; i < amount; i++) { if (content.childCount > 0) { Transform currCard = content.GetChild(0); currCard.ToggleVisibility(true, PT.DEFAULT_TIMER); currCard.Flip(faceup, PT.DEFAULT_TIMER); zone.Add(currCard.transform, PT.DEFAULT_TIMER * 2); } } StartCoroutine(ArrangeCoroutine(PT.DEFAULT_TIMER)); }