// ------------------------------------------------------------------------------- // Initialize // ------------------------------------------------------------------------------- public void Initialize(string text, int btnid, bool isenabled, ChoicesPanel panel) { GetComponentInChildren <Button>().interactable = isenabled; parent = panel; id = btnid; GetComponentInChildren <Text>().text = text; }
// ------------------------------------------------------------------------------- // ShowChoices // ------------------------------------------------------------------------------- protected IEnumerator ShowChoices() { ChoicesPanel panel = Finder.ui.choicesPanel.GetComponent <ChoicesPanel>(); panel.Initialize(this); Finder.ui.choicesPanel.gameObject.SetActive(true); while (Finder.ui.choicesPanel.gameObject.activeInHierarchy) { yield return(null); } }