/// <summary> /// Loads the leaderboard data. This is the "top level" call /// to load leaderboard data. A token for fetching scores is created /// based on the parameters. /// </summary> /// <param name="leaderboardId">Leaderboard identifier.</param> /// <param name="start">Start of scores location</param> /// <param name="rowCount">Row count.</param> /// <param name="collection">Collection social or public</param> /// <param name="timeSpan">Time span of leaderboard</param> /// <param name="playerId">Player identifier.</param> /// <param name="callback">Callback.</param> public void LoadLeaderboardData(string leaderboardId, LeaderboardStart start, int rowCount, LeaderboardCollection collection, LeaderboardTimeSpan timeSpan, string playerId, Action <LeaderboardScoreData> callback) { //Create a token we'll use to load scores later. NativeScorePageToken nativeToken = new NativeScorePageToken( C.LeaderboardManager_ScorePageToken( mServices.AsHandle(), leaderboardId, (Types.LeaderboardStart)start, (Types.LeaderboardTimeSpan)timeSpan, (Types.LeaderboardCollection)collection)); ScorePageToken token = new ScorePageToken(nativeToken, leaderboardId, collection, timeSpan); // First fetch the leaderboard to get the title C.LeaderboardManager_Fetch(mServices.AsHandle(), Types.DataSource.CACHE_OR_NETWORK, leaderboardId, InternalFetchCallback, Callbacks.ToIntPtr <FetchResponse>((rsp) => HandleFetch(token, rsp, playerId, rowCount, callback), FetchResponse.FromPointer)); }
public void LoadLeaderboardData(string leaderboardId, LeaderboardStart start, int rowCount, LeaderboardCollection collection, LeaderboardTimeSpan timeSpan, string playerId, Action <LeaderboardScoreData> callback) { NativeScorePageToken internalObject = new NativeScorePageToken(GooglePlayGames.Native.Cwrapper.LeaderboardManager.LeaderboardManager_ScorePageToken(mServices.AsHandle(), leaderboardId, (Types.LeaderboardStart)start, (Types.LeaderboardTimeSpan)timeSpan, (Types.LeaderboardCollection)collection)); ScorePageToken token = new ScorePageToken(internalObject, leaderboardId, collection, timeSpan); GooglePlayGames.Native.Cwrapper.LeaderboardManager.LeaderboardManager_Fetch(mServices.AsHandle(), Types.DataSource.CACHE_OR_NETWORK, leaderboardId, InternalFetchCallback, Callbacks.ToIntPtr(delegate(FetchResponse rsp) { HandleFetch(token, rsp, playerId, rowCount, callback); }, FetchResponse.FromPointer)); }
public void LoadScorePage(LeaderboardScoreData data, int maxResults, ScorePageToken token, Action <LeaderboardScoreData> callback) { if (data == null) { data = new LeaderboardScoreData(token.LeaderboardId); } NativeScorePageToken nativeScorePageToken = (NativeScorePageToken)token.InternalObject; GooglePlayGames.Native.Cwrapper.LeaderboardManager.LeaderboardManager_FetchScorePage(mServices.AsHandle(), Types.DataSource.CACHE_OR_NETWORK, nativeScorePageToken.AsPointer(), (uint)maxResults, InternalFetchScorePage, Callbacks.ToIntPtr(delegate(FetchScorePageResponse rsp) { HandleFetchScorePage(data, token, rsp, callback); }, FetchScorePageResponse.FromPointer)); }
public void LoadLeaderboardData(string leaderboardId, GooglePlayGames.BasicApi.LeaderboardStart start, int rowCount, GooglePlayGames.BasicApi.LeaderboardCollection collection, GooglePlayGames.BasicApi.LeaderboardTimeSpan timeSpan, string playerId, Action <LeaderboardScoreData> callback) { // ISSUE: object of a compiler-generated type is created // ISSUE: variable of a compiler-generated type LeaderboardManager.\u003CLoadLeaderboardData\u003Ec__AnonStorey164 dataCAnonStorey164 = new LeaderboardManager.\u003CLoadLeaderboardData\u003Ec__AnonStorey164(); // ISSUE: reference to a compiler-generated field dataCAnonStorey164.playerId = playerId; // ISSUE: reference to a compiler-generated field dataCAnonStorey164.rowCount = rowCount; // ISSUE: reference to a compiler-generated field dataCAnonStorey164.callback = callback; // ISSUE: reference to a compiler-generated field dataCAnonStorey164.\u003C\u003Ef__this = this; NativeScorePageToken nativeScorePageToken = new NativeScorePageToken(GooglePlayGames.Native.Cwrapper.LeaderboardManager.LeaderboardManager_ScorePageToken(this.mServices.AsHandle(), leaderboardId, (Types.LeaderboardStart)start, (Types.LeaderboardTimeSpan)timeSpan, (Types.LeaderboardCollection)collection)); // ISSUE: reference to a compiler-generated field dataCAnonStorey164.token = new ScorePageToken((object)nativeScorePageToken, leaderboardId, collection, timeSpan); // ISSUE: reference to a compiler-generated method GooglePlayGames.Native.Cwrapper.LeaderboardManager.LeaderboardManager_Fetch(this.mServices.AsHandle(), Types.DataSource.CACHE_OR_NETWORK, leaderboardId, new GooglePlayGames.Native.Cwrapper.LeaderboardManager.FetchCallback(LeaderboardManager.InternalFetchCallback), Callbacks.ToIntPtr <FetchResponse>(new Action <FetchResponse>(dataCAnonStorey164.\u003C\u003Em__A1), new Func <IntPtr, FetchResponse>(FetchResponse.FromPointer))); }
/// <summary> /// Loads the leaderboard data. This is the "top level" call /// to load leaderboard data. A token for fetching scores is created /// based on the parameters. /// </summary> /// <param name="leaderboardId">Leaderboard identifier.</param> /// <param name="start">Start of scores location</param> /// <param name="rowCount">Row count.</param> /// <param name="collection">Collection social or public</param> /// <param name="timeSpan">Time span of leaderboard</param> /// <param name="playerId">Player identifier.</param> /// <param name="callback">Callback.</param> public void LoadLeaderboardData(string leaderboardId, LeaderboardStart start, int rowCount, LeaderboardCollection collection, LeaderboardTimeSpan timeSpan, string playerId, Action<LeaderboardScoreData> callback) { //Create a token we'll use to load scores later. NativeScorePageToken nativeToken = new NativeScorePageToken( C.LeaderboardManager_ScorePageToken( mServices.AsHandle(), leaderboardId, (Types.LeaderboardStart)start, (Types.LeaderboardTimeSpan)timeSpan, (Types.LeaderboardCollection)collection)); ScorePageToken token = new ScorePageToken(nativeToken, leaderboardId, collection, timeSpan); // First fetch the leaderboard to get the title C.LeaderboardManager_Fetch(mServices.AsHandle(), Types.DataSource.CACHE_OR_NETWORK, leaderboardId, InternalFetchCallback, Callbacks.ToIntPtr<FetchResponse>((rsp) => HandleFetch(token, rsp, playerId, rowCount, callback), FetchResponse.FromPointer)); }