Namespace: leaderboards¶
Interfaces¶
Type aliases¶
ListRecordsOptions¶
Ƭ ListRecordsOptions: Object
Options to Leaderboard.listRecords.
Type declaration¶
Name | Type | Description |
---|---|---|
lowerIsBetter? |
boolean |
Whether lower scores should be considered better, defaults to false. |
Defined in¶
SubmitScoreOptions¶
Ƭ SubmitScoreOptions: Object
Options to Leaderboard.submitScore.
Type declaration¶
Name | Type | Description |
---|---|---|
lowerIsBetter? |
boolean |
Whether lower scores should be considered better, defaults to false. |
recordData? |
unknown |
Custom data to attach to this record. |
Defined in¶
Functions¶
getLeaderboard¶
▸ getLeaderboard(name
): Leaderboard
Gets a leaderboard with the given unique name.
Parameters¶
Name | Type |
---|---|
name |
string |
Returns¶
Defined in¶
setProfileData¶
▸ setProfileData(profileData
): Promise
<void
>
Update this player's leaderboard profile. The profile is a custom object, which may contain the name, country, favorite color, etc. Collecting and displaying this information is up to the game developer.
The profile data of other players is viewable in LeaderboardRecord.profileData.
Parameters¶
Name | Type |
---|---|
profileData |
unknown |
Returns¶
Promise
<void
>