IEnumerator RewardCardPlaying(RewardCardGraphic cardGraphic) { foreach (RewardCardGraphic graphic in rewardCardsPlayArea.GetComponentsInChildren<RewardCardGraphic>()) graphic.GetComponent<Button>().interactable = false; //PutCardToCenter(cardGraphic); cardGraphic.PlayAssignedCard(); //yield return new WaitForSeconds(cardPlayAnimationTime); //GameObject.Destroy(cardGraphic.gameObject); HideRewards(); mainCardsScreen.RewardSelectionFinished(); yield break; }
public void RewardCardPlay(RewardCardGraphic cardGraphic) { StartCoroutine("RewardCardPlaying", cardGraphic); }