Interface IGeneratorState
IBaseCollectorEntity can be in various IGeneratorState.
Namespace: IdleKit.Gameplay
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 |
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()