Interface IGeneratorState
IBaseCollectorEntity can be in various IGeneratorState.
Namespace: IdleKit.Framework
Assembly: cs.temp.dll.dll
Syntax
public interface IGeneratorState : IInjectable
Properties
canAutomate
Can the player automate the Generator while in this state?
Declaration
bool canAutomate { get; }
Property Value
Type | Description |
---|---|
Boolean |
canBuy
Can the player buy the Generator while in this state?
Declaration
bool canBuy { get; }
Property Value
Type | Description |
---|---|
Boolean |
canCollect
Can the player collect from the Generator while in this state?
Declaration
bool canCollect { get; }
Property Value
Type | Description |
---|---|
Boolean |
canIncrementGeneratorUnit
Can the player increment the Generators generatorUnit while in this state?
Declaration
bool canIncrementGeneratorUnit { get; }
Property Value
Type | Description |
---|---|
Boolean |
generatorStateType
Returns the current GeneratorStateType the IGeneratorEntity is in.
Declaration
string generatorStateType { get; }
Property Value
Type | Description |
---|---|
String |
progress
0 to 1 value of the state's current progress. States that do not update should return meaningful, hard coded values
Declaration
float progress { get; }
Property Value
Type | Description |
---|---|
Single |
Methods
Enter(IBaseCollectorEntity, IGeneratorState)
Called each time the state is entered This will be called multiple times
Declaration
void Enter(IBaseCollectorEntity baseCollectorEntity, IGeneratorState previousState)
Parameters
Type | Name | Description |
---|---|---|
IBaseCollectorEntity | baseCollectorEntity | |
IGeneratorState | previousState | The previous IGeneratorState we moved from. Can be null if this is the first state |
Enter(IGeneratorState)
Declaration
[Obsolete("Deprecated in version 1.3, use Enter(IGeneratorEntity, IGeneratorState) instead.", true)]
void Enter(IGeneratorState previousState)
Parameters
Type | Name | Description |
---|---|---|
IGeneratorState | previousState |
Exit(IGeneratorState)
Called each time the state is exited This will be called multiple times
Declaration
void Exit(IGeneratorState nextState)
Parameters
Type | Name | Description |
---|---|---|
IGeneratorState | nextState | The generator we are about to move to. Can be null if this is the last state or there is no new state |
RefreshTimer()
Called when the owning generator changes its duration
Declaration
void RefreshTimer()