|
|
@@ -592,8 +592,8 @@ public class OnlineDatabase : MonoBehaviour {
|
|
|
form.AddField("userName", playerName);
|
|
|
|
|
|
string response = CallOnlineDatabaseWithResponse("OnlineGameInfo.php", form);
|
|
|
- response = "{\"questionsList\" : [ " + response + " ]}";
|
|
|
-
|
|
|
+ response = "{\"questionsList\" : [" + response + "]}";
|
|
|
+
|
|
|
Questions ql = new Questions();
|
|
|
|
|
|
JsonUtility.FromJsonOverwrite(response, ql);
|
|
|
@@ -611,6 +611,21 @@ public class OnlineDatabase : MonoBehaviour {
|
|
|
|
|
|
questions.Add(qc);
|
|
|
}
|
|
|
+
|
|
|
+ /*
|
|
|
+
|
|
|
+ q.SetAnswerText(reader.GetInt32(2).ToString());
|
|
|
+ q.SetQuestionText(reader.GetString(1));
|
|
|
+ q.idString = reader.GetInt32(0).ToString();
|
|
|
+ Color32 questionCategoryColor = new Color32((byte)reader.GetInt32(7), (byte)reader.GetInt32(8), (byte)reader.GetInt32(9), (byte)reader.GetInt32(10));
|
|
|
+
|
|
|
+ q.SetQuestionCategoryColor(questionCategoryColor);
|
|
|
+
|
|
|
+ questions.Add(q);
|
|
|
+
|
|
|
+
|
|
|
+ */
|
|
|
+ // TODO Fix online call to question
|
|
|
return questions;
|
|
|
}
|
|
|
|