Class GetTotalGeneratorUnitsGoal
A Goal that is complete when a specified number of units have been purchased from all IGeneratorEntitys combined.
All IGeneratorEntitys within the current IStage.
Each time the player purchases units for a IGeneratorEntity the Goal will be progressed by the number of units purchased. The Goal will also be progressed by a single unit whenever a IGeneratorEntity is purchased as a IGeneratorEntity has one unit by default. Once the target number of units have been reached the Goal is complete.
IGeneratorEntity units that have been accumulated before the Goal becomes active will count towards the target. A IGeneratorEntity purchased by the player after the Goal becomes active will also still be eligible for contribution toward the target.
Inherited Members
Namespace: IdleKit.Gameplay
Assembly: cs.temp.dll.dll
Syntax
public class GetTotalGeneratorUnitsGoal : Goal<GetTotalGeneratorUnitsGoalData>, IGoal, IActivatable, IEntity, IInjectable
Constructors
GetTotalGeneratorUnitsGoal(String)
Declaration
public GetTotalGeneratorUnitsGoal(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id |
Methods
Activate()
Declaration
public override void Activate()
Overrides
OnGoalAction(IncrementGeneratorUnitStateAction)
Declaration
protected virtual void OnGoalAction(IncrementGeneratorUnitStateAction stateAction)
Parameters
Type | Name | Description |
---|---|---|
IncrementGeneratorUnitStateAction | stateAction |
OnGoalActionBuyGenerator(BuyGeneratorStateAction)
Declaration
protected virtual void OnGoalActionBuyGenerator(BuyGeneratorStateAction stateAction)
Parameters
Type | Name | Description |
---|---|---|
BuyGeneratorStateAction | stateAction |
SubscribeActionListener(IEntity)
We need to listen to both BuyGeneratorStateAction and IncrementGeneratorUnitStateAction actions as both actions can increase the progress.
Declaration
protected override void SubscribeActionListener(IEntity target)
Parameters
Type | Name | Description |
---|---|---|
IEntity | target |
Overrides
UnsubscribeActionListener(IEntity)
Declaration
protected override void UnsubscribeActionListener(IEntity target)
Parameters
Type | Name | Description |
---|---|---|
IEntity | target |