Class DynamicCollectGoal<TGoalData>
An abstract IGoal type which is used as the base of all dynamically calculated
ICurrency collection related IGoals.
Derived DynamicCollectGoal
implementations should specify their target
IGeneratorEntitys by implementing the DynamicCollectGoal.isEligible
method.
The target amount is calculated based on the sum of the payout-per-second of each eligible
automated IGeneratorEntity multiplied by a number of seconds accessed via
Duration. For example, if the player had two automated
generators each outputting a payout-per-second of 5000 and 7,200 as the number of seconds
(2 hours) then the Goal would require the player to collect 36,000,000 units of
ICurrency. If no IGeneratorEntitys are automated, the target is
based on the average payout-per-millisecond of each purchased IGeneratorEntity.
If no IGeneratorEntitys are purchased, an InvalidGoalDataException
will be thrown.
Each time the player collects units of the target ICurrencys the
IGoal is progressed by the number of collected units.
Only units of ICurrencys collected after the IGoal becomes
active count towards the progress of the IGoal. The target amount of
the IGoal will not vary after it becomes active (ie. Generators automated
after the IGoal activation will have no effect on the target).
Because it is likely that the player will automated more IGeneratorEntitys or
hit more IGeneratorUnitTargetData" while the IGoal is active,
it's likely the player will complete the IGoal before the exact number of
seconds specified via DynamicCollectCurrencyTypeGoalData.amount
have elapsed.
Inheritance
DynamicCollectGoal<TGoalData>
Assembly: cs.temp.dll.dll
Syntax
public abstract class DynamicCollectGoal<TGoalData> : CollectGoal<TGoalData>, IDynamicGoal, IGoal, IActivatable, IEntity, IInjectable where TGoalData : class, IDynamicGoalData
Type Parameters
Name |
Description |
TGoalData |
|
Constructors
DynamicCollectGoal(String)
Declaration
protected DynamicCollectGoal(string id)
Parameters
Type |
Name |
Description |
String |
id |
|
Fields
_currencyService
Declaration
protected ICurrencyService _currencyService
Field Value
_projectionService
Declaration
protected IProjectionService _projectionService
Field Value
_timerService
Declaration
protected ITimerService _timerService
Field Value
Properties
DynamicGoalData
Declaration
public virtual IDynamicGoalData DynamicGoalData { get; }
Property Value
TargetProgression
Declaration
public override double TargetProgression { get; }
Property Value
Overrides
IdleKit.Gameplay.Goal<TGoalData>.TargetProgression
Methods
GenerateDynamicTargetProgression()
Declaration
public virtual double GenerateDynamicTargetProgression()
Returns
GenerateFallbackTargetProgression()
Declaration
protected virtual double GenerateFallbackTargetProgression()
Returns
Initialize()
Declaration
public override void Initialize()
Overrides
IdleKit.Gameplay.Goal<TGoalData>.Initialize()
Inject(IResolver)
Declaration
public override void Inject(IResolver resolver)
Parameters
Type |
Name |
Description |
IResolver |
resolver |
|
Overrides
IdleKit.Gameplay.Goal<TGoalData>.Inject(IResolver)
IsEligible(IGeneratorEntity)
Is the generatorEntity
eligible to be consider as dynamic progress.
Declaration
protected virtual bool IsEligible(IGeneratorEntity generatorEntity)
Parameters
Returns
Implements
IInjectable