public IEnumerator CloseLeaderboard(string leaderBoardId, IGLBoolResult onCloseLeaderboard, params object[] userParam) { string errorString = ""; bool result = false; Dictionary<string, string> paramters = new Dictionary<string, string>(); paramters.Add("developerUserId", m_DeveloperId); paramters.Add("integrationKey", m_IntegrationKey); paramters.Add("leaderboardId", leaderBoardId); WWW w = POST(GetUrl("CloseLeaderboard"), ref paramters); yield return w; if (string.IsNullOrEmpty(w.error)) { if (!string.IsNullOrEmpty(w.text)) { result = ToBooleanResult(w.text, ref errorString); } } else { errorString = w.error; } onCloseLeaderboard(errorString, result, userParam); }
public IEnumerator BulkCloseLeaderboardsInLevel(string levelId, double durationInMinutes, IGLBoolResult BulkCloseLeaderboardsInLevel, params object[] userParam) { string errorString = ""; bool result = false; Dictionary<string, string> paramters = new Dictionary<string, string>(); paramters.Add("developerUserId", m_DeveloperId); paramters.Add("integrationKey", m_IntegrationKey); paramters.Add("levelId", levelId); paramters.Add("durationInMinutes", durationInMinutes.ToString()); WWW w = POST(GetUrl("BulkCloseLeaderboardsInLevel"), ref paramters); yield return w; if (string.IsNullOrEmpty(w.error)) { if (!string.IsNullOrEmpty(w.text)) { result = ToBooleanResult(w.text, ref errorString); } } else { errorString = w.error; } BulkCloseLeaderboardsInLevel(errorString, result, userParam); }
public IEnumerator ValidateParticipation(string userName, string participationKey, string leaderBoardId, IGLBoolResult onAcceptPlayerParticipation, params object[] userParam) { string errorString = ""; bool result = false; Dictionary<string, string> paramters = new Dictionary<string, string>(); paramters.Add("developerUserId", m_DeveloperId); paramters.Add("integrationKey", m_IntegrationKey); paramters.Add("playerUserId", userName); paramters.Add("participationKey", participationKey); paramters.Add("leaderboardId", leaderBoardId); WWW w = POST(GetUrl("ValidateParticipation"), ref paramters); yield return w; if (string.IsNullOrEmpty(w.error)) { if (!string.IsNullOrEmpty(w.text)) { result = ToBooleanResult(w.text, ref errorString); } } else { errorString = w.error; } onAcceptPlayerParticipation(errorString, result, userParam); }
public IEnumerator UpdatePlayerScore( string userName, string participationKey, string leaderBoardId, double score, bool updateIfBetterThanPrevious, IGLBoolResult onUpdatePlayerScoreFn, params object[] userParams) { string errorString = ""; bool result = false; Dictionary<string, string> paramters = new Dictionary<string, string>(); paramters.Add("developerUserId", m_DeveloperId); paramters.Add("integrationKey", m_IntegrationKey); paramters.Add("playerUserId", userName); paramters.Add("participationKey", participationKey); paramters.Add("leaderboardId", leaderBoardId); paramters.Add("score", score.ToString()); paramters.Add("updateIfBetterThanPrevious", updateIfBetterThanPrevious.ToString()); WWW w = POST(GetUrl("UpdatePlayerScore"), ref paramters); yield return w; if (string.IsNullOrEmpty(w.error)) { if (!string.IsNullOrEmpty(w.text)) { result = ToBooleanResult(w.text, ref errorString); } } else { errorString = w.error; } onUpdatePlayerScoreFn(errorString, result, userParams); }
public IEnumerator IsVoucherProgramAvailable(string voucherProgramRefId, IGLBoolResult onIsVoucherProgramAvailable, params object[] userParam) { string errorString = ""; bool result = false; Dictionary<string, string> paramters = new Dictionary<string, string>(); paramters.Add("donorUserName", m_DeveloperId); paramters.Add("donorPassword", m_IntegrationKey); paramters.Add("voucherProgramRefId", voucherProgramRefId); WWW w = POST(GetUrl("IsVoucherProgramAvailable"), ref paramters); yield return w; if (string.IsNullOrEmpty(w.error)) { if (!string.IsNullOrEmpty(w.text)) { result = ToBooleanResult(w.text, ref errorString); } } else { errorString = w.error; } onIsVoucherProgramAvailable(errorString, result, userParam); }
public IEnumerator IsActivePlayer(string userName, IGLBoolResult onIsActivePlayer, params object[] userParam) { string errorString = ""; bool result = false; Dictionary<string, string> paramters = new Dictionary<string, string>(); paramters.Add("developerUserId", m_DeveloperId); paramters.Add("integrationKey", m_IntegrationKey); paramters.Add("playerUserId", userName); WWW w = POST(GetUrl("IsActivePlayer"), ref paramters); yield return w; if (string.IsNullOrEmpty(w.error)) { if (!string.IsNullOrEmpty(w.text)) { result = ToBooleanResult(w.text, ref errorString); } } else { errorString = w.error; } onIsActivePlayer(errorString, result, userParam); }