Esempio n. 1
0
 //For both hike and clearwords, need to clear away selected words
 public void HikeButtonClick()
 {
     //Let InputController know not to respond to click event
     EventManager.TriggerEvent("ButtonClick", gameObject);
     if (wordData.IsWordValid(currentWordText.text.ToLower()))
     {
         messageText.text = "Correct!";
         //Important that all correct word events happen before selected is cleared
         EventManager.TriggerEvent("CorrectWordEntered", gameObject);
     }
     else
     {
         currentState     = State.IncorrectAnswer;
         messageText.text = "Invalid Word";
         EventManager.TriggerEvent("IncorrectWordEntered", gameObject);
     }
 }