示例#1
0
    public void CheckWord(string s)
    {
        int i = string.Compare(s, ActiveWord, true);

        Debug.Log("CheckWord");
        if (i == 0)
        {
            Debug.Log("Word Correct");
            //_getWordScript.DisplayWord();
            StartCoroutine("DisplayWord");
            _scoreManangerScript.AddCorrect();
        }
        else
        {
            Debug.Log("Word is Wrong");
            _gallowManangerScript.UpdateGraphics();
            _inputManangerScript.ClearInputFields();
        }
    }
示例#2
0
    public void GuessLetter()
    {
        if (Input.GetButtonDown("Submit"))
        {
            string s = LetterInputField.text;
            bool   b = _getWordScript.CheckLetter(s);

            if (b)
            {
                Debug.Log("Correct");
                //TODO: Add effects and sounds
                _getWordScript.CheckLetterWord();
            }
            else
            {
                Debug.Log("Wrongs");
                //TODO: Add effects and sounds
                WrongLetterText.text += s + "  ";
                _gallowManangerScript.UpdateGraphics();
            }
            LetterInputField.text = "";
        }
    }