public void OnRightAnswerClick() { TopPanelManager.rightAnsw++; //Add score and trigger animation SharedScoreScript.Score += 10 + (int)CountDownTime; CorrectAnswerSelected(0); RightAnswerAnim.SetTrigger("RightAnswerAnim"); }
IEnumerator WrongQuestion() { SharedScoreScript.TotalScore += SharedScoreScript.Score; //Show right answer and AnswerAGO.GetComponent <Image>().color = Color.green; RightAnswerAnim.SetTrigger("RightAnswerAnim"); //disable buttons so they cannot be pressed while transitioning to new question AnswerAGO.GetComponent <Button>().enabled = false; AnswerBGO.GetComponent <Button>().enabled = false; AnswerCGO.GetComponent <Button>().enabled = false; AnswerDGO.GetComponent <Button>().enabled = false; yield return(new WaitForSeconds(1f)); //TODO show end score and restart button EndScreen.SetActive(true); AdsScript.adCount++; }