Class LeaderboardsTools
Inheritance
LeaderboardsTools
Assembly: cs.temp.dll.dll
public class LeaderboardsTools : IInjectable
Constructors
Declaration
public LeaderboardsTools()
Declaration
public LeaderboardsTools(LeaderboardsService leaderboardsService)
Parameters
Fields
Declaration
protected IEntityResolver _entityResolver
Field Value
Declaration
protected ILeaderboardsService _leaderboardsService
Field Value
Declaration
protected IProjectionCalculator _projectionCalculator
Field Value
Declaration
protected IProjectionService _projectionService
Field Value
Declaration
protected StringBuilder _stringBuilder
Field Value
Type |
Description |
StringBuilder |
|
Declaration
protected ITimerService _timerService
Field Value
Declaration
protected IUserSavedData _userSavedData
Field Value
Declaration
protected IUserStatsService _userStatsService
Field Value
Type |
Description |
IUserStatsService |
|
Declaration
public const string FINAL_SCORE = "_final_score"
Field Value
Declaration
public const string PROJECTION_CURRENCY = "projectionCurrency"
Field Value
Declaration
public const string PROJECTIONS = "projections"
Field Value
Declaration
public const string SUBMISSION_TIME = "submissionTime"
Field Value
Methods
Parses out the projections information from the leaderboard entry's stats dictionary and uses the ProjectionService to return
how much score the player would earn by now from their last leaderboard entry submission time.
Declaration
public virtual double CalculateCurrentProjectedScore(Dictionary<string, string> stats, string currencyId)
Parameters
Type |
Name |
Description |
Dictionary<String, String> |
stats |
A dictionary with specifically formatted projection string. See generation of this format in GetStandardLeaderboardEntryStats() method
|
String |
currencyId |
Id of the currency which equates to score in the leaderboard.
|
Returns
Parses the incoming Beamable leaderboard data structure into an list of IdleKit's Leaderboard Entries. Also uses the ProjectionService to parse projections and calculate the player's
earnings from the last leaderboard entry submission time.
Declaration
public virtual Task<List<LeaderboardEntry>> ConvertLeaderboard(LeaderBoardView view, string leaderboardId, string leaderboardCurrencyId)
Parameters
Type |
Name |
Description |
LeaderBoardView |
view |
Beamable specific leaderboard data structure.
|
String |
leaderboardId |
Id of the leaderboard.
|
String |
leaderboardCurrencyId |
Id of the currency which equates to score in this leaderboard.
|
Returns
GetStandardLeaderboardEntryStats()
Returns payout projections as a string to be parsed on the client to calculate approximate earnings for the player on the leaderboard while offline. Also returns the leaderboard score submission time
Declaration
public virtual Dictionary<string, string> GetStandardLeaderboardEntryStats()
Returns
Declaration
public virtual void Inject(IResolver resolver)
Parameters
Type |
Name |
Description |
IResolver |
resolver |
|