コード例 #1
0
 internal static void InstallEvents()
 {
     UserStatsReceived_t.Install((UserStatsReceived_t x) => {
         if (x.SteamIDUser == SteamClient.SteamId)
         {
             SteamUserStats.StatsRecieved = true;
         }
         Action <SteamId, Result> onUserStatsReceived = SteamUserStats.OnUserStatsReceived;
         if (onUserStatsReceived != null)
         {
             onUserStatsReceived(x.SteamIDUser, x.Result);
         }
         else
         {
         }
     }, false);
     UserStatsStored_t.Install((UserStatsStored_t x) => {
         Action <Result> onUserStatsStored = SteamUserStats.OnUserStatsStored;
         if (onUserStatsStored != null)
         {
             onUserStatsStored(x.Result);
         }
         else
         {
         }
     }, false);
     UserAchievementStored_t.Install((UserAchievementStored_t x) => {
         Action <Achievement, int, int> onAchievementProgress = SteamUserStats.OnAchievementProgress;
         if (onAchievementProgress != null)
         {
             onAchievementProgress(new Achievement(x.AchievementName), x.CurProgress, x.MaxProgress);
         }
         else
         {
         }
     }, false);
     UserStatsUnloaded_t.Install((UserStatsUnloaded_t x) => {
         Action <SteamId> onUserStatsUnloaded = SteamUserStats.OnUserStatsUnloaded;
         if (onUserStatsUnloaded != null)
         {
             onUserStatsUnloaded(x.SteamIDUser);
         }
         else
         {
         }
     }, false);
     UserAchievementIconFetched_t.Install((UserAchievementIconFetched_t x) => {
         Action <string, int> onAchievementIconFetched = SteamUserStats.OnAchievementIconFetched;
         if (onAchievementIconFetched != null)
         {
             onAchievementIconFetched(x.AchievementName, x.IconHandle);
         }
         else
         {
         }
     }, false);
 }
コード例 #2
0
        internal static void InstallEvents()
        {
            UserStatsReceived_t.Install(x =>
            {
                if (x.SteamIDUser == SteamClient.SteamId)
                {
                    StatsRecieved = true;
                }

                OnUserStatsReceived?.Invoke(x.SteamIDUser, x.Result);
            });

            UserStatsStored_t.Install(x => OnUserStatsStored?.Invoke(x.Result));
            UserAchievementStored_t.Install(x => OnAchievementProgress?.Invoke(x.AchievementName, (int)x.CurProgress, (int)x.MaxProgress));
            UserStatsUnloaded_t.Install(x => OnUserStatsUnloaded?.Invoke(x.SteamIDUser));
        }
コード例 #3
0
	private void OnUserStatsUnloaded(UserStatsUnloaded_t pCallback) {
		Debug.Log("[" + UserStatsUnloaded_t.k_iCallback + " - UserStatsUnloaded] - " + pCallback.m_steamIDUser);
	}