Beispiel #1
0
        public static void Initialize(int appID)
        {
            FindResult       = new APICallCallback <LeaderboardFindResult_t>();
            ScoresDownloaded = new APICallCallback <LeaderboardScoresDownloaded_t>();
            ScoreUploaded    = new APICallCallback <LeaderboardScoreUploaded_t>();

            Environment.SetEnvironmentVariable("SteamAppId", appID.ToString());

            SteamContext.Initialize(false);

            DebugLog.AppendText("Getting ISteam interface: ISteamFriends008...");

            Friends = SteamContext.SteamClient.GetISteamFriends <ISteamFriends008>(
                SteamContext.HSteamPipe,
                SteamContext.HSteamUser
                );

            DebugLog.AppendText(string.Format("ISteamFriends008 = 0x{0:8x}", Friends));

            DebugLog.AppendText("Getting ISteam interface: ISteamUserStats007...");

            UserStats = SteamContext.SteamClient.GetISteamUserStats <ISteamUserStats007>(
                SteamContext.HSteamUser,
                SteamContext.HSteamPipe
                );

            DebugLog.AppendText(string.Format("ISteamUserStats007 = 0x{0:8X}{1}", UserStats, Environment.NewLine));
        }
Beispiel #2
0
        public static void Initialize( int appID )
        {

            FindResult = new APICallCallback<LeaderboardFindResult_t>();
            ScoresDownloaded = new APICallCallback<LeaderboardScoresDownloaded_t>();
            ScoreUploaded = new APICallCallback<LeaderboardScoreUploaded_t>();

            Environment.SetEnvironmentVariable( "SteamAppId", appID.ToString() );

            SteamContext.Initialize( false );

            DebugLog.AppendText( "Getting ISteam interface: ISteamFriends008..." );

            Friends = SteamContext.SteamClient.GetISteamFriends<ISteamFriends008>(
                SteamContext.HSteamPipe,
                SteamContext.HSteamUser
            );

            DebugLog.AppendText( string.Format( "ISteamFriends008 = 0x{0:8x}", Friends ) );

            DebugLog.AppendText( "Getting ISteam interface: ISteamUserStats007..." );

            UserStats = SteamContext.SteamClient.GetISteamUserStats<ISteamUserStats007>(
                SteamContext.HSteamUser,
                SteamContext.HSteamPipe
            );

            DebugLog.AppendText( string.Format( "ISteamUserStats007 = 0x{0:8X}{1}", UserStats, Environment.NewLine ) );

        }