Use up Energy when a ObjectShootingPoint is shot.
More...
List of all members.
Public Member Functions |
void | UseEnergy () |
| Takes the required amount of energy from specified sources if available.
|
bool | CheckEnergy () |
| Checks if the specified Energy sources have enough Energy.
|
Energy[] | GetEnergy () |
| Looks for available Energy sources and returns them.
|
Energy[] | GetNonEmptyEnergy () |
| Looks for available Energy sources that aren't empty and returns them.
|
void | ConnectShootingPoint (ObjectShootingPoint point) |
void | DisconnectShootingPoint (ObjectShootingPoint point) |
void | ConnectComponentEvent (Component component) |
void | DisconnectComponentEvent (Component component) |
Public Attributes |
GameObject | energyContainer |
| The object holding the Energy
|
float | useAmount = 1 |
| Minimum amount of Energy that is required for this weapon/object.
|
bool | multiplyDeltaTime = true |
| When energy is taken, the actual amount taken will be multiplied by Time.deltaTime. Use this for weapons/objects that should take energy per-frame rather than per-shot.
|
bool | checkSelfEnergy = true |
| Check the Energy component that is on this object.
|
bool | checkChildrenEnergy = true |
| Check the Energy components that are on this object's and the energyContainer's children.
|
Detailed Description
Member Function Documentation
Looks for available Energy sources and returns them.
- Returns:
- Available Energy sources
Energy [] GetNonEmptyEnergy |
( |
| ) |
|
Looks for available Energy sources that aren't empty and returns them.
- Returns:
- Available Energy sources that aren't empty
Takes the required amount of energy from specified sources if available.
Member Data Documentation
Check the Energy components that are on this object's and the energyContainer's children.
Check the Energy component that is on this object.
When energy is taken, the actual amount taken will be multiplied by Time.deltaTime. Use this for weapons/objects that should take energy per-frame rather than per-shot.
Minimum amount of Energy that is required for this weapon/object.