public void Ansclick(int BtNum) { if (BtNum == correctAns) { Debug.Log("정답"); audio.clip = o; audio.PlayOneShot(o); if (selectAns < 7) { selectAns++; AnsGenerator(); } else { Debug.Log("클리어"); SceneChange.BonusNextScene(true); } } else { Debug.Log("오답"); audio.clip = x; audio.PlayOneShot(x); SceneChange.BonusNextScene(false); } }
public void textInputEnter() { string inputWord = InputText.text; if (nowAns == inputWord) { Debug.Log("정답"); audio.clip = o; audio.PlayOneShot(o); if (selectAns == answerStr.Length - 1) //마지막 문제면 { Debug.Log("모든 문제를 다 풀었어요."); SceneChange.BonusNextScene(true); } // 마지막 문제면 씬이동 else //아니면 다음문제 { SeokbongCanvasAnimator.SetTrigger("correct"); selectAns++; AnsGenerator(); } } else { Debug.Log("오답"); audio.clip = x; audio.PlayOneShot(x); SceneChange.BonusNextScene(false); } InputText.text = ""; }