PlayerIO

The fastest way to build online games without breaking a sweat.

Unity3D Client Reference

Multiplayer  class documentationClass OneScore

Namespace: PlayerIOClient
Language: C# / .NET

The Player.IO OneScore service

Properties

 
public Single
Percentile  [read-only]

The percentile compared to all other players. A value from 0 -> 100. A value of 30.0 means you are in the bottom 30% of players. A value of 100 means you are in the top 100% with other players.

public int
Score  [read-only]

OneScore value

public int
TopRank  [read-only]

The absolute ranking number -- if you are one of the N top players, then it returns N. 1 means you are the best. Returns 0 if you are not one the top N players. (N is currently 1000.)

Methods

 
public void
Add (int score, Callback<OneScoreValue> successCallback, Callback<PlayerIOError> errorCallback)

Adds the score to the OneScore for the user.

public void
Add (int score, Callback<OneScoreValue> successCallback)

Adds the score to the OneScore for the user.

public void
Load (String[] userIds, Callback<OneScoreValue[]> successCallback)

Loads OneScore for multiple users.

public void
Load (String[] userIds, Callback<OneScoreValue[]> successCallback, Callback<PlayerIOError> errorCallback)

Loads OneScore for multiple users.

public void
Refresh (Callback successCallback, Callback<PlayerIOError> errorCallback)

Refresh OneScore for the user.

public void
Refresh (Callback successCallback)

Refresh OneScore for the user.

public void
Set (int score, Callback<OneScoreValue> successCallback, Callback<PlayerIOError> errorCallback)

Sets OneScore for the user.

public void
Set (int score, Callback<OneScoreValue> successCallback)

Sets OneScore for the user.

OneScore.Percentile

public Single
Percentile  [read-only]

The percentile compared to all other players. A value from 0 -> 100. A value of 30.0 means you are in the bottom 30% of players. A value of 100 means you are in the top 100% with other players.

OneScore.Score

public int
Score  [read-only]

OneScore value

OneScore.TopRank

public int
TopRank  [read-only]

The absolute ranking number -- if you are one of the N top players, then it returns N. 1 means you are the best. Returns 0 if you are not one the top N players. (N is currently 1000.)

OneScore.Add

public void
Add (int score, Callback<OneScoreValue> successCallback, Callback<PlayerIOError> errorCallback)

Adds the score to the OneScore for the user.

Arguments

int score
The score to add for the user.
Callback<OneScoreValue> successCallback
Callback that will be called when the operation succeeds.
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the operation.

OneScore.Add

public void
Add (int score, Callback<OneScoreValue> successCallback)

Adds the score to the OneScore for the user.

Arguments

int score
The score to add for the user.
Callback<OneScoreValue> successCallback
Callback that will be called when the operation succeeds.

OneScore.Load

public void
Load (String[] userIds, Callback<OneScoreValue[]> successCallback)

Loads OneScore for multiple users.

Arguments

String[] userIds
The user ids to load OneScore for.
Callback<OneScoreValue[]> successCallback
Callback that will be called when the operation succeeds. Contains the loaded list of OneScores.

OneScore.Load

public void
Load (String[] userIds, Callback<OneScoreValue[]> successCallback, Callback<PlayerIOError> errorCallback)

Loads OneScore for multiple users.

Arguments

String[] userIds
The user ids to load OneScore for.
Callback<OneScoreValue[]> successCallback
Callback that will be called when the operation succeeds. Contains the loaded list of OneScores.
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the operation.

OneScore.Refresh

public void
Refresh (Callback successCallback, Callback<PlayerIOError> errorCallback)

Refresh OneScore for the user.

Arguments

Callback successCallback
Callback that will be called when the operation succeeds.
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the operation.

OneScore.Refresh

public void
Refresh (Callback successCallback)

Refresh OneScore for the user.

Arguments

Callback successCallback
Callback that will be called when the operation succeeds.

OneScore.Set

public void
Set (int score, Callback<OneScoreValue> successCallback, Callback<PlayerIOError> errorCallback)

Sets OneScore for the user.

Arguments

int score
The score to set for the user.
Callback<OneScoreValue> successCallback
Callback that will be called when the operation succeeds.
Callback<PlayerIOError> errorCallback
Callback that will be called instead of successCallback if an error occurs during the operation.

OneScore.Set

public void
Set (int score, Callback<OneScoreValue> successCallback)

Sets OneScore for the user.

Arguments

int score
The score to set for the user.
Callback<OneScoreValue> successCallback
Callback that will be called when the operation succeeds.