C# 클래스 Steamworks.SteamUserStats

파일 보기 프로젝트 열기: rlabrecque/Steamworks.NET 1 사용 예제들

공개 메소드들

메소드 설명
AttachLeaderboardUGC ( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) : SteamAPICall_t

Attaches a piece of user generated content the user's entry on a leaderboard.

hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare().

This call is asynchronous, with the result returned in LeaderboardUGCSet_t.

ClearAchievement ( string pchName ) : bool
DownloadLeaderboardEntries ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) : SteamAPICall_t

Asks the Steam back-end for a set of rows in the leaderboard.

This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t

LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below)

You can ask for more entries than exist, and it will return as many as do exist.

k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries]

k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate

e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after

k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user

DownloadLeaderboardEntriesForUsers ( SteamLeaderboard_t hSteamLeaderboard, CSteamID prgUsers, int cUsers ) : SteamAPICall_t

as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers

if a user doesn't have a leaderboard entry, they won't be included in the result

a max of 100 users can be downloaded at a time, with only one outstanding call at a time

FindLeaderboard ( string pchLeaderboardName ) : SteamAPICall_t

as above, but won't create the leaderboard if it's not found

This call is asynchronous, with the result returned in LeaderboardFindResult_t

FindOrCreateLeaderboard ( string pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) : SteamAPICall_t

Leaderboard functions

asks the Steam back-end for a leaderboard by name, and will create it if it's not yet

This call is asynchronous, with the result returned in LeaderboardFindResult_t

GetAchievement ( string pchName, bool &pbAchieved ) : bool

Achievement flag accessors

GetAchievementAchievedPercent ( string pchName, float &pflPercent ) : bool

Returns the percentage of users who have achieved the specified achievement.

GetAchievementAndUnlockTime ( string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool

Get the achievement status, and the time it was unlocked if unlocked.

If the return value is true, but the unlock time is zero, that means it was unlocked before Steam

began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970.

GetAchievementDisplayAttribute ( string pchName, string pchKey ) : string

Get general attributes for an achievement. Accepts the following keys:

- "name" and "desc" for retrieving the localized achievement name and description (returned in UTF8)

- "hidden" for retrieving if an achievement is hidden (returns "0" when not hidden, "1" when hidden)

GetAchievementIcon ( string pchName ) : int

Achievement / GroupAchievement metadata

Gets the icon of the achievement, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if none set.

A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback

which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the

specified achievement.

GetAchievementName ( uint iAchievement ) : string

Get achievement name iAchievement in [0,GetNumAchievements)

GetDownloadedLeaderboardEntry ( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t &pLeaderboardEntry, int pDetails, int cDetailsMax ) : bool

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

GetGlobalStat ( string pchStatName, double &pData ) : bool
GetGlobalStat ( string pchStatName, long &pData ) : bool

Gets the lifetime totals for an aggregated stat

GetGlobalStatHistory ( string pchStatName, double pData, uint cubData ) : int
GetGlobalStatHistory ( string pchStatName, long pData, uint cubData ) : int

Gets history for an aggregated stat. pData will be filled with daily values, starting with today.

So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago,

etc. cubData is the size in bytes of the pubData buffer. Returns the number of

elements actually set.

GetLeaderboardDisplayType ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardDisplayType

returns the display type of the leaderboard

GetLeaderboardEntryCount ( SteamLeaderboard_t hSteamLeaderboard ) : int

returns the total number of entries in a leaderboard, as of the last request

GetLeaderboardName ( SteamLeaderboard_t hSteamLeaderboard ) : string

returns the name of a leaderboard

GetLeaderboardSortMethod ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardSortMethod

returns the sort method of the leaderboard

GetMostAchievedAchievementInfo ( string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int

Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch

the next most achieved afterwards. Will return -1 if there is no data on achievement

percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback).

GetNextMostAchievedAchievementInfo ( int iIteratorPrevious, string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int

Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another

GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last

achievement has been iterated.

GetNumAchievements ( ) : uint

Used for iterating achievements. In general games should not need these functions because they should have a

list of existing achievements compiled into them

GetNumberOfCurrentPlayers ( ) : SteamAPICall_t

Retrieves the number of players currently playing your game (online + offline)

This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t

GetStat ( string pchName, float &pData ) : bool
GetStat ( string pchName, int &pData ) : bool

Data accessors

GetTrophySpaceRequiredBeforeInstall ( ) : ulong

Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed

by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies().

GetUserAchievement ( CSteamID steamIDUser, string pchName, bool &pbAchieved ) : bool
GetUserAchievementAndUnlockTime ( CSteamID steamIDUser, string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool

See notes for GetAchievementAndUnlockTime above

GetUserStat ( CSteamID steamIDUser, string pchName, float &pData ) : bool
GetUserStat ( CSteamID steamIDUser, string pchName, int &pData ) : bool

requests stat information for a user, usable after a successful call to RequestUserStats()

GetUserStatsData ( IntPtr pvData, uint cubData, uint &pcubWritten ) : bool

Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t

callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required

buffer size.

IndicateAchievementProgress ( string pchName, uint nCurProgress, uint nMaxProgress ) : bool

Achievement progress - triggers an AchievementProgress callback, that is all.

Calling this w/ N out of N progress will NOT set the achievement, the game must still do that.

InstallPS3Trophies ( ) : bool

Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t

callback.

RequestCurrentStats ( ) : bool

Ask the server to send down this user's data and achievements for this game

RequestGlobalAchievementPercentages ( ) : SteamAPICall_t

Requests that Steam fetch data on the percentage of players who have received each achievement

for the game globally.

This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t.

RequestGlobalStats ( int nHistoryDays ) : SteamAPICall_t

Requests global stats data, which is available for stats marked as "aggregated".

This call is asynchronous, with the results returned in GlobalStatsReceived_t.

nHistoryDays specifies how many days of day-by-day history to retrieve in addition

to the overall totals. The limit is 60.

RequestUserStats ( CSteamID steamIDUser ) : SteamAPICall_t

Friends stats & achievements

downloads stats for the user

returns a UserStatsReceived_t received when completed

if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail

these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data

ResetAllStats ( bool bAchievementsToo ) : bool

Reset stats

SetAchievement ( string pchName ) : bool
SetStat ( string pchName, float fData ) : bool
SetStat ( string pchName, int nData ) : bool

Set / update data

SetUserStatsData ( IntPtr pvData, uint cubData ) : bool

On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data.

At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method.

If you do not have any user data, call this function with pvData = NULL and cubData = 0

StoreStats ( ) : bool

Store the current data on the server, will get a callback when set

And one callback for every new achievement

If the callback has a result of k_EResultInvalidParam, one or more stats

uploaded has been rejected, either because they broke constraints

or were out of date. In this case the server sends back updated values.

The stats should be re-iterated to keep in sync.

UpdateAvgRateStat ( string pchName, float flCountThisSession, double dSessionLength ) : bool
UploadLeaderboardScore ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, int pScoreDetails, int cScoreDetailsCount ) : SteamAPICall_t

Uploads a user score to the Steam back-end.

This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t

Details are extra game-defined information regarding how the user got that score

pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list

메소드 상세

AttachLeaderboardUGC() 공개 정적인 메소드

Attaches a piece of user generated content the user's entry on a leaderboard.

hContent is a handle to a piece of user generated content that was shared using ISteamUserRemoteStorage::FileShare().

This call is asynchronous, with the result returned in LeaderboardUGCSet_t.

public static AttachLeaderboardUGC ( SteamLeaderboard_t hSteamLeaderboard, UGCHandle_t hUGC ) : SteamAPICall_t
hSteamLeaderboard SteamLeaderboard_t
hUGC UGCHandle_t
리턴 SteamAPICall_t

ClearAchievement() 공개 정적인 메소드

public static ClearAchievement ( string pchName ) : bool
pchName string
리턴 bool

DownloadLeaderboardEntries() 공개 정적인 메소드

Asks the Steam back-end for a set of rows in the leaderboard.

This call is asynchronous, with the result returned in LeaderboardScoresDownloaded_t

LeaderboardScoresDownloaded_t will contain a handle to pull the results from GetDownloadedLeaderboardEntries() (below)

You can ask for more entries than exist, and it will return as many as do exist.

k_ELeaderboardDataRequestGlobal requests rows in the leaderboard from the full table, with nRangeStart & nRangeEnd in the range [1, TotalEntries]

k_ELeaderboardDataRequestGlobalAroundUser requests rows around the current user, nRangeStart being negate

e.g. DownloadLeaderboardEntries( hLeaderboard, k_ELeaderboardDataRequestGlobalAroundUser, -3, 3 ) will return 7 rows, 3 before the user, 3 after

k_ELeaderboardDataRequestFriends requests all the rows for friends of the current user

public static DownloadLeaderboardEntries ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardDataRequest eLeaderboardDataRequest, int nRangeStart, int nRangeEnd ) : SteamAPICall_t
hSteamLeaderboard SteamLeaderboard_t
eLeaderboardDataRequest ELeaderboardDataRequest
nRangeStart int
nRangeEnd int
리턴 SteamAPICall_t

DownloadLeaderboardEntriesForUsers() 공개 정적인 메소드

as above, but downloads leaderboard entries for an arbitrary set of users - ELeaderboardDataRequest is k_ELeaderboardDataRequestUsers

if a user doesn't have a leaderboard entry, they won't be included in the result

a max of 100 users can be downloaded at a time, with only one outstanding call at a time

public static DownloadLeaderboardEntriesForUsers ( SteamLeaderboard_t hSteamLeaderboard, CSteamID prgUsers, int cUsers ) : SteamAPICall_t
hSteamLeaderboard SteamLeaderboard_t
prgUsers CSteamID
cUsers int
리턴 SteamAPICall_t

FindLeaderboard() 공개 정적인 메소드

as above, but won't create the leaderboard if it's not found

This call is asynchronous, with the result returned in LeaderboardFindResult_t

public static FindLeaderboard ( string pchLeaderboardName ) : SteamAPICall_t
pchLeaderboardName string
리턴 SteamAPICall_t

FindOrCreateLeaderboard() 공개 정적인 메소드

Leaderboard functions

asks the Steam back-end for a leaderboard by name, and will create it if it's not yet

This call is asynchronous, with the result returned in LeaderboardFindResult_t

public static FindOrCreateLeaderboard ( string pchLeaderboardName, ELeaderboardSortMethod eLeaderboardSortMethod, ELeaderboardDisplayType eLeaderboardDisplayType ) : SteamAPICall_t
pchLeaderboardName string
eLeaderboardSortMethod ELeaderboardSortMethod
eLeaderboardDisplayType ELeaderboardDisplayType
리턴 SteamAPICall_t

GetAchievement() 공개 정적인 메소드

Achievement flag accessors

public static GetAchievement ( string pchName, bool &pbAchieved ) : bool
pchName string
pbAchieved bool
리턴 bool

GetAchievementAchievedPercent() 공개 정적인 메소드

Returns the percentage of users who have achieved the specified achievement.

public static GetAchievementAchievedPercent ( string pchName, float &pflPercent ) : bool
pchName string
pflPercent float
리턴 bool

GetAchievementAndUnlockTime() 공개 정적인 메소드

Get the achievement status, and the time it was unlocked if unlocked.

If the return value is true, but the unlock time is zero, that means it was unlocked before Steam

began tracking achievement unlock times (December 2009). Time is seconds since January 1, 1970.

public static GetAchievementAndUnlockTime ( string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool
pchName string
pbAchieved bool
punUnlockTime uint
리턴 bool

GetAchievementDisplayAttribute() 공개 정적인 메소드

Get general attributes for an achievement. Accepts the following keys:

- "name" and "desc" for retrieving the localized achievement name and description (returned in UTF8)

- "hidden" for retrieving if an achievement is hidden (returns "0" when not hidden, "1" when hidden)

public static GetAchievementDisplayAttribute ( string pchName, string pchKey ) : string
pchName string
pchKey string
리턴 string

GetAchievementIcon() 공개 정적인 메소드

Achievement / GroupAchievement metadata

Gets the icon of the achievement, which is a handle to be used in ISteamUtils::GetImageRGBA(), or 0 if none set.

A return value of 0 may indicate we are still fetching data, and you can wait for the UserAchievementIconFetched_t callback

which will notify you when the bits are ready. If the callback still returns zero, then there is no image set for the

specified achievement.

public static GetAchievementIcon ( string pchName ) : int
pchName string
리턴 int

GetAchievementName() 공개 정적인 메소드

Get achievement name iAchievement in [0,GetNumAchievements)

public static GetAchievementName ( uint iAchievement ) : string
iAchievement uint
리턴 string

GetDownloadedLeaderboardEntry() 공개 정적인 메소드

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 GetDownloadedLeaderboardEntry ( SteamLeaderboardEntries_t hSteamLeaderboardEntries, int index, LeaderboardEntry_t &pLeaderboardEntry, int pDetails, int cDetailsMax ) : bool
hSteamLeaderboardEntries SteamLeaderboardEntries_t
index int
pLeaderboardEntry LeaderboardEntry_t
pDetails int
cDetailsMax int
리턴 bool

GetGlobalStat() 공개 정적인 메소드

public static GetGlobalStat ( string pchStatName, double &pData ) : bool
pchStatName string
pData double
리턴 bool

GetGlobalStat() 공개 정적인 메소드

Gets the lifetime totals for an aggregated stat

public static GetGlobalStat ( string pchStatName, long &pData ) : bool
pchStatName string
pData long
리턴 bool

GetGlobalStatHistory() 공개 정적인 메소드

public static GetGlobalStatHistory ( string pchStatName, double pData, uint cubData ) : int
pchStatName string
pData double
cubData uint
리턴 int

GetGlobalStatHistory() 공개 정적인 메소드

Gets history for an aggregated stat. pData will be filled with daily values, starting with today.

So when called, pData[0] will be today, pData[1] will be yesterday, and pData[2] will be two days ago,

etc. cubData is the size in bytes of the pubData buffer. Returns the number of

elements actually set.

public static GetGlobalStatHistory ( string pchStatName, long pData, uint cubData ) : int
pchStatName string
pData long
cubData uint
리턴 int

GetLeaderboardDisplayType() 공개 정적인 메소드

returns the display type of the leaderboard

public static GetLeaderboardDisplayType ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardDisplayType
hSteamLeaderboard SteamLeaderboard_t
리턴 ELeaderboardDisplayType

GetLeaderboardEntryCount() 공개 정적인 메소드

returns the total number of entries in a leaderboard, as of the last request

public static GetLeaderboardEntryCount ( SteamLeaderboard_t hSteamLeaderboard ) : int
hSteamLeaderboard SteamLeaderboard_t
리턴 int

GetLeaderboardName() 공개 정적인 메소드

returns the name of a leaderboard

public static GetLeaderboardName ( SteamLeaderboard_t hSteamLeaderboard ) : string
hSteamLeaderboard SteamLeaderboard_t
리턴 string

GetLeaderboardSortMethod() 공개 정적인 메소드

returns the sort method of the leaderboard

public static GetLeaderboardSortMethod ( SteamLeaderboard_t hSteamLeaderboard ) : ELeaderboardSortMethod
hSteamLeaderboard SteamLeaderboard_t
리턴 ELeaderboardSortMethod

GetMostAchievedAchievementInfo() 공개 정적인 메소드

Get the info on the most achieved achievement for the game, returns an iterator index you can use to fetch

the next most achieved afterwards. Will return -1 if there is no data on achievement

percentages (ie, you haven't called RequestGlobalAchievementPercentages and waited on the callback).

public static GetMostAchievedAchievementInfo ( string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int
pchName string
unNameBufLen uint
pflPercent float
pbAchieved bool
리턴 int

GetNextMostAchievedAchievementInfo() 공개 정적인 메소드

Get the info on the next most achieved achievement for the game. Call this after GetMostAchievedAchievementInfo or another

GetNextMostAchievedAchievementInfo call passing the iterator from the previous call. Returns -1 after the last

achievement has been iterated.

public static GetNextMostAchievedAchievementInfo ( int iIteratorPrevious, string &pchName, uint unNameBufLen, float &pflPercent, bool &pbAchieved ) : int
iIteratorPrevious int
pchName string
unNameBufLen uint
pflPercent float
pbAchieved bool
리턴 int

GetNumAchievements() 공개 정적인 메소드

Used for iterating achievements. In general games should not need these functions because they should have a

list of existing achievements compiled into them

public static GetNumAchievements ( ) : uint
리턴 uint

GetNumberOfCurrentPlayers() 공개 정적인 메소드

Retrieves the number of players currently playing your game (online + offline)

This call is asynchronous, with the result returned in NumberOfCurrentPlayers_t

public static GetNumberOfCurrentPlayers ( ) : SteamAPICall_t
리턴 SteamAPICall_t

GetStat() 공개 정적인 메소드

public static GetStat ( string pchName, float &pData ) : bool
pchName string
pData float
리턴 bool

GetStat() 공개 정적인 메소드

Data accessors

public static GetStat ( string pchName, int &pData ) : bool
pchName string
pData int
리턴 bool

GetTrophySpaceRequiredBeforeInstall() 공개 정적인 메소드

Returns the amount of space required at boot to install trophies. This value can be used when comparing the amount of space needed

by the game to the available space value passed to the game at boot. The value is set during InstallPS3Trophies().

public static GetTrophySpaceRequiredBeforeInstall ( ) : ulong
리턴 ulong

GetUserAchievement() 공개 정적인 메소드

public static GetUserAchievement ( CSteamID steamIDUser, string pchName, bool &pbAchieved ) : bool
steamIDUser CSteamID
pchName string
pbAchieved bool
리턴 bool

GetUserAchievementAndUnlockTime() 공개 정적인 메소드

See notes for GetAchievementAndUnlockTime above

public static GetUserAchievementAndUnlockTime ( CSteamID steamIDUser, string pchName, bool &pbAchieved, uint &punUnlockTime ) : bool
steamIDUser CSteamID
pchName string
pbAchieved bool
punUnlockTime uint
리턴 bool

GetUserStat() 공개 정적인 메소드

public static GetUserStat ( CSteamID steamIDUser, string pchName, float &pData ) : bool
steamIDUser CSteamID
pchName string
pData float
리턴 bool

GetUserStat() 공개 정적인 메소드

requests stat information for a user, usable after a successful call to RequestUserStats()

public static GetUserStat ( CSteamID steamIDUser, string pchName, int &pData ) : bool
steamIDUser CSteamID
pchName string
pData int
리턴 bool

GetUserStatsData() 공개 정적인 메소드

Call to get the user's current stats data. You should retrieve this data after receiving successful UserStatsReceived_t & UserStatsStored_t

callbacks, and store the data with the user's save game data. You can call this method with pvData = NULL and cubData = 0 to get the required

buffer size.

public static GetUserStatsData ( IntPtr pvData, uint cubData, uint &pcubWritten ) : bool
pvData System.IntPtr
cubData uint
pcubWritten uint
리턴 bool

IndicateAchievementProgress() 공개 정적인 메소드

Achievement progress - triggers an AchievementProgress callback, that is all.

Calling this w/ N out of N progress will NOT set the achievement, the game must still do that.

public static IndicateAchievementProgress ( string pchName, uint nCurProgress, uint nMaxProgress ) : bool
pchName string
nCurProgress uint
nMaxProgress uint
리턴 bool

InstallPS3Trophies() 공개 정적인 메소드

Call to kick off installation of the PS3 trophies. This call is asynchronous, and the results will be returned in a PS3TrophiesInstalled_t

callback.

public static InstallPS3Trophies ( ) : bool
리턴 bool

RequestCurrentStats() 공개 정적인 메소드

Ask the server to send down this user's data and achievements for this game

public static RequestCurrentStats ( ) : bool
리턴 bool

RequestGlobalAchievementPercentages() 공개 정적인 메소드

Requests that Steam fetch data on the percentage of players who have received each achievement

for the game globally.

This call is asynchronous, with the result returned in GlobalAchievementPercentagesReady_t.

public static RequestGlobalAchievementPercentages ( ) : SteamAPICall_t
리턴 SteamAPICall_t

RequestGlobalStats() 공개 정적인 메소드

Requests global stats data, which is available for stats marked as "aggregated".

This call is asynchronous, with the results returned in GlobalStatsReceived_t.

nHistoryDays specifies how many days of day-by-day history to retrieve in addition

to the overall totals. The limit is 60.

public static RequestGlobalStats ( int nHistoryDays ) : SteamAPICall_t
nHistoryDays int
리턴 SteamAPICall_t

RequestUserStats() 공개 정적인 메소드

Friends stats & achievements

downloads stats for the user

returns a UserStatsReceived_t received when completed

if the other user has no stats, UserStatsReceived_t.m_eResult will be set to k_EResultFail

these stats won't be auto-updated; you'll need to call RequestUserStats() again to refresh any data

public static RequestUserStats ( CSteamID steamIDUser ) : SteamAPICall_t
steamIDUser CSteamID
리턴 SteamAPICall_t

ResetAllStats() 공개 정적인 메소드

Reset stats

public static ResetAllStats ( bool bAchievementsToo ) : bool
bAchievementsToo bool
리턴 bool

SetAchievement() 공개 정적인 메소드

public static SetAchievement ( string pchName ) : bool
pchName string
리턴 bool

SetStat() 공개 정적인 메소드

public static SetStat ( string pchName, float fData ) : bool
pchName string
fData float
리턴 bool

SetStat() 공개 정적인 메소드

Set / update data

public static SetStat ( string pchName, int nData ) : bool
pchName string
nData int
리턴 bool

SetUserStatsData() 공개 정적인 메소드

On PS3, user stats & achievement progress through Steam must be stored with the user's saved game data.

At startup, before calling RequestCurrentStats(), you must pass the user's stats data to Steam via this method.

If you do not have any user data, call this function with pvData = NULL and cubData = 0

public static SetUserStatsData ( IntPtr pvData, uint cubData ) : bool
pvData System.IntPtr
cubData uint
리턴 bool

StoreStats() 공개 정적인 메소드

Store the current data on the server, will get a callback when set

And one callback for every new achievement

If the callback has a result of k_EResultInvalidParam, one or more stats

uploaded has been rejected, either because they broke constraints

or were out of date. In this case the server sends back updated values.

The stats should be re-iterated to keep in sync.

public static StoreStats ( ) : bool
리턴 bool

UpdateAvgRateStat() 공개 정적인 메소드

public static UpdateAvgRateStat ( string pchName, float flCountThisSession, double dSessionLength ) : bool
pchName string
flCountThisSession float
dSessionLength double
리턴 bool

UploadLeaderboardScore() 공개 정적인 메소드

Uploads a user score to the Steam back-end.

This call is asynchronous, with the result returned in LeaderboardScoreUploaded_t

Details are extra game-defined information regarding how the user got that score

pScoreDetails points to an array of int32's, cScoreDetailsCount is the number of int32's in the list

public static UploadLeaderboardScore ( SteamLeaderboard_t hSteamLeaderboard, ELeaderboardUploadScoreMethod eLeaderboardUploadScoreMethod, int nScore, int pScoreDetails, int cScoreDetailsCount ) : SteamAPICall_t
hSteamLeaderboard SteamLeaderboard_t
eLeaderboardUploadScoreMethod ELeaderboardUploadScoreMethod
nScore int
pScoreDetails int
cScoreDetailsCount int
리턴 SteamAPICall_t