public void PostScore(int _score, SuccessFailReturn _finishedEvent) { string url = SendScoreURL + "Username="******"&Password="******"&Score=" + _score; AddHashToURL(ref url, Username + Password + _score); StartCoroutine(SuccessFailRoutine(url, new SuccessFailReturn[] { _finishedEvent })); }
public void CreateAccount(string _username, string _password, SuccessFailReturn _finishedEvent) { string url = CreateAccountURL + "Username="******"&Password=" + _password; AddHashToURL(ref url, _username + _password); StartCoroutine(SuccessFailRoutine(url, new SuccessFailReturn[] { _finishedEvent })); }
public void RemoveFriend(string _friendName, SuccessFailReturn _finishedEvent) { string url = RemoveFriendURL + "Username="******"&Password="******"&Friend=" + _friendName; AddHashToURL(ref url, Username + Password + _friendName); StartCoroutine(SuccessFailRoutine(url, new SuccessFailReturn[] { _finishedEvent })); }
//Changes account password //@_newPassword: New account password //@_finishedEvent: Password change Callback public void ChangePassword(string _oldPassword, string _newPassword, SuccessFailReturn _finishedEvent) { cachedPendingPassword = _newPassword; string url = ChangePasswordURL + "Username="******"&Password="******"&NewPassword=" + _newPassword; AddHashToURL(ref url, Username + _oldPassword + _newPassword); StartCoroutine(SuccessFailRoutine(url, new SuccessFailReturn[] { OnPasswordChanged, _finishedEvent })); }
public void UpdateProfileInfo(string _greeting, int _displayPic, SuccessFailReturn _finishedEvent) { string url = UpdateProfileURL + "Username="******"&Password="******"&Greeting=" + _greeting + "&DisplayPic=" + _displayPic; AddHashToURL(ref url, Username + Password + _greeting + _displayPic); pendingProfileInfo = new NameValueCollection(); pendingProfileInfo.Add("Username", Username); pendingProfileInfo.Add("Greeting", _greeting); pendingProfileInfo.Add("DisplayPic", _displayPic.ToString()); StartCoroutine(SuccessFailRoutine(url, new SuccessFailReturn[] { _finishedEvent, UpdatedProfileInfo })); }
public void Login(string _username, string _password, SuccessFailReturn _finishedEvent) { if (LoggedIn) { _finishedEvent(false, new ErrorResult(-1, "Already Logged In")); return; } string url = LoginURL + "Username="******"&Password=" + _password; AddHashToURL(ref url, _username + _password); Username = _username; Password = _password; StartCoroutine(SuccessFailRoutine(url, new SuccessFailReturn[] { OnLoggedIn, _finishedEvent })); }