Ejemplo n.º 1
0
 void shufflePossibleAnswersMCQ(PossibleAnswer[] possibleAnswers)
 {
     //for mcq, make sure only one answer is selected ...
     for (int t = 0; t < possibleAnswers.Length; t++)
     {
         PossibleAnswer tmp = possibleAnswers[t];
         int            r   = Random.Range(t, possibleAnswers.Length);
         possibleAnswers[t] = possibleAnswers[r];
         possibleAnswers[r] = tmp;
     }
 }
Ejemplo n.º 2
0
 void AddClickEventLogic(GameObject answerPanel, PossibleAnswer answer)
 {
     //add custom data to the button ...
     answerPanel.AddComponent <CustomObjectData>().possibleAnswer = answer;
 }
Ejemplo n.º 3
0
 void SetAnswerText(GameObject answerPanel, PossibleAnswer answer)
 {
     answerPanel.GetComponentInChildren <TextMesh>().text = CreatePanelText(answer.answer);
 }