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
Namespace: IdleKit.Framework
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 |
payoutCurrencyPerMillisecond
Declaration
[Obsolete("Deprecated in version 1.4, use payoutAmountPerMillisecond instead.", true)]
double payoutCurrencyPerMillisecond { 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 |