Interface UM_iLeaderboardsClient
A client to interact with leaderboards functionality.
Namespace: SA.CrossPlatform.GameServices
Assembly: cs.temp.dll.dll
Syntax
public interface UM_iLeaderboardsClient
Methods
LoadCurrentPlayerScore(String, UM_LeaderboardTimeSpan, UM_LeaderboardCollection, Action<UM_ScoreLoadResult>)
Asynchronously loads UM_Score that represents the signed-in player's score for the leaderboard specified by leaderboardId.
Declaration
void LoadCurrentPlayerScore(string leaderboardId, UM_LeaderboardTimeSpan span, UM_LeaderboardCollection collection, Action<UM_ScoreLoadResult> callback)
Parameters
Type | Name | Description |
---|---|---|
System.String | leaderboardId | The ID of the leaderboard to view. |
UM_LeaderboardTimeSpan | span | Time span to retrieve data for. |
UM_LeaderboardCollection | collection | |
Action<UM_ScoreLoadResult> | callback | Request async callback |
LoadLeaderboardsMetadata(Action<UM_LoadLeaderboardsMetaResult>)
Asynchronously loads game registered leaderboards metadata
Declaration
void LoadLeaderboardsMetadata(Action<UM_LoadLeaderboardsMetaResult> callback)
Parameters
Type | Name | Description |
---|---|---|
Action<UM_LoadLeaderboardsMetaResult> | callback |
ShowUI(Action<SA_Result>)
Show the native UI with the list of leaderboards for a game.
Declaration
void ShowUI(Action<SA_Result> callback)
Parameters
Type | Name | Description |
---|---|---|
Action<SA_Result> | callback | Operation callback. |
ShowUI(String, Action<SA_Result>)
Show the native UI of the specified leaderboard.
Declaration
void ShowUI(string leaderboardId, Action<SA_Result> callback)
Parameters
Type | Name | Description |
---|---|---|
System.String | leaderboardId | The Id of the leaderboard to view. |
Action<SA_Result> | callback | Operation callback. |
ShowUI(String, UM_LeaderboardTimeSpan, Action<SA_Result>)
Show the native UI of the specified leaderboard and time span page.
Declaration
void ShowUI(string leaderboardId, UM_LeaderboardTimeSpan timeSpan, Action<SA_Result> callback)
Parameters
Type | Name | Description |
---|---|---|
System.String | leaderboardId | The Id of the leaderboard to view. |
UM_LeaderboardTimeSpan | timeSpan | ime span to retrieve data for. |
Action<SA_Result> | callback | Operation callback. |
SubmitScore(String, Int64, UInt64, Action<SA_Result>)
Submits the score to the game service. Use this method whenever you need to submit scores.
Declaration
void SubmitScore(string leaderboardId, long score, ulong context, Action<SA_Result> callback)
Parameters
Type | Name | Description |
---|---|---|
System.String | leaderboardId | The identifier for the leaderboard. |
System.Int64 | score | The score earned by the player. You can use any algorithm you want to calculate scores in your game. Your game must set the value property before reporting a score, otherwise an error is returned. The value provided by a score object is interpreted by Game service provided only when formatted for display. |
System.UInt64 | context | An integer value used by your game. The context property is stored and returned to your game, but is otherwise ignored by Game Center. It allows your game to associate an arbitrary 32-bit unsigned integer value with the score data reported to Game Center. You decide how this integer value is interpreted by your game. For example, you might use the context property to store flags that provide game-specific details about a player’s score, or you might use the context as a key to other data stored on the device or on your own server. The context is most useful when your game displays a custom leaderboard user interface. |
Action<SA_Result> | callback | Operation callback. |