コード例 #1
0
    public void OnDialogPopUpCallBack(string buttonIndex)
    {
        int index = System.Convert.ToInt16(buttonIndex);

        switch (index)
        {
        case 0:
            AndroidNative.RedirectToWebPage(urlString);
            RaiseOnOnDialogPopupComplete(MessageState.YES);

            if (PlayerPrefs.GetString("choice") == "classes")
            {
                CreatePopup.PressedYes();
            }
            else if (PlayerPrefs.GetString("choice") == "timer")
            {
                SceneManager.LoadScene("RelaxMode");
                CreateNotification.Notification("Break Time's up!", "Let's get back to studying", PlayerPrefs.GetInt("breakTime"));
            }

            break;

        case 1:
            RaiseOnOnDialogPopupComplete(MessageState.NO);
            break;
        }
        Destroy(gameObject);
    }
コード例 #2
0
 public void STARTDATIMER()
 {
     PlayerPrefs.SetInt("paused", 0);
     ResetClock();
     StartCoroutine(TIMER());
     CreateNotification.Notification("Time's up!", "Try taking a break!", timer);
     resetButton.interactable  = true;
     studyButton.interactable  = false;
     pauseButton.interactable  = true;
     resumeButton.interactable = false;
     PlayerPrefs.SetInt("notificationCounter", 0);
 }
コード例 #3
0
 public void SetTimer()
 {
     // bring the user to a break pae when the timer is over, if he chooses to do so
     CreateNotification.Notification("Break time is over!", "Let's go back to studying", PlayerPrefs.GetInt("breakTime"));
 }
コード例 #4
0
 //This method is called as soon as the user clicks to enter break mode. It takes the time that they have set for break time and counts down that time.
 public void CreateBreakModeNotification()
 {
     CreateNotification.Notification("Break Time's Up!", "Let's get back to studying!", PlayerPrefs.GetInt("breakTime"));
 }