Show / Hide Table of Contents

    Interface IGeneratorEntity

    A version of IBaseCollectorEntity that Automate() and allows the player to purchase generator units. Upon purchasing enough generator units the IGeneratorEntity would reach various IGeneratorUnitTargetData, that would grant additional IReward and modify the GetPayoutAmount(Boolean, IModifier[]) or GetDuration(Boolean, IModifier[]) that are defined in the GeneratorUnitTargetSequence.

    Inherited Members
    IBaseCollectorEntity.BaseCollectorEntityData
    IBaseCollectorEntity.BaseCollectorData
    IBaseCollectorEntity.BaseCollectorBalanceData
    IBaseCollectorEntity.BaseCollectorEntitySavedData
    IBaseCollectorEntity.GeneratorState
    IBaseCollectorEntity.Duration
    IBaseCollectorEntity.CollectMultiplier
    IBaseCollectorEntity.PayoutAmount
    IBaseCollectorEntity.GeneratorStateType
    IBaseCollectorEntity.PayoutEntity
    IBaseCollectorEntity.CostToBuy
    IBaseCollectorEntity.CanBuy()
    IBaseCollectorEntity.MeetsBuyUnlockRequirements()
    IBaseCollectorEntity.Buy()
    IBaseCollectorEntity.IsBought()
    IBaseCollectorEntity.CanCollect()
    IBaseCollectorEntity.Collect(Int64)
    IBaseCollectorEntity.ChangeState<TState>()
    IBaseCollectorEntity.GetPayoutAmount(Boolean, IModifier[])
    IBaseCollectorEntity.GetDuration(Boolean, IModifier[])
    IEntity.Id
    IEntity.Initialize()
    IEntity.Cleanup(IEntityLoaderService)
    IModifiable.ModifiableData
    IModifier.ModifierId
    IModifier.CanBeApplied
    IModifier.ModifierDataIndex
    IModifier.ModifierDataCollection
    Namespace: IdleKit.Gameplay
    Assembly: cs.temp.dll.dll
    Syntax
    public interface IGeneratorEntity : IBaseCollectorEntity, IEntity, IInjectable, IModifiable, IModifier

    Properties

    CostToAutomate

    Processed cost to purchase Automate().

    Declaration
    double CostToAutomate { get; }
    Property Value
    Type Description
    Double

    GeneratorBalanceData

    Returns the IGeneratorBalanceData associated with this IGeneratorEntity. An IGeneratorBalanceData holds information related to this IGeneratorEntity's payout and difficulty scaling.

    Declaration
    IGeneratorBalanceData GeneratorBalanceData { get; }
    Property Value
    Type Description
    IGeneratorBalanceData

    GeneratorData

    Returns the IGeneratorData associated with this IGeneratorEntity.

    Declaration
    IGeneratorData GeneratorData { get; }
    Property Value
    Type Description
    IGeneratorData

    GeneratorEntityData

    Returns the IGeneratorEntityData associated with this IGeneratorEntity. An IGeneratorEntityData holds information related to this IGeneratorEntity's requirements.

    Declaration
    IGeneratorEntityData GeneratorEntityData { get; }
    Property Value
    Type Description
    IGeneratorEntityData

    GeneratorEntitySavedData

    Returns the IGeneratorEntitySavedData associated with this IGeneratorEntity.

    Declaration
    IGeneratorEntitySavedData GeneratorEntitySavedData { get; }
    Property Value
    Type Description
    IGeneratorEntitySavedData

    GeneratorUnitTargetSequence

    Returns the IGeneratorUnitTargetSequence controller currently associated with this IGeneratorEntity.

    Declaration
    IGeneratorUnitTargetSequence GeneratorUnitTargetSequence { get; }
    Property Value
    Type Description
    IGeneratorUnitTargetSequence

    PayoutAmountPerMillisecond

    Returns how many units of IPayoutEntity is generated each millisecond. This is usually used with IGeneratorEntity producing ICurrency as its IPayoutEntity.

    Declaration
    double PayoutAmountPerMillisecond { get; }
    Property Value
    Type Description
    Double

    Methods

    Automate()

    Automates the calls to Collect(Int64) whenever it is available. Does nothing if the CanAutomate() returns false.

    Declaration
    void Automate()

    CanAutomate()

    Returns true if the IGeneratorEntity can be Automate()d.

    Declaration
    bool CanAutomate()
    Returns
    Type Description
    Boolean

    CanIncrementGeneratorUnit(Int32)

    Returns true if the IGeneratorEntitys generatorUnit can be incremented.

    Declaration
    bool CanIncrementGeneratorUnit(int value)
    Parameters
    Type Name Description
    Int32 value
    Returns
    Type Description
    Boolean

    GetAffordableUnitsToNextTarget(Boolean, IModifier[])

    Returns the affordable number of units available from this IGeneratorEntity to reach the next target. If applyModifiers is true, all IModifier that affect the value will be applied.

    Declaration
    int GetAffordableUnitsToNextTarget(bool applyModifiers, IModifier[] excludedModifiers = null)
    Parameters
    Type Name Description
    Boolean applyModifiers
    IModifier[] excludedModifiers
    Returns
    Type Description
    Int32

    Returns 0 if all generator targets have been reached

    GetIncrementGeneratorUnitCost(Int32, Boolean, IModifier[])

    Returns the cumulative cost to increment this IGeneratorEntity by a specified number of units. The number of units to increment the generator by. If true, all Modifiers that affect the value will be applied. Any IModifier to be excluded from the calculation.

    Declaration
    double GetIncrementGeneratorUnitCost(int unitsToIncrease, bool applyModifiers, IModifier[] excludedModifiers = null)
    Parameters
    Type Name Description
    Int32 unitsToIncrease
    Boolean applyModifiers
    IModifier[] excludedModifiers
    Returns
    Type Description
    Double

    GetMaxAffordableUnits(Boolean, Int32, IModifier[])

    Returns the maximum number of units that can be produced by this IGeneratorEntity, given the ICurrency reserve.

    Declaration
    int GetMaxAffordableUnits(bool applyModifiers, int maxCap = -1, IModifier[] excludedModifiers = null)
    Parameters
    Type Name Description
    Boolean applyModifiers

    If true, all Modifiers that affect the value will be applied.

    Int32 maxCap

    A cap on the maximum number of units that will be returned. If set to -1, no cap will be applied.

    IModifier[] excludedModifiers

    Any IModifier to be excluded from the calculation.

    Returns
    Type Description
    Int32

    IncrementGeneratorUnit(Int32)

    Increments the IGeneratorEntity generatorUnit by value. Does nothing if the CanIncrementGeneratorUnit(Int32) returns false with the same value.

    Declaration
    void IncrementGeneratorUnit(int value)
    Parameters
    Type Name Description
    Int32 value

    IsAutomated()

    Returns true if the IGeneratorEntity is automating calls to Collect(Int64).

    Declaration
    bool IsAutomated()
    Returns
    Type Description
    Boolean

    MeetsAutomationUnlockRequirements()

    Returns true if the IUpgradeRequirements are met. This does not include the cost to automate the IGeneratorEntity, see CanAutomate() instead.

    Declaration
    bool MeetsAutomationUnlockRequirements()
    Returns
    Type Description
    Boolean
    Back to top Copyright © 2020 East Side Games Inc.