Example #1
0
 // If the submitted answer is correct, reset the riddle
 // Reference Victory and turn bool PlayerHasWon to true
 public void OnSubmitPressed()
 {
     if (mInputText.text.ToUpper() == dict[riddleNumber])
     {
         mInputText.text  = "";
         riddleNumber     = Random.Range(1, 5);
         mRiddleText.text = dict[riddleNumber];
         mVictory.PlayerHasWon(true);
         mTimer = GameObject.Find("Background Panel").GetComponent <Timer>();
         mTimer.ActivateCountdown(false);
     }
     else if (mInputText.text.ToUpper() != dict[riddleNumber])
     {
         mInputText.text = "";
     }
 }