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 LoadButtons() { int correct = ToCheckOrNotToCheck(); if (correct == 2) { checkObjects[0].SetActive(false); checkObjects[1].SetActive(false); } else { checkObjects[correct].SetActive(true); checkObjects[Mathf.Abs(correct - 1)].SetActive(false); string name = vM.GetWeeklyName(currentWeekIndex - correct); weekNames[correct].text = name; } }