Class CollectGoal<TGoalData>
An abstract IGoal type which is used as the base of all ICurrency collection related IGoals.
Derived Collect Goals implementations should specify their target ICurrency by implementing the IsEligible(ICurrency) method.
The amount of ICurrency the player must collect. Specified via Amount, implemented for derived IGoals.
Each time a target ICurrency is collected by the player, the progress will be incremented by that amount until the target amount is reached.
Only ICurrency collected after the IGoal has become active counts towards the progression of CollectGoal<TGoalData>.
Inherited Members
Namespace: IdleKit.Gameplay
Assembly: cs.temp.dll.dll
Syntax
public abstract class CollectGoal<TGoalData> : Goal<TGoalData>, IGoal, IActivatable, IEntity, IInjectable where TGoalData : class, IGoalData
Type Parameters
Name | Description |
---|---|
TGoalData |
Constructors
CollectGoal(String)
Declaration
protected CollectGoal(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id |
Methods
Activate()
Declaration
public override void Activate()
Overrides
IdleKit.Gameplay.Goal<TGoalData>.Activate()
IsEligible(ICurrency)
Declaration
protected abstract bool IsEligible(ICurrency currency)
Parameters
Type | Name | Description |
---|---|---|
ICurrency | currency |
Returns
Type | Description |
---|---|
Boolean |
OnCurrencyChanged(CurrencyChangedAction)
Declaration
protected virtual void OnCurrencyChanged(CurrencyChangedAction currencyAction)
Parameters
Type | Name | Description |
---|---|---|
CurrencyChangedAction | currencyAction |
SubscribeActionListener(IEntity)
Declaration
protected override void SubscribeActionListener(IEntity target)
Parameters
Type | Name | Description |
---|---|---|
IEntity | target |
Overrides
IdleKit.Gameplay.Goal<TGoalData>.SubscribeActionListener(IdleKit.Gameplay.IEntity)
UnsubscribeActionListener(IEntity)
Declaration
protected override void UnsubscribeActionListener(IEntity target)
Parameters
Type | Name | Description |
---|---|---|
IEntity | target |
Overrides
IdleKit.Gameplay.Goal<TGoalData>.UnsubscribeActionListener(IdleKit.Gameplay.IEntity)
Implements
IInjectable