Show / Hide Table of Contents

    Interface IBaseCollectorEntity

    The primary purpose of any IBaseCollectorEntity is to produce an amount PayoutAmount of IPayoutEntity at a set interval, both defined inside the IBaseCollectorBalanceData.

    IStages can have 0 or more IBaseCollectorEntitys. IBaseCollectorEntitys must be Buy() before they begin generating IPayoutEntity.

    Once they are purchased (see Buy()) they will slowly progress over time based on their speed until they are ready to Collect(Int64).

    Inherited Members
    IEntity.Id
    IEntity.Initialize()
    IEntity.Cleanup(IEntityLoaderService)
    IModifiable.ModifiableData
    Namespace: IdleKit.Gameplay
    Assembly: cs.temp.dll.dll
    Syntax
    public interface IBaseCollectorEntity : IEntity, IInjectable, IModifiable

    Properties

    BaseCollectorBalanceData

    Returns the IBaseCollectorBalanceData associated with this IBaseCollectorEntity.

    Declaration
    IBaseCollectorBalanceData BaseCollectorBalanceData { get; }
    Property Value
    Type Description
    IBaseCollectorBalanceData

    BaseCollectorData

    Returns the IBaseCollectorData associated with this IBaseCollectorEntity.

    Declaration
    IBaseCollectorData BaseCollectorData { get; }
    Property Value
    Type Description
    IBaseCollectorData

    BaseCollectorEntityData

    Returns the IBaseCollectorEntityData associated with this IBaseCollectorEntity.

    Declaration
    IBaseCollectorEntityData BaseCollectorEntityData { get; }
    Property Value
    Type Description
    IBaseCollectorEntityData

    BaseCollectorEntitySavedData

    Returns the IBaseCollectorEntitySavedData associated with this IBaseCollectorEntity.

    Declaration
    IBaseCollectorEntitySavedData BaseCollectorEntitySavedData { get; }
    Property Value
    Type Description
    IBaseCollectorEntitySavedData

    CollectMultiplier

    Returns how much the PayoutAmount needs to be multiplied if the Duration can no longer be reduced and its value has been set to the minimum

    Declaration
    long CollectMultiplier { get; }
    Property Value
    Type Description
    Int64

    CostToBuy

    Processed cost to purchase the IBaseCollectorEntity.

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

    Duration

    Returns the time in milliseconds that the IBaseCollectorEntity takes to generate PayoutAmount

    Declaration
    long Duration { get; }
    Property Value
    Type Description
    Int64

    GeneratorState

    Returns the state object that is running on the IBaseCollectorEntity is in.

    Declaration
    IGeneratorState GeneratorState { get; }
    Property Value
    Type Description
    IGeneratorState

    GeneratorStateType

    Returns the current GeneratorStateType the IBaseCollectorEntity is in.

    Declaration
    string GeneratorStateType { get; }
    Property Value
    Type Description
    String

    PayoutAmount

    Returns how much IPayoutEntity is generated each collection.

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

    PayoutEntity

    The IPayoutEntity being produced by the IBaseCollectorEntity.

    Declaration
    IPayoutEntity PayoutEntity { get; }
    Property Value
    Type Description
    IPayoutEntity

    Methods

    Buy()

    Purchases the IBaseCollectorEntity. Does nothing if CanBuy() returns false.

    Declaration
    void Buy()

    CanBuy()

    Returns true if the IBaseCollectorEntity can be purchased by calling Buy().

    Declaration
    bool CanBuy()
    Returns
    Type Description
    Boolean

    CanCollect()

    Returns true if the generated IPayoutEntity can be Collect(Int64)ed.

    Declaration
    bool CanCollect()
    Returns
    Type Description
    Boolean

    ChangeState<TState>()

    Changes the GeneratorState to the IGeneratorState that corresponds to TState.

    Declaration
    void ChangeState<TState>()
        where TState : IGeneratorState
    Type Parameters
    Name Description
    TState

    Collect(Int64)

    Collects all generated IPayoutEntity from the IBaseCollectorEntity. Does nothing if the CanCollect() returns false.

    Declaration
    void Collect(long count = 1L)
    Parameters
    Type Name Description
    Int64 count

    The number of times the IBaseCollectorEntity should be collected from.

    GetDuration(Boolean, IModifier[])

    Returns the duration in milliseconds of this IBaseCollectorEntity. If applyModifiers is true, all IModifierthat affect the value will be applied.

    Declaration
    long GetDuration(bool applyModifiers, IModifier[] excludedModifiers = null)
    Parameters
    Type Name Description
    Boolean applyModifiers
    IModifier[] excludedModifiers
    Returns
    Type Description
    Int64

    GetPayoutAmount(Boolean, IModifier[])

    Returns the amount IPayoutEntity payout of this IBaseCollectorEntity. If applyModifiersis true, all IModifierthat affect the value will be applied

    Declaration
    double GetPayoutAmount(bool applyModifiers, IModifier[] excludedModifiers = null)
    Parameters
    Type Name Description
    Boolean applyModifiers
    IModifier[] excludedModifiers
    Returns
    Type Description
    Double
    Examples

    If GetPayoutAmount(Boolean, IModifier[]) returns 5 and the CalculatePayouts() for the PayoutEntity returns a 10 for a currency, the user would get a net 5 * 10 = 50 currency.

    IsBought()

    Returns true if the IBaseCollectorEntity has succeeded a call to Buy().

    Declaration
    bool IsBought()
    Returns
    Type Description
    Boolean

    MeetsBuyUnlockRequirements()

    Returns true if the Unlock requirements are met. This does not include the cost to buy the IBaseCollectorEntity, use CanBuy() instead.

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