IEnergyStorage
Importing the class
If you need to reference this type directly, like when casting an Array, or as a parameter, you will need to import it. Simply add the import at the top of the file.
Members
Getter
Checks if energy can be extracted from this storage.
Return Type:
bool
Getter
Checks if this storage can receive energy.
Return Type:
bool
Getter
Gets the amount of energy stored.
Return Type:
int
extractEnergy(maxExtract as int, simulate as bool) as int
Extracts energy from the storage.
Returns: the amount of energy that was extracted.
Parameters:
maxExtract: int
Type: int
- The max amount of energy to be extracted. simulate: bool
Type: bool
- If the energy should actually be extracted or not.
Return Type:
int
Getter
Gets the max energy that can be stored.
Return Type:
int
receiveEnergy(maxReceive as int, simulate as bool) as int
Adds energy to the storage.
Returns: the amount of energy that was accepted.
Parameters:
maxReceive: int
Type: int
- The max amount of energy to be inserted. simulate: bool
Type: bool
- If the energy should actually be inserted or not.
Return Type:
int