Exemple #1
0
    void SetStudyVocabPanel()
    {
        OX_DataLoader.ClearData();
        GameModeManager.SetQuestionSize(100);
        OX_DataLoader.PrepareOriginalData();
        OX_DataLoader.OX_InitWordList();

        foreach (var p in OX_DataLoader.GetWordList())
        {
            string vocab = p.Key;
            //string desc = p.Value.Key;
            string desc = p.Value.Value[(int)OX_DataLoader.Index.answer].Trim();
            var    r    = Instantiate(PrefabManager.Instance.oxresultItem);
            {
                r.GetComponent <ResultItem>().SetVocabDescForStudy(vocab, desc);
                r.GetComponent <ResultItem>().SetViewPort(viewPort);
                r.transform.SetParent(content, false);

                r.GetComponent <ResultItem>().SetEmptyStar();
                if (UserDataManager.Instance.IsVocabExist(vocab))
                {
                    r.GetComponent <ResultItem>().SetStar();
                }

                SetPreVocab(vocab, r.transform);
            }
        }
    }
Exemple #2
0
    public void SetCanvas()
    {
        var s = SceneManager.GetActiveScene();

        if (s.name.Equals("OXScene"))
        {
            uicanvas = GameObject.Find("Canvas");
            GameModeManager.SetGameType("OXGame");
            GameModeManager.SetGameFinished(false);
            GameModeManager.SetQuestionSize(ox_testSize);
            SetBackButton("MainScene");
            InitOXScene();
        }
        else if (s.name.Equals("SentenceScene"))
        {
            uicanvas = GameObject.Find("Canvas");
            GameModeManager.SetGameType("SentenceGame");
            GameModeManager.SetGameFinished(false);
            GameModeManager.SetQuestionSize(sentence_testSize);
            SetBackButton("MainScene");
            InitSentenceScene();
        }
        else if (s.name.Equals("ResultScene"))
        {
            uicanvasResult = GameObject.Find("Canvas");
            InitResultScene();
        }
        else if (s.name.Equals("MenuScene"))
        {
            uicanvas = GameObject.Find("Canvas");
            InitMenuScene();
        }
        else if (s.name.Equals("StudyVocabScene"))
        {
            uicanvasResult = GameObject.Find("Canvas");
            InitStudyVocabScene();
        }
        else if (s.name.Equals("MyListScene"))
        {
            GameModeManager.SetGameType("MyList");
            uicanvasResult = GameObject.Find("Canvas");
            InitMyListScene();
        }
        else if (s.name.Equals("MySentenceListScene"))
        {
            GameModeManager.SetGameType("MySentenceList");
            uicanvasResult = GameObject.Find("Canvas");
            InitMySentenceListScene();
        }
    }
Exemple #3
0
 void SetRadioButtonForQuestionSelect(string s)
 {
     if (s.Contains("50"))
     {
         timeAttackBtn.GetComponent <RadioButtonController>().selectBtn.SetActive(true);
         turnBaseBtn.GetComponent <RadioButtonController>().selectBtn.SetActive(false);
         GameModeManager.SetQuestionSize(50);
     }
     else if (s.Contains("100"))
     {
         timeAttackBtn.GetComponent <RadioButtonController>().selectBtn.SetActive(false);
         turnBaseBtn.GetComponent <RadioButtonController>().selectBtn.SetActive(true);
         GameModeManager.SetQuestionSize(100);
     }
 }