Example #1
0
    public void ShowDaySelectPanel(string gameType)
    {
        GameModeManager.SetGameType(gameType);

        menubtnpanel.SetActive(false);

        int daybtnsize = GameModeManager.dayButtonSize;

        dselectpanel.GetComponent <DaySelectPanelController>().ResetDayButtons();
        dselectpanel.GetComponent <DaySelectPanelController>().ResetDayButtonCheck();
        dselectpanel.GetComponent <DaySelectPanelController>().ResetUnlockBGColor();
        string gametype = GameModeManager.GetGameType();

        if (gametype.Equals("StudyVocab"))
        {
            title.GetComponent <TitlePanelController>().SetTitle("단어 리스트");
            dselectpanel.GetComponent <DaySelectPanelController>().SetDayButtonsForStudyVocab();
        }
        else
        {
            if (gametype.Equals("OXGame"))
            {
                title.GetComponent <TitlePanelController>().SetTitle("OX 퀴즈");
            }
            else if (gametype.Equals("SentenceGame"))
            {
                title.GetComponent <TitlePanelController>().SetTitle("Sentence");
            }
            dselectpanel.GetComponent <DaySelectPanelController>().SetDayButtonUnlock(daybtnsize, gametype);
            dselectpanel.GetComponent <DaySelectPanelController>().SetDayButtonAlphaValue(daybtnsize);
            dselectpanel.GetComponent <DaySelectPanelController>().SetDayButtonCheck(daybtnsize, gametype);
        }

        dselectpanel.gameObject.SetActive(true);
    }
    void Start()
    {
        oxButton.onClick.AddListener(() =>
        {
            PrefabManager.Instance.ShowDaySelectPanel("OXGame");
            PrefabManager.Instance.SetBackButton("DaySelectMenu");
        });

        sentenceButton.onClick.AddListener(() =>
        {
            PrefabManager.Instance.ShowDaySelectPanel("SentenceGame");
            PrefabManager.Instance.SetBackButton("DaySelectMenu");
        });
        studyVocabButton.onClick.AddListener(() =>
        {
            PrefabManager.Instance.ShowDaySelectPanel("StudyVocab");
            PrefabManager.Instance.SetBackButton("DaySelectMenu");
        });
        myListButton.onClick.AddListener(() =>
        {
            GameModeManager.SetGameType("MyList");
            PrefabManager.Instance.SetBackButton("MainScene");
            PrefabManager.Instance.ShowMyListPanel();
        });
        mySentenceListButton.onClick.AddListener(() =>
        {
            GameModeManager.SetGameType("MySentenceList");
            PrefabManager.Instance.SetBackButton("MainScene");
            PrefabManager.Instance.ShowMySentenceListPanel();
        });
    }
Example #3
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();
        }
    }