public void StateInitial() { ballon_1 = null; ballon_2 = null; foreach (var b in listBallon) { b.interactable = true; b.GetComponent <Animator>().SetBool("op", false); } numerator.SetActive(false); denomitator.SetActive(false); num.text = ""; dem.text = ""; oportunities = 0; stars.transform.GetChild(0).gameObject.SetActive(true); stars.transform.GetChild(1).gameObject.SetActive(true); }
IEnumerator Refresh() { yield return(new WaitForSeconds(1)); if (oportunities < 2) { ballon_1 = null; ballon_2 = null; foreach (var b in listBallon) { b.interactable = true; b.GetComponent <Animator>().SetBool("op", false); b.GetComponent <Image>().sprite = b.GetComponent <BehaviourSprite>()._default; } numerator.SetActive(false); denomitator.SetActive(false); num.text = ""; dem.text = ""; } }
public void GetBallon(M6L85_globo currentBallon) { if (ballon_1 == null) { ballon_1 = currentBallon; num.text = currentBallon.number.ToString(); } else if (ballon_1 != null && ballon_2 == null) { ballon_2 = currentBallon; dem.text = currentBallon.number.ToString(); } if (ballon_1 != null && ballon_2 != null) { foreach (var b in listBallon) { b.interactable = false; } StartCoroutine(delaySubmit()); } }