public void LoadNextArray() { if (currentWordIndex + 1 < gameLength) //avoid range out of bounds { currentWordIndex++; wordText.text = wordsArrayRand[currentWordIndex].name; } else //once end of questions show end screen { //finished screen CallFade(reviewCanvasGroup); buttonCanvasGroup.interactable = false; buttonCanvasGroup.blocksRaycasts = false; rewardScript.AddReward(); } }
public void LoadNextFace() { //reset isCorrect to true isCorrect = true; if (currentQuestion < faceArrayRand.Length - 1) { currentQuestion += 1; } else { //add reward then load home screen rewardScript.AddReward(); sceneHandleScript.OpenScene("Home"); } SetCorrectID(); SetPrompt(prompt); foreach (GameObject face in faceGameObjects) { face.GetComponent <SetFace>().SetRandomSprite(); } }