public void Player(string playerId, OnUserDataResultDelegate <playerWr> callback) { WWWForm form = new WWWForm(); form.AddField("token", token); CallWWW_resultData_async("Player/" + playerId, form, callback, RequestType.Player); }
public void CancelQuest(string questId, string playerId, OnUserDataResultDelegate <cancelQuestWr> callback) { WWWForm form = new WWWForm(); form.AddField("token", token); form.AddField("player_id", playerId); CallWWW_resultData_async("Quest/" + questId + "/cancel", form, callback, RequestType.CancelQuest); }
public void Rule(string playerId, string action, OnUserDataResultDelegate <ruleWr> callback) { WWWForm form = new WWWForm(); form.AddField("token", token); form.AddField("player_id", playerId); form.AddField("action", action); CallWWW_resultData_async("Engine/rule", form, callback, RequestType.Rule); }
public void playerPublic(string playerId, OnUserDataResultDelegate <playerPublicWr> callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnPlayerPublicResult.userCallback = callback; _playerPublic(playerId, OnPlayerPublicResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("playerPublic", playerId, new OnPlayerPublicResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.PlayerPublic(playerId, callback); #endif }
public void pointOfPlayer(string playerId, string pointName, OnUserDataResultDelegate <pointRWr> callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnPointOfPlayerResult.userCallback = callback; _pointOfPlayer(playerId, pointName, OnPointOfPlayerResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("pointOfPlayer", playerId, pointName, new OnPointOfPlayerResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.PointOfPlayer(playerId, pointName, callback); #endif }
public void quizRandom(string playerId, OnUserDataResultDelegate <quizBasicWr> callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnQuizRandomResult.userCallback = callback; _quizRandom(playerId, OnQuizRandomResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("quizRandom", playerId, new OnQuizRandomResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.QuizRandom(playerId, callback); #endif }
public void quizPendingList(string playerId, int limit, OnUserDataResultDelegate <List <quizPendingWr> > callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnQuizPendingListResult.userCallback = callback; _quizPendingList(playerId, limit, OnQuizPendingListResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("quizPendingList", playerId, limit, new OnQuizPendingListResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.QuizPendingList(playerId, limit, callback); #endif }
public void rule(string playerId, string action, OnUserDataResultDelegate <ruleWr> callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnRuleResult.userCallback = callback; _rule(playerId, action, OnRuleResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("rule", playerId, action, new OnRuleResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.Rule(playerId, action, callback); #endif }
public void badges(OnUserDataResultDelegate <badgesWr> callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnBadgesResult.userCallback = callback; _badges(OnBadgesResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("badges", new OnBadgesResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.Badges(callback); #endif }
public void goodsInfoList(string playerId, OnUserDataResultDelegate <goodsInfoListWr> callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnGoodsInfoListResult.userCallback = callback; _goodsInfoList(playerId, OnGoodsInfoListResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("goodsInfoList", playerId, new OnGoodsInfoListResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.GoodsInfoList(playerId, callback); #endif }
public void questInfoList(OnUserDataResultDelegate <questInfoListWr> callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnQuestInfoListResult.userCallback = callback; _questInfoList(OnQuestInfoListResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("questInfoList", new OnQuestInfoListResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.QuestInfoList(callback); #endif }
public void missionInfo(string questId, string missionId, OnUserDataResultDelegate <missionInfoWr> callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnMissionInfoResult.userCallback = callback; _missionInfo(questId, missionId, OnMissionInfoResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("missionInfo", questId, missionId, new OnMissionInfoResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.MissionInfo(questId, missionId, callback); #endif }
public void questAvailableForPlayer(string questId, string playerId, OnUserDataResultDelegate <questAvailableForPlayerWr> callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnQuestAvailableForPlayerResult.userCallback = callback; _questAvailableForPlayer(questId, playerId, OnQuestAvailableForPlayerResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("questAvailableForPlayer", questId, playerId, new OnQuestAvailableForPlayerResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.QuestAvailableForPlayer(questId, playerId, callback); #endif }
public void cancelQuest(string questId, string playerId, OnUserDataResultDelegate <cancelQuestWr> callback) { #if UNITY_IOS || UNITY_STANDALONE_OSX && !DEBUG_DESKTOP OnCancelQuestResult.userCallback = callback; _cancelQuest(questId, playerId, OnCancelQuestResult.onDataResult); #elif UNITY_ANDROID playbasis.Call("cancelQuest", questId, playerId, new OnCancelQuestResult(callback)); #elif UNITY_STANDALONE_WIN || UNITY_STANDALONE_LINUX || DEBUG_DESKTOP this.DesktopNet.CancelQuest(questId, playerId, callback); #endif }
IEnumerator CallWWW_resultData_asyncCR <T>(string address, WWWForm data, OnUserDataResultDelegate <T> callback, RequestType type) where T : class { string fullAddress = BASE_URL + address + (address.Contains("?") ? "&" + apiKeyParam : "?" + apiKeyParam); Debug.Log("Making async request to " + fullAddress); WWW client = null; if (data != null) { client = new WWW(fullAddress, data.data, data.headers); yield return(client); } else { client = new WWW(fullAddress); yield return(client); } // if there was error then return immediately if (IsError(client)) { if (callback != null) { callback(null, 0); } } else { T dataReturn = null; int errorCode = 0; if (HandleRequest <T>(type, ref dataReturn, ref errorCode, client)) { if (callback != null) { callback <T>(dataReturn, -1); } } else { if (callback != null) { callback <T>(null, errorCode); } } } }
public static void dataResultCallback(OnUserDataResultDelegate <T> userCallback, IntPtr result, int errorCode) { if (result != IntPtr.Zero) { if (userCallback != null) { userCallback(onSuccess_user(result), -1); } } else { if (userCallback != null) { userCallback(new T(), errorCode); } } }
public OnCancelQuestResult(OnUserDataResultDelegate <cancelQuestWr> callback) : base(callback) { }
public OnQuizAnswerResult(OnUserDataResultDelegate <questionAnsweredWr> callback) : base(callback) { }
/// make async request for data type result private void CallWWW_resultData_async <T>(string address, WWWForm data, OnUserDataResultDelegate <T> callback, RequestType type) where T : class { MonoUtil.GetMainObj().StartCoroutine(CallWWW_resultData_asyncCR <T>(address, data, callback, type)); }
public OnQuizDoneListResult(OnUserDataResultDelegate <List <quizDoneWr> > callback) : base(callback) { }
public OnQuizPendingListResult(OnUserDataResultDelegate <List <quizPendingWr> > callback) : base(callback) { }
public OnBadgesResult(OnUserDataResultDelegate <badgesWr> callback) : base(callback) { }
public OnRuleResult(OnUserDataResultDelegate <ruleWr> callback) : base(callback) { }
public OnQuestInfoResult(OnUserDataResultDelegate <questInfoWr> callback) : base(callback) { }
public OnGoodsInfoListResult(OnUserDataResultDelegate <goodsInfoListWr> callback) : base(callback) { }
public OnMissionInfoResult(OnUserDataResultDelegate <missionInfoWr> callback) : base(callback) { }
public OnQuestInfoListForPlayerResult(OnUserDataResultDelegate <questInfoListWr> callback) : base(callback) { }
public OnQuestAvailableForPlayerResult(OnUserDataResultDelegate <questAvailableForPlayerWr> callback) : base(callback) { }
public OnJoinQuestResult(OnUserDataResultDelegate <joinQuestWr> callback) : base(callback) { }
public OnDataResult(OnUserDataResultDelegate <T> callback) : base("com.playbasis.android.playbasissdk.api.OnResult") { userCallback = callback; }