public void initMainMenu() { _popUp = FindObjectOfType <PopUp>(); // Cambiar color del boton del dia y mostrar charlas int today = DateTime.Now.Day; Button bttnToday = null; bttnDayOne.transform.Find("bar").GetComponent <Image>().color = colorMaptek; bttnDayTwo.transform.Find("bar").GetComponent <Image>().color = colorMaptek; bttnDayThree.transform.Find("bar").GetComponent <Image>().color = colorMaptek; if (today <= 20) { bttnToday = bttnDayOne; } if (today == 21) { bttnToday = bttnDayTwo; } if (today >= 22) { bttnToday = bttnDayThree; } bttnToday.transform.Find("bar").GetComponent <Image>().color = Color.white; bttnToday.GetComponent <Image>().color = colorMaptek; bttnToday.GetComponentInChildren <TextMeshProUGUI>().color = Color.white; // Cargar charlas del dia if (ConferenceControl.Instance.currExposition.isOpen) { Exposition e = ConferenceControl.Instance.currExposition; Button b = null; if (e.date.Day <= 20) { b = bttnDayOne; } ; if (e.date.Day == 21) { b = bttnDayOne; } if (e.date.Day >= 22) { b = bttnDayOne; } b.onClick.Invoke(); b.Select(); } else { bttnToday.onClick.Invoke(); bttnToday.Select(); } }
void Start() { _sessionRegister = FindObjectOfType <SessionRegister>(); _popUp = FindObjectOfType <PopUp>(); }