示例#1
0
    public void OnClick(int practice)
    {
        Practice PracticeEnum = (Practice)practice;

        GameStateManager.Instance.SelectPractice(PracticeEnum);
        UIMenuController.StaticLoadScene("RateScene");
    }
示例#2
0
    public void OpenFavoritePractice()
    {
        var practice = GameStateManager.Instance.GetFavoritePractice();

        GameStateManager.Instance.SelectPractice(practice);

        UIMenuController.StaticLoadScene("RateScene");
    }
    public void OnPlay()
    {
        var answers = new Dictionary <QuestionnaireQuestion, bool>();

        foreach (var question in GetComponentsInChildren <QuestionController>())
        {
            var toggle = question.GetComponent <Toggle>();
            answers.Add(question.question, toggle.isOn);
        }

        var practice = GameStateManager.Instance.GetQuestionnairePractice(answers);

        GameStateManager.Instance.SelectPractice(practice);
        UIMenuController.StaticLoadScene("RateScene");
    }
    public void OnClick()
    {
        var rate  = GameObject.FindGameObjectWithTag("Rate");
        int value = int.Parse(rate.GetComponent <Text>().text);

        if (GameStateManager.Instance.IsGameStarted)
        {
            GameStateManager.Instance.SaveGame(value);
            UIMenuController.StaticLoadScene("IntroScene");
        }
        else
        {
            GameStateManager.Instance.RateBeforeGame(value);
            UIMenuController.StaticLoadScene("TimerScene");
        }
    }
示例#5
0
    public void OnClick()
    {
        var selectedPractice = GameStateManager.Instance.GetPractice();

        switch (selectedPractice)
        {
        case Practice.Breathing:
            UIMenuController.StaticLoadScene("BreathingScene");
            break;

        case Practice.Collecting:
            UIMenuController.StaticLoadScene("RabbitJump");
            break;

        case Practice.Counting:
            UIMenuController.StaticLoadScene("CountSheeps");
            break;
        }
    }
示例#6
0
 void GameOver()
 {
     UIMenuController.StaticLoadScene("RateScene");
 }
示例#7
0
 public void OpenQuestionnaire()
 {
     UIMenuController.StaticLoadScene("Questionnaire");
 }
示例#8
0
 public void SelectPractice()
 {
     UIMenuController.StaticLoadScene("SelectPracticeScene");
 }