public void ShowDayInfo() { string dayString = EventSystem.current.currentSelectedGameObject.GetComponentsInChildren <TextMeshProUGUI>()[0].text; int dayIndex = int.Parse(dayString) - 1; playLevelNumber = dayIndex + 1; //fill up texts day.text = "Day " + (dayIndex + 1).ToString(); weekly.text = vM.GetWeeklyName(weekIndex); first.text = vM.GetNamesOfDayIndex(dayIndex)[0]; habit.text = vM.GetNamesOfDayIndex(dayIndex)[2]; //if there it is not 14+ day dont show second task if (dayIndex < 14) { second.gameObject.SetActive(false); secondText.gameObject.SetActive(false); secondClosed.gameObject.SetActive(true); } else { secondClosed.gameObject.SetActive(false); second.gameObject.SetActive(true); secondText.gameObject.SetActive(true); second.text = vM.GetNamesOfDayIndex(dayIndex)[1]; } Locked(dayIndex); FindObjectOfType <PopupManagement>().EnablePopup(dayPopup); }
void ShouldSecondToday() { bool shouldShow = false; string nameSaved = vM.GetNamesOfDayIndex(todayIndex)[1]; if (string.IsNullOrEmpty(nameSaved)) { shouldShow = true; } EnableDisableBlock(todaySecondBlock, shouldShow); }