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
Namespace: IdleKit.Framework
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 |
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 ICurrency
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 |
payout
Declaration
[Obsolete("Deprecated in version 1.4 use payoutAmount instead.", true)]
double payout { get; }
Property Value
Type | Description |
---|---|
Double |
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 |
GetPayout(Boolean, IModifier[])
Declaration
[Obsolete("Deprecated in version 1.4 use GetPayoutAmount(true, IModifier[]) instead.", true)]
double GetPayout(bool applyModifiers, IModifier[] excludedModifiers = null)
Parameters
Type | Name | Description |
---|---|---|
Boolean | applyModifiers | |
IModifier[] | excludedModifiers |
Returns
Type | Description |
---|---|
Double |
GetPayoutAmount(Boolean, IModifier[])
Returns the amount IPayoutEntity payout of this IBaseCollectorEntity. If
applyModifiers
is 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 |