Example #1
0
        public void RequestEntries(LeaderboardHandle Handle, int RequestType, int Start, int End, Action <bool> OnDownload)
        {
            s_OnDownload = OnDownload;

            // Request the specified leaderboard data.
            SteamAPICall_t hSteamAPICall = (SteamAPICall_t)SteamUserStats.DownloadLeaderboardEntries(
                Handle.m_handle, (ELeaderboardDataRequest)(RequestType), Start, End);

            // Register for the async callback
            SteamMatches.g_CallResultDownloadEntries = new CallResult <LeaderboardScoresDownloaded_t>(CallbackClass.instance.OnLeaderboardDownloadedEntries);
            SteamMatches.g_CallResultDownloadEntries.Set(hSteamAPICall); //, SteamStats.g_CallbackClassInstance, CallbackClass.OnLeaderboardDownloadedEntries);
        }
Example #2
0
        public void OnFindLeaderboard(LeaderboardFindResult_t pResult, bool bIOFailure)
        {
            LeaderboardHandle handle = new LeaderboardHandle(pResult.m_hSteamLeaderboard);

            SteamStats.s_OnFind.Invoke(handle, bIOFailure);
        }
Example #3
0
 public void UploadScore(LeaderboardHandle Handle, int Value)
 {
     SteamAPICall_t hSteamAPICall = (SteamAPICall_t)SteamUserStats.UploadLeaderboardScore(Handle.m_handle, ELeaderboardUploadScoreMethod.k_ELeaderboardUploadScoreMethodKeepBest, Value, null, 0);
 }