示例#1
0
    public void OnClickDayButton()
    {
        DOTween.KillAll();

        if (lockBG.activeSelf)
        {
            return;
        }
        if (this.GetComponent <CanvasGroup>().alpha <= 0)
        {
            Debug.Log("<color=red>Click " + daytextNew.buttonText + "</color>");
            return;
        }
        Debug.Log("<color=yellow>Click " + daytextNew.buttonText + "</color>");
        GameModeManager.SetDay(Int32.Parse(daytextNew.buttonText));

        string selectedGame = GameModeManager.GetGameType();

        if (selectedGame.Equals("OXGame"))
        {
            SceneManager.LoadScene("Scenes/OXScene");
        }
        else if (selectedGame.Equals("SentenceGame"))
        {
            SceneManager.LoadScene("Scenes/SentenceScene");
        }
        else if (selectedGame.Equals("StudyVocab"))
        {
            SceneManager.LoadScene("Scenes/StudyVocabScene");
        }
    }