// void acakSoal(){ // for(int i = 0; i < soal.Length ; i++){ // string temp = soal[i]; // string temp2 = jawaban[i]; // int indexPenukar = Random.Range(i, soal.Length); // soal[i] = soal[indexPenukar]; // soal[indexPenukar] = temp; // jawaban[i] = jawaban[indexPenukar]; // jawaban[indexPenukar] = temp2; // } // } protected virtual void jawabSoal() { if (jawabanUser.text == jawaban.ToString()) { kancil.lompatMovement(); rightAnswer.Play(); kancil.lompatAnimation(); progres++; nextSoal(); } else if (progres == 10) { menang(); } else { textStatus.text = "Salah Menjawab"; jawabanUser.text = ""; wrongAnswer.Play(); // Time.timeScale = 0; } }
void jawabSoal() { if (jawabanUser.text == jawaban[indexSoal]) { progres++; kancil.lompatMovement(); rightAnswer.Play(); kancil.lompatAnimation(); nextSoal(); } else if (progres == 10) { menang(); } else { textStatus.text = "Salah Menjawab"; jawabanUser.text = ""; wrongAnswer.Play(); // Time.timeScale = 0; } }