private void Submit() { if (emailField.text.Length > 0 && passwordField.text.Length > 0) { submitButton.interactable = false; message.text = "Contacting Server..."; WWWForm form = WWWFormUtility.GetLoginForm(emailField.text, passwordField.text); StartCoroutine(Login(form)); } }
private IEnumerator GetProfile() { WWWForm loginForm = WWWFormUtility.GetLoginForm(UserDataManager.userData.User); WWW loginResponse = new WWW(WWWFormUtility.getProfileURL, loginForm); yield return(loginResponse); if (loginResponse.error == null) { if (ReadProfileResponse(loginResponse.text)) { FillProfileData(); StartCoroutine(GetLastGameData()); } } else { waitScreen.SetMessage(loginResponse.error); } }
private IEnumerator GetLastGameData() { WWWForm loginForm = WWWFormUtility.GetLoginForm(UserDataManager.userData.User); WWW gameDataResponse = new WWW(WWWFormUtility.getLastGameURL, loginForm); yield return(gameDataResponse); if (gameDataResponse.error == null) { if (ReadGameResponse(gameDataResponse.text)) { FillLastGameData(); waitScreen.Disable(); } } else { waitScreen.Disable(); } }