Show / Hide Table of Contents

    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
    Object
    Goal<TGoalData>
    CollectGoal<TGoalData>
    DynamicCollectGoal<TGoalData>
    DynamicCollectCurrenciesWithTagsGoal
    DynamicCollectCurrencyTypeGoal
    Implements
    IDynamicGoal
    IGoal
    IActivatable
    IEntity
    IInjectable
    Inherited Members
    CollectGoal<TGoalData>.IsEligible(ICurrency)
    CollectGoal<TGoalData>.Activate()
    CollectGoal<TGoalData>.OnCurrencyChanged(CurrencyChangedAction)
    CollectGoal<TGoalData>.SubscribeActionListener(IEntity)
    CollectGoal<TGoalData>.UnsubscribeActionListener(IEntity)
    Goal<TGoalData>._id
    Goal<TGoalData>.Id
    Goal<TGoalData>.GoalData
    Goal<TGoalData>.GoalSavedData
    Goal<TGoalData>.ActivatableData
    Goal<TGoalData>.CurrentProgression
    Goal<TGoalData>.NormalizedProgress
    Goal<TGoalData>.CanClaim
    Goal<TGoalData>.IsActive
    Goal<TGoalData>._goalData
    Goal<TGoalData>._goalSavedData
    Goal<TGoalData>._actionService
    Goal<TGoalData>._entityResolver
    Goal<TGoalData>._dataService
    Goal<TGoalData>._targets
    Goal<TGoalData>.Cleanup(IEntityLoaderService)
    Goal<TGoalData>.Deactivate()
    Goal<TGoalData>.Reset()
    Goal<TGoalData>.SendGoalActivatedAction()
    Goal<TGoalData>.CleanupSubscriptions()
    Goal<TGoalData>.SetProgressGoal(Double)
    Goal<TGoalData>.ProgressGoal(Double)
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ToString()
    Object.ReferenceEquals(Object, Object)
    Namespace: IdleKit.Gameplay
    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
    Type Description
    ICurrencyService

    _projectionService

    Declaration
    protected IProjectionService _projectionService
    Field Value
    Type Description
    IProjectionService

    _timerService

    Declaration
    protected ITimerService _timerService
    Field Value
    Type Description
    ITimerService

    Properties

    DynamicGoalData

    Declaration
    public virtual IDynamicGoalData DynamicGoalData { get; }
    Property Value
    Type Description
    IDynamicGoalData

    TargetProgression

    Declaration
    public override double TargetProgression { get; }
    Property Value
    Type Description
    Double
    Overrides
    IdleKit.Gameplay.Goal<TGoalData>.TargetProgression

    Methods

    GenerateDynamicTargetProgression()

    Declaration
    public virtual double GenerateDynamicTargetProgression()
    Returns
    Type Description
    Double

    GenerateFallbackTargetProgression()

    Declaration
    protected virtual double GenerateFallbackTargetProgression()
    Returns
    Type Description
    Double

    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
    Type Name Description
    IGeneratorEntity generatorEntity
    Returns
    Type Description
    Boolean

    Implements

    IDynamicGoal
    IGoal
    IActivatable
    IEntity
    IInjectable
    Back to top Copyright © 2020 East Side Games Inc.