A class in Root.Township, the global namespace.
Game achievement asset that completes for a player once a game action's tracked value reaches a set amount.
Constructors
| Member | What it is |
|---|
StatReachedAchievement() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
2 private and internal fields
| Member | What it is |
|---|
private int required | Value needed to complete. |
private GameAction targetStat | Backing field for TargetStat. |
Properties
| Member | What it is |
|---|
GameAction TargetStat { get; } | The game action whose value is watched. |
Methods
| Member | What it is |
|---|
override void Initialize() | Subscribes to the target action's value updates, once. |
1 private and internal method
| Member | What it is |
|---|
private void UpdateValue(GameAction stat, IPlayer player, float value) | Completes the achievement for the player when the value is at least required. |