// Display a set of cards on screen public IEnumerator ShowCards(string[] card_names) { foreach (string c in card_names) { Button card = Instantiate(Resources.Load <Button>(card_folder_path + c)); if (card != null) { card.transform.SetParent(card_display.transform, false); } } EnableCards(false); // Don't allow a player to click on a card while the effect occurs yield return(StartCoroutine(ui_effect_manager.FadeImage(card_display.transform, fade_duration, new Color(0f, 0f, 0f, 0f), Color.white, false))); card_display.SetActive(true); RecordCardNames(card_names); // Needed for the back button --> otherwise we don't know what cards we presented last time. }
// Show the intro public IEnumerator ShowTransitionScreen() { yield return(StartCoroutine(ui_effect_manager.FadeImage(transition_background, transition_duration, original_color, new Color(0f, 0f, 0f, 0f), false))); transition_background.gameObject.SetActive(false); // Need to disable this object or else we can't interact with the cards }