public void createSession() { txtTeamNaam.gameObject.SetActive(false); btnAddTeam.gameObject.SetActive(false); btnPostSessie.gameObject.SetActive(false); txtTeam.gameObject.SetActive(false); recapTeams.gameObject.SetActive(false); JSONNode N = new JSONObject(); N["startTijd"] = DateTime.Now.ToString(); for (int i = 0; i < aantalTeams; i++) { N["teams"][i]["teamNaam"] = teamNamen[i]; N["teams"][i]["TeamPositionId"] = i; N["teams"][i]["teamMode"] = 0; //Debug.Log(i + teamNamen[i]); } ////Debug.Log(N.AsObject); api.ApiPost("Sessie", N, CreateSessionCor); txtSessieCode.gameObject.SetActive(true); txtSessieInfo.gameObject.SetActive(true); btnJoinSessie.gameObject.SetActive(true); //StartCoroutine(CreateSessionCor()); //Debug.Log(response); }
void PostScore(int score) { JSONNode N = new JSONObject(); N["TeamID"] = Info.TeamId; N["score"] = score; Debug.Log("score " + score); api.ApiPost(url, N); }
void PostScore() { JSONNode N = new JSONObject(); N["TeamID"] = Info.TeamId; N["Score"] = CalculateScore(); Debug.Log("score " + CalculateScore()); api.ApiPost(url, N); }
public void TryAnswer() { btnTryAnswer.gameObject.SetActive(false); var N = new SimpleJSON.JSONObject(); N["teamID"] = Info.TeamId; N["answers"][0] = GameObject.Find("c1").GetComponent <color>().SelecctedColorId; N["answers"][1] = GameObject.Find("c2").GetComponent <color>().SelecctedColorId; N["answers"][2] = GameObject.Find("c3").GetComponent <color>().SelecctedColorId; N["answers"][3] = GameObject.Find("c4").GetComponent <color>().SelecctedColorId; _api.ApiPost("MasterMind/try", N, showResult); }
// Use this for initialization void Start() { _api = gameObject.AddComponent <APICaller>(); levelLoader = gameObject.AddComponent <LevelLoader>(); starttijd = DateTime.Now; _updating = false; btnTryAnswer.gameObject.SetActive(true); _api = gameObject.AddComponent <APICaller>(); JSONNode N = new JSONObject(); N["assignedTeamId"] = Info.TeamId; _api.ApiPost("MasterMind", N); }
void PostScore() { Debug.Log("poste " + score); JSONNode N = new JSONObject(); N["DeviceID"] = SystemInfo.deviceUniqueIdentifier; N["aantalvragen"] = aantalvragen; N["score"] = score; Debug.Log("aantalvragen " + aantalvragen + "score " + score); api.ApiPost("speler/" + Info.spelerId, N, GetTotalScore); // StartCoroutine(api.Get("team/" +Info.TeamId.ToString() + "/GameDone", GetActionEndGame)); }
public void OnClick() { Debug.Log("OnClick"); JSONNode N = new JSONObject(); N["voornaam"] = voornaam; N["achternaam"] = achternaam; N["deviceId"] = SystemInfo.deviceUniqueIdentifier.ToString(); Debug.Log(N); if (voornaam != "" && achternaam != "") { api.ApiPost(url, N); Debug.Log("posted"); button.interactable = true; } }
//public antwoord scripts; // Use this for initialization void Start() { _api = gameObject.AddComponent <APICaller>(); levelLoader = gameObject.AddComponent <LevelLoader>(); JSONNode N = new JSONObject(); N["teamID"] = Info.TeamId; N["itemCount"] = itemCount; _api.ApiPost("FTD", N); starttijd = DateTime.Now; /* * itemCount = items.transform.childCount; * foundItems = new int[itemCount]; * for(int i= 0; i < itemCount; i++) * { * foundItems[i] = 0; * } */ }