Class SpendGoal<TGoalData>
An abstract base type that extends CollectGoal<TGoalData> and should be used for all IGoals related to spending ICurrency.
The target is specified by the derived implementation of IsEligible(ICurrency). The target amount is specified via the derived implementation of Amount`. The Goal will be progressed by the amount of target ICurrency spent by the player.
The SpendGoal extends the CollectGoal<TGoalData> by overriding the behaviour of
OnCurrencyChanged(CurrencyChangedAction) to progress the Goal based on the
spending (rather than collecting) of ICurrency.
Inherited Members
Namespace: IdleKit.Gameplay
Assembly: cs.temp.dll.dll
Syntax
public abstract class SpendGoal<TGoalData> : CollectGoal<TGoalData>, IGoal, IActivatable, IEntity, IInjectable where TGoalData : class, IGoalData
Type Parameters
| Name | Description |
|---|---|
| TGoalData |
Constructors
SpendGoal(String)
Declaration
protected SpendGoal(string id)
Parameters
| Type | Name | Description |
|---|---|---|
| String | id |
Methods
OnCurrencyChanged(CurrencyChangedAction)
Declaration
protected override void OnCurrencyChanged(CurrencyChangedAction currencyAction)
Parameters
| Type | Name | Description |
|---|---|---|
| CurrencyChangedAction | currencyAction |
Overrides
IdleKit.Gameplay.CollectGoal<TGoalData>.OnCurrencyChanged(IdleKit.Gameplay.CurrencyChangedAction)
Implements
IInjectable