Class DynamicCollectCurrencyTypeGoal
A Goal that is complete when the player collects a dynamically calculated number of units of one or more ICurrency. This allows designers to create Goals that require the player to idle for an approximate period of time.
The target amount is calculated based on the sum of the payout-per-millisecond of each currently
automated IGeneratorEntity multiplied by a number of seconds specified via
DynamicCollectCurrencyTypeGoalData.amount
. For example, if the player had two automated
generators each outputting a payout-per-millisecond of 5 and 7,200 as the number of seconds (2 hours)
then the Goal would require the player to collect 36,000,000 units of the specified
ICurrency.
Because it is likely that the player will automated more IGeneratorEntity or hit more IGeneratorUnitTargetDatas while the Goal is active, it's likely the player will complete the Goal before the exact number of seconds specified via Amount have elapsed.
Any ICurrency with a Id
that matches the Id specified via
CurrencyId will be targeted by the Goal.
Each time the player collects units of the target ICurrency the Goal is progressed by the number of collected units.
Only units of ICurrency collected after the Goal becomes active count towards the progress of the Goal. The target amount of the Goal will not vary after it becomes active (ie. IGeneratorEntity automated after the Goal activation will have no effect on the target).
Inheritance
Inherited Members
Namespace: IdleKit.Gameplay
Assembly: cs.temp.dll.dll
Syntax
public class DynamicCollectCurrencyTypeGoal : DynamicCollectGoal<DynamicCollectCurrencyTypeGoalData>, IDynamicGoal, IGoal, IActivatable, IEntity, IInjectable
Constructors
DynamicCollectCurrencyTypeGoal(String)
Declaration
public DynamicCollectCurrencyTypeGoal(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id |
Methods
IsEligible(ICurrency)
Declaration
protected override bool IsEligible(ICurrency currency)
Parameters
Type | Name | Description |
---|---|---|
ICurrency | currency |
Returns
Type | Description |
---|---|
Boolean |