Skip to content

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

leaderboards.ts:50


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

leaderboards.ts:56

Functions

getLeaderboard

getLeaderboard(name): Leaderboard

Gets a leaderboard with the given unique name.

Parameters

Name Type
name string

Returns

Leaderboard

Defined in

leaderboards.ts:136


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>

Defined in

leaderboards.ts:131