|
|
@@ -25,8 +25,11 @@ public class OnlineDatabase : MonoBehaviour {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- internal List<CategoryPanel.Category> GetCategories(List<CategoryPanel.Category> list) {
|
|
|
- string response = CallOnlineDatabaseWithResponse("Categories.php", null);
|
|
|
+ internal List<CategoryPanel.Category> GetCategories(List<CategoryPanel.Category> list, int gameId) {
|
|
|
+ WWWForm form = new WWWForm();
|
|
|
+ form.AddField("gameId", gameId);
|
|
|
+
|
|
|
+ string response = CallOnlineDatabaseWithResponse("Categories.php", form);
|
|
|
|
|
|
response = "{\"categoryList\" : " + response + " }";
|
|
|
|
|
|
@@ -495,7 +498,7 @@ public class OnlineDatabase : MonoBehaviour {
|
|
|
public NewQuestionData GetNewQuestion(List<int> userAnsweredQuestions, string userName) {
|
|
|
int gameId = GameObject.Find("GameManager").GetComponent<GameManagerScript>().GameId;
|
|
|
|
|
|
- Question q = GetQuestionData(false);
|
|
|
+ Question q = GetQuestionData(gameId);
|
|
|
|
|
|
Color32 categoryColor = new Color32((byte)q.r, (byte)q.g, (byte)q.b, (byte)q.a);
|
|
|
// Color32 questionCategoryColor = new Color32((byte)q.r, (byte)q.g, (byte)q.b, (byte)q.a);
|
|
|
@@ -554,8 +557,9 @@ public class OnlineDatabase : MonoBehaviour {
|
|
|
return questions;
|
|
|
}
|
|
|
|
|
|
- private Question GetQuestionData(bool showAnswer) {
|
|
|
+ private Question GetQuestionData(int gameId) {
|
|
|
WWWForm form = new WWWForm();
|
|
|
+ form.AddField("gameId", gameId);
|
|
|
|
|
|
string response = CallOnlineDatabaseWithResponse("Question.php", form);
|
|
|
|