void OnRoarFetchFriendsComplete(Roar.CallbackInfo <IDictionary <string, Roar.DomainObjects.Friend> > info) { whenLastFetched = Time.realtimeSinceStartup; networkActionInProgress = false; isFetching = false; friendsDict = info.data; }
void OnRoarFetchLeaderboardComplete(Roar.CallbackInfo <Roar.Components.ILeaderboards> info) { //TODO: Handle errors! leaderboard = info.data.GetLeaderboard(leaderboardId, page); isFetchingRankings = false; networkActionInProgress = false; }
void OnRoarLoginComplete(Roar.CallbackInfo <Roar.WebObjects.User.LoginResponse> info) { if (Debug.isDebugBuild) { Debug.Log(string.Format("OnRoarLoginComplete ({0}): {1}", info.code, info.msg)); if (info.data != null) { Debug.Log(string.Format("OnRoarLoginComplete got auth_token {0}", info.data.auth_token)); Debug.Log(string.Format("OnRoarLoginComplete got player_id {0}", info.data.player_id)); } else { Debug.Log("OnRoarLogingComplete got null data"); } } switch (info.code) { case IWebAPI.OK: // (success) // fetch the player's properties after successful login networkActionInProgress = false; break; case 3: // Invalid name or password default: //isError = true; status = info.msg; networkActionInProgress = false; break; } }
void OnRoarFacebookLoginComplete(Roar.CallbackInfo <Roar.WebObjects.Facebook.LoginOauthResponse> info) { if (Debug.isDebugBuild) { Debug.Log(string.Format("OnRoarLoginComplete ({0}): {1}", info.code, info.msg)); if (info.data != null) { Debug.Log(string.Format("OnRoarLoginComplete got auth_token {0}", info.data.auth_token)); Debug.Log(string.Format("OnRoarLoginComplete got player_id {0}", info.data.player_id)); } else { Debug.Log("OnRoarLogingComplete got null data"); } } switch (info.code) { case IWebAPI.OK: // (success) networkActionInProgress = false; break; case 3: // Invalid name or password default: status = info.msg; networkActionInProgress = false; break; } }
void OnRoarFacebookBindComplete(Roar.CallbackInfo <Roar.WebObjects.Facebook.BindOauthResponse> info) { if (Debug.isDebugBuild) { Debug.Log(string.Format("OnRoarBindComplete ({0}): {1}", info.code, info.msg)); if (info.data != null) { } else { Debug.Log("OnRoarBindComplete got null data"); } } switch (info.code) { case IWebAPI.OK: // (success) this.enabled = false; // fetch the player's properties after successful login networkActionInProgress = false; break; case 3: // Invalid name or password status = info.msg; break; default: status = info.msg; networkActionInProgress = false; break; } }
void OnRoarFetchGiftsComplete(Roar.CallbackInfo <IDictionary <string, Roar.DomainObjects.MailPackage> > info) { whenLastFetched = Time.realtimeSinceStartup; networkActionInProgress = false; isFetching = false; mailDict = info.data; Debug.Log("acceptable gifts count " + mailDict.Count); }
void OnRoarPropertiesFetched(Roar.CallbackInfo <IDictionary <string, Roar.DomainObjects.PlayerAttribute> > info) { networkActionInProgress = false; if (OnFullyLoggedIn != null) { OnFullyLoggedIn(); } }
static void onShopFetch(Roar.CallbackInfo <IDictionary <string, Roar.DomainObjects.ShopEntry> > info) { Debug.Log("onShopFetch Called"); Debug.Log(info); Debug.Log(info.code); Debug.Log(info.msg); Debug.Log(info.data); }
void OnRoarInventoryConsumeComplete(Roar.CallbackInfo <Roar.WebObjects.Items.UseResponse> data) { networkActionInProgress = false; if (data.code == WebAPI.OK) { Fetch(); } }
public void OnRoarUserInfoComplete(Roar.CallbackInfo <Roar.WebObjects.Info.UserResponse> info) { if (info.code == WebAPI.OK) { networkActionInProgress = false; playerInfo = info.data.player; LoadPropertyData(); } }
static void onLogin(Roar.CallbackInfo <Roar.WebObjects.User.LoginResponse> info) { Debug.Log("onLogin Called"); Debug.Log(info); Debug.Log(info.code); Debug.Log(info.msg); Debug.Log(info.data); IRoar roar = DefaultRoar.Instance; roar.Shop.Fetch(onShopFetch); }
void OnRoarFacebookFetchOauthTokenComplete(Roar.CallbackInfo <Roar.WebObjects.Facebook.FetchOauthTokenResponse> info) { if (info.code == IWebAPI.OK) { Debug.Log("oauth fetched successfully"); networkActionInProgress = false; } else { networkActionInProgress = false; status = "Error, " + info.msg; } }
void OnRoarFriendsDeclineInvite(Roar.CallbackInfo <Roar.WebObjects.Friends.DeclineResponse> data) { if (data.code == WebAPI.OK) { friendsInviteList.Remove(inviteManipulated); networkActionInProgress = false; statusString = "Invite sent successfully!"; } else { networkActionInProgress = false; statusString = "Invite sending failed. " + data.msg; } }
void OnRoarFriendsRemove(Roar.CallbackInfo <Roar.WebObjects.Friends.RemoveResponse> data) { if (data.code == WebAPI.OK) { networkActionInProgress = false; statusString = "Friend removed successfully!"; Fetch(); } else { networkActionInProgress = false; statusString = "Friend remove failed. " + data.msg; } }
void onRoarGiftsGiftAccepted(Roar.CallbackInfo <Roar.WebObjects.Mail.AcceptResponse> data) { networkActionInProgress = false; if (data.code == IWebAPI.OK) { section = Section.Normal; statusString = "Gift accepted successfully!"; Debug.Log("gift accepted " + data.msg); } else { statusString = "Gift acceptance Failed, Reason: " + data.msg; Debug.Log("gift accepted " + data.msg); } }
void onRoarGiftsGiftSent(Roar.CallbackInfo <Roar.WebObjects.Mail.SendResponse> data) { networkActionInProgress = false; if (data.code == IWebAPI.OK) { statusString = "Gift sent succcessfully!"; Debug.Log("Gift sent " + data.msg); selectedMailable = null; } else { statusString = "Gift sending failed. Reason: " + data.msg; Debug.Log("Gift sent " + data.msg); } }
void OnRoarFriendsSendInvite(Roar.CallbackInfo <Roar.WebObjects.Friends.InviteResponse> data) { if (data.code == WebAPI.OK) { networkActionInProgress = false; statusString = "Invite sent successfully!"; messageToSend = ""; currentSection = Section.Normal; } else { networkActionInProgress = false; statusString = "Invite sending failed. " + data.msg; } }
void OnRoarFetchShopComplete(Roar.CallbackInfo <IDictionary <string, Roar.DomainObjects.FacebookShopEntry> > info) { whenLastFetched = Time.realtimeSinceStartup; isFetching = false; shopEntries = facebook.List(); errorMessages = new List <string>(); if (info.code != IWebAPI.OK) { Debug.Log(string.Format("Error loading shop:{0}:{1}", info.code, info.msg)); FlashError(info.msg); //This updates the scroll bounds. return; } CalculateScrollBounds(); }
void OnRoarFetchListInvitesComplete(Roar.CallbackInfo <Roar.WebObjects.Friends.ListInvitesResponse> info) { if (info.code == WebAPI.OK) { whenLastFetched = Time.realtimeSinceStartup; networkActionInProgress = false; isFetching = false; friendsInviteList = info.data.invites; } else { networkActionInProgress = false; isFetching = false; statusString = "Fetch failed. " + info.msg; } }
void OnRoarAccountCreateComplete(Roar.CallbackInfo <Roar.WebObjects.User.CreateResponse> info) { if (Debug.isDebugBuild) { Debug.Log(string.Format("OnRoarAccountCreateComplete ({0}): {1}", info.code, info.msg)); } switch (info.code) { case IWebAPI.OK: // (success) status = "Account successfully created. You can now log in."; break; case 3: default: status = info.msg; break; } networkActionInProgress = false; }
void OnRoarFetchLeaderboardsComplete(Roar.CallbackInfo <Roar.Components.ILeaderboards> cache) { networkActionInProgress = false; whenLastFetched = Time.realtimeSinceStartup; isFetching = false; leaderboards = boards.BoardList(); // set default labels foreach (LeaderboardInfo leaderboard in leaderboards) { if (string.IsNullOrEmpty(leaderboard.label)) { leaderboard.label = string.Format("Leaderboard{0} - {1}", leaderboard.board_id, leaderboard.ikey); } } ScrollViewContentHeight = leaderboards.Count * (leaderboardItemBounds.height + leaderboardItemSpacing); OnLeaderboardsFetchedComplete(); }
void OnRoarFacebookLoginComplete(Roar.CallbackInfo <Roar.WebObjects.Facebook.LoginOauthResponse> info) { if (Debug.isDebugBuild) { Debug.Log(string.Format("OnRoarLoginComplete ({0}): {1}", info.code, info.msg)); if (info.data != null) { Debug.Log(string.Format("OnRoarLoginComplete got auth_token {0}", info.data.auth_token)); Debug.Log(string.Format("OnRoarLoginComplete got player_id {0}", info.data.player_id)); } else { Debug.Log("OnRoarLogingComplete got null data"); } } switch (info.code) { case IWebAPI.OK: // (success) // fetch the player's properties after successful login this.enabled = false; if (fetchPropertiesOnLogin) { DefaultRoar.Instance.Properties.Fetch(OnRoarPropertiesFetched); } else { networkActionInProgress = false; } break; case 3: // Invalid name or password default: status = info.msg; networkActionInProgress = false; break; } }
public void OnRequest(Roar.RequestResult info) { Prologue(); if (info.code != IWebAPI.OK) { if (cb_ != null) { cb_.OnError(info); } OnFailure(info); } else { T result_data = converter_.Build(info.data); Roar.CallbackInfo <T> result = new Roar.CallbackInfo <T> (result_data, info.code, info.msg); if (cb_ != null) { cb_.OnSuccess(result); } OnSuccess(result); } Epilogue(); }
void OnRoarFacebookCreateComplete(Roar.CallbackInfo <Roar.WebObjects.Facebook.CreateOauthResponse> info) { switch (info.code) { case IWebAPI.OK: // (success) this.enabled = false; // fetch the player's properties after successful login if (fetchPropertiesOnLogin) { DefaultRoar.Instance.Properties.Fetch(OnRoarPropertiesFetched); } else { networkActionInProgress = false; } break; case 3: // Invalid name or password default: status = info.msg; networkActionInProgress = false; break; } }
public void OnSuccess(Roar.CallbackInfo <DT> info) { model.isServerCalling = false; model.logger.DebugLog("onFetch got given: " + info.data.ToString()); model.ProcessData(info.data, cb); }
void OnRoarFetchTasksComplete(Roar.CallbackInfo <IDictionary <string, Roar.DomainObjects.Task> > data) { isFetching = false; }
public virtual void OnSuccess(Roar.CallbackInfo <T> info) { }
protected void OnBuyComplete( CallbackInfo<Roar.WebObjects.Shop.BuyResponse> response ) { isBuying = false; if( response.code!=WebAPI.OK ) { FlashError( response.msg ); } }
void OnRoarFetchTasksComplete(Roar.CallbackInfo <IDictionary <string, Roar.DomainObjects.Task> > data) { networkActionInProgress = false; isFetching = false; }
void OnRoarFetchMailableGiftsComplete(Roar.CallbackInfo <IDictionary <string, Roar.DomainObjects.Mailable> > info) { networkActionInProgress = false; mailableDict = info.data; Debug.Log("sendable gifts count " + mailableDict.Count); }
void OnRoarFetchInventoryComplete(Roar.CallbackInfo <IDictionary <string, Roar.DomainObjects.InventoryItem> > data) { networkActionInProgress = false; isFetching = false; }