A class in Root.Township, the global namespace.
Server: one player's achievement action progress, completed achievements and completed tutorials, kept by GameTaskManager and sent to the API.
Constructors
| Member | What it is |
|---|
PlayerTracker(IEnumerable<StatProgress> progress, IEnumerable<uint> progressFlags) | Creates a PlayerTracker from progress and progressFlags. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private bool isChanged | True when progress has changed since the last send. |
private readonly Dictionary<GameAction, float> statActions | Progress for each action. |
Properties
| Member | What it is |
|---|
HashSet<GameAchievement> CompletedAchievements { get; } | The achievements the player had finished when the tracker was made. |
HashSet<MicroTutorialSettings> CompletedTutorials { get; } | The micro tutorials the player had finished when the tracker was made. |
IEnumerable<GameAction> CurrentActions { get; } | The actions with progress above zero. |
Methods
| Member | What it is |
|---|
void Clear() | Clears the stored action progress. |
int GetValue(GameAction action) | Returns the progress for an action as a whole number, or 0. |
void SendToDatabase(IPlayer player) | If anything changed, sends all action progress to the API for the player. |
void UpdateValue(GameAction action, float progress) | Sets the progress for an action and marks the tracker as changed. |
Used in
Members of other types that take, return or hold a PlayerTracker: