Update Question in Posttest and fix bug posttest

This commit is contained in:
Shavira 2025-06-13 07:34:41 +07:00
parent 26a7122dc3
commit 6060ffba28
4 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,26 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 31b9fba0680987640ade1fdf5d7d7a95, type: 3}
m_Name: Quis Penyakit Gigi 6
m_EditorClassIdentifier:
question: ' Mengapa menyikat lidah juga penting saat membersihkan gigi?
'
imageQuestion: {fileID: 0}
answers:
- Agar mulut terasa pedas
- Supaya pasta gigi habis
- Untuk menghilangkan kuman dan bau mulut
- Agar sikat gigi cepat rusak
answerIndex: 2
nextSceneName: Lv2HardB
isMateriKesehatanGigi: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 0f8e24a53f7a8e14c86b820e7c6ec65e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -533,6 +533,7 @@ MonoBehaviour:
- {fileID: 11400000, guid: cf180945f3f07674db927d80d5cf753b, type: 2}
- {fileID: 11400000, guid: 1d7b69d707647864ab532e1b83e7b05d, type: 2}
- {fileID: 11400000, guid: f29e5abc33b4c8b4ca27d8f994593548, type: 2}
- {fileID: 11400000, guid: 0f8e24a53f7a8e14c86b820e7c6ec65e, type: 2}
answerButtons:
- {fileID: 3167696787182021576}
- {fileID: 1646945078946373930}

View File

@ -122,7 +122,8 @@ public class PostTestMenu : Menu<PostTestMenu>
if (index == correctAnswerIndex)
{
correctAnswers++;
correctAnswers ++;
Debug.Log("Jawab Benar");
selectedImage.sprite = trueAnswerSprite;
questionText.text = "Jawaban Benar!";
}
@ -133,6 +134,7 @@ public class PostTestMenu : Menu<PostTestMenu>
}
saveData.postTestStatistik = (int)(((float)correctAnswers / totalQuestions) * 100f);
}
void ShowCorrectAnswer()