示例#1
0
    private void UpdatePanel()
    {
        nextLesson.interactable = true;
        prevLesson.interactable = true;

        if (GameMng.selectedLessonIndex == 1)
        {
            prevLesson.interactable = false;
        }

        if (GameMng.selectedLessonIndex == GameMng.GetLastOpenLesson(GameMng.selectedCategory))
        {
            nextLesson.interactable = false;
        }

        lessonNumber.text = 3 + " / " + GameMng.selectedLessonIndex.ToString();
        lessonScore.text  = GameMng.GetLessonBestScore(GameMng.selectedCategory, GameMng.selectedLessonIndex) + "/" + 30;

        List <ScoreHistory> scoreList = Setting.GetHistory(GameMng.selectedCategory.ToString(), GameMng.selectedLessonIndex);
        List <int>          valueList = new List <int>();

        valueList.Add(0);
        foreach (var item in scoreList)
        {
            valueList.Add(item.score);
        }
        graph.ShowGraph(valueList, GraphVisualType.LineGraph);
    }
 private void CheckIsOpen()
 {
     if (GameMng.GetLastOpenLesson(myCategory.questionType) == 0)
     {
         myButton.interactable = false;
     }
     else
     {
         myButton.interactable = true;
     }
 }
示例#3
0
    private void CheckOpenNextCategory()
    {
        int currentCategoryIndex = (int)GameMng.selectedCategory;

        if (currentCategoryIndex < GameMng.lastCategoryIndex)
        {
            int nextCategoryIndex = currentCategoryIndex + 1;

            if (GameMng.GetLastOpenLesson((QuestionType)nextCategoryIndex) == 0)
            {
                StartCoroutine(ShowOpenedCategoryMessage((QuestionType)nextCategoryIndex));
                GameMng.SetLastOpenLesson((QuestionType)nextCategoryIndex, 1);
                //TODO:Sound
            }
        }
    }
示例#4
0
 public void Show()
 {
     myPanel.Show();
     GameMng.selectedLessonIndex = GameMng.GetLastOpenLesson(GameMng.selectedCategory);
     UpdatePanel();
 }