internal bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In, Out] int[] pDetails, int cDetailsMax) { var returnValue = _GetDownloadedLeaderboardEntry(Self, hSteamLeaderboardEntries, index, ref pLeaderboardEntry, pDetails, cDetailsMax); return(returnValue); }
/// <summary> /// <para> Returns data about a single leaderboard entry</para> /// <para> use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries</para> /// <para> e.g.</para> /// <para> void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded )</para> /// <para> {</para> /// <para> for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ )</para> /// <para> {</para> /// <para> LeaderboardEntry_t leaderboardEntry;</para> /// <para> int32 details[3]; // we know this is how many we've stored previously</para> /// <para> GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 );</para> /// <para> assert( leaderboardEntry.m_cDetails == 3 );</para> /// <para> ...</para> /// <para> }</para> /// <para> once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid</para> /// </summary> public static bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, out LeaderboardEntry_t pLeaderboardEntry, int[] pDetails, int cDetailsMax) { InteropHelp.TestIfAvailableClient(); return(NativeMethods.ISteamUserStats_GetDownloadedLeaderboardEntry(CSteamAPIContext.GetSteamUserStats(), hSteamLeaderboardEntries, index, out pLeaderboardEntry, pDetails, cDetailsMax)); }
private static extern bool _GetDownloadedLeaderboardEntry(IntPtr self, SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In, Out] int[] pDetails, int cDetailsMax);
public static bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, out LeaderboardEntry_t pLeaderboardEntry, int[] pDetails, int cDetailsMax) { InteropHelp.TestIfAvailableClient(); return NativeMethods.ISteamUserStats_GetDownloadedLeaderboardEntry(hSteamLeaderboardEntries, index, out pLeaderboardEntry, pDetails, cDetailsMax); }
public static extern bool ISteamUserStats_GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, out LeaderboardEntry_t pLeaderboardEntry, [In, Out] int[] pDetails, int cDetailsMax);
internal bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, ref LeaderboardEntry_t pLeaderboardEntry, [In][Out] int[] pDetails, int cDetailsMax) { bool self = this._GetDownloadedLeaderboardEntry(this.Self, hSteamLeaderboardEntries, index, ref pLeaderboardEntry, pDetails, cDetailsMax); return(self); }
/// Returns data about a single leaderboard entry /// use a for loop from 0 to LeaderboardScoresDownloaded_t::m_cEntryCount to get all the downloaded entries /// e.g. /// void OnLeaderboardScoresDownloaded( LeaderboardScoresDownloaded_t *pLeaderboardScoresDownloaded ) /// { /// for ( int index = 0; index < pLeaderboardScoresDownloaded->m_cEntryCount; index++ ) /// { /// LeaderboardEntry_t leaderboardEntry; /// int32 details[3]; // we know this is how many we've stored previously /// GetDownloadedLeaderboardEntry( pLeaderboardScoresDownloaded->m_hSteamLeaderboardEntries, index, &leaderboardEntry, details, 3 ); /// assert( leaderboardEntry.m_cDetails == 3 ); /// ... /// } /// once you've accessed all the entries, the data will be free'd, and the SteamLeaderboardEntries_t handle will become invalid public static bool GetDownloadedLeaderboardEntry(SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, out LeaderboardEntry_t pLeaderboardEntry, int[] pDetails, int cDetailsMax) { pLeaderboardEntry = new LeaderboardEntry_t(); return(false); }
private void OnLeaderboardDownloadedEntries(LeaderboardScoresDownloaded_t pLeaderboardScoresDownloaded, bool bIOFailure) { m_bDownloading = false; m_bIOFailure = bIOFailure; // Leaderboard entries handle will be invalid once we return from this function. Copy all data now. int nLeaderboardEntries = Mathf.Min(pLeaderboardScoresDownloaded.m_cEntryCount, k_nMaxLeaderboardEntries); LeaderboardEntry_t[] leaderboardEntries = new LeaderboardEntry_t[nLeaderboardEntries]; for (int i = 0; i < nLeaderboardEntries; i++) { SteamUserStats.GetDownloadedLeaderboardEntry(pLeaderboardScoresDownloaded.m_hSteamLeaderboardEntries, i, out leaderboardEntries[i], null, 0); } if (m_LeaderboardDownloadedCallback != null) { m_LeaderboardDownloadedCallback(leaderboardEntries); } }