IEnumerator CloseRetoC() { string id = openReto.id.ToString(); string userID = openReto.userID.ToString(); string userID2 = openReto.userID2.ToString(); string score = openReto.score.ToString(); string score2 = openReto.score2.ToString(); string hash = Utils.Md5Sum(id + secretKey); string post_url = closeRetoURL + "?id=" + id; post_url += "&userID=" + userID + "&userID2=" + userID2; post_url += "&score=" + score + "&score2=" + score2; post_url += "&hash=" + hash; print(post_url); WWW www = new WWW(post_url); yield return(www); if (www.error != null) { Events.OnPopup("There was an error: " + www.error); } else { string result = www.text; Events.OnPopup("Reto cerrado " + www.text); retosContent.all.Remove(openReto); openReto = new RetoData(); UserData.Instance.UpdateData(); } yield return(null); }
public void PlayReto(RetoData data) { Events.OnSoundFX("ui"); Data.Instance.retosManager.SetOpenReto(data); Data.Instance.triviaData.Load(data.tag_id); LoadScreen(2, true); }
void AddButton(RetoData data) { RetoLine b = Instantiate(button); b.transform.SetParent(container); b.Init(this, data); b.transform.localScale = Vector3.one; }
public override void OnEnabled() { RetoData openRetoData = Data.Instance.retosManager.openReto; if (openRetoData.userID == "") { vsPanel.SetActive(false); } else { vsPanel.SetActive(true); vsUsername.text = openRetoData.username; } field.text = Data.Instance.triviaData.triviaName.ToUpper(); }
public void SetOpenReto(RetoData openReto) { this.openReto = openReto; }
public void Init(RetosUI ui, RetoData data) { this.ui = ui; this.data = data; LoadData(); }