public void CheckResult() { //getting user's inputed digit from Text object typedDigit = int.Parse(usersInputText.text); if (IsCorrectAnswer()) { correctAnswersNum.ApplyChange(1); } else { wrongAnswersNum.ApplyChange(1); } //reset user's input typedDigit = -1; }
IEnumerator PoosDestroyCoinsExceptLast() { for (int i = pooID.Value; i >= 0; i--) { if (i > finishCondition.Value) //if there are more Poos than Coins { StartCoroutine(this.GetComponent <Poo>().DestroyPoo(i)); } else { yield return(new WaitForSeconds(0.3f)); //..pause between explodes StartCoroutine(this.GetComponent <Poo>().DestroyPoo(i)); if (correctAnswersNum.Value > 1) // ">1" because I need to explode all coins except last one { correctAnswersNum.ApplyChange(-1); } } } }