예제 #1
0
 public void ShowRunSlots()
 {
     for (int i = 0; i < runDates.Length; i++)
     {
         var cur = runDates[i];
         slots[i].color = Colors.greyColor;
         if (cur == "")
         {
             slots[i].text = "Empty slot";
             slots[i].GetComponent <Button>().enabled = false;
         }
         else
         {
             string finishStatus;
             if (vM.GetRunsFinishedState()[i] == true)
             {
                 finishStatus = " - finished";
             }
             else
             {
                 finishStatus = " - ongoing";
             }
             slots[i].text = cur + " - " + vM.GetBadHabitNameFromRun(i) + finishStatus;
             Debug.Log("index of req run = " + i);
             Debug.Log(PlayerPrefs.GetString("badHabitName0", "default"));
         }
     }
     loadButton.color = Colors.greyColor;
     loadButton.GetComponent <Button>().enabled = false;
     pM.EnablePopup(runTablePopup);
 }
예제 #2
0
 //if the answer is fail, opens the popup the first time to check if the answer was correctly input, then loads the next scene
 public void CheckAndLoadScene()
 {
     if (counter == 0)
     {
         if (weeklyCheck == OptionCodes.options[1])
         {
             pM.EnablePopup(popupCheck);
             counter++;
             return;
         }
     }
     //saves values and loads the next scene
     SaveValuesAndLoad();
 }
예제 #3
0
 //if the answer is no on habit, opens the popup the first time to check if the answer was correctly input, then loads the next scene
 public void CheckAndLoadScene()
 {
     if (counter == 0)
     {
         foreach (string el in arrayOfChanged)
         {
             if (el == OptionCodes.options[1])
             {
                 pM.EnablePopup(popupCheck);
                 counter++;
                 return;
             }
         }
     }
     //saves values and loads the next scene
     SaveValuesAndLoad();
 }
예제 #4
0
 public void CalendarRestrictionPopup()
 {
     pM.EnablePopup(calendarRestrictionPopup);
 }