C# Class HighScoreHelper, airconsole-unity-plugin

Inheritance: MonoBehaviour
Exibir arquivo Open project: AirConsole/airconsole-unity-plugin Class Usage Examples

Public Methods

Method Description
ConvertHighScoresToTables ( JToken highscores ) : JToken

Converts a list of high scores into rank tables

SelectBestGhosts ( JToken highscores, int count, float minScoreFactor = 0.75f, float maxScoreFactor = 1.5f ) : JToken

Given a list of high scores, returns the best high scores for ghost mode. Preference in order:

- First, Ghosts with similar scores

- Then, sort by connected players, friends, city, region, country, world

If multiple Ghosts have the same preference score, random ones are chosen

Private Methods

Method Description
SortScore ( JToken highscore, Newtonsoft.Json.Linq.JObject preference, float myScore, float minScoreFactor, float maxScoreFactor, int randomUID, int randomUIDChar ) : float

Method Details

ConvertHighScoresToTables() public static method

Converts a list of high scores into rank tables
public static ConvertHighScoresToTables ( JToken highscores ) : JToken
highscores JToken Highscores.
return JToken

SelectBestGhosts() public static method

Given a list of high scores, returns the best high scores for ghost mode. Preference in order:

- First, Ghosts with similar scores

- Then, sort by connected players, friends, city, region, country, world

If multiple Ghosts have the same preference score, random ones are chosen

public static SelectBestGhosts ( JToken highscores, int count, float minScoreFactor = 0.75f, float maxScoreFactor = 1.5f ) : JToken
highscores JToken Highscores.
count int How many ghosts you would like to get.
minScoreFactor float
maxScoreFactor float
return JToken