Energy🔗

Inherits: Node

This class defines an Energy component for entities.

Properties🔗

float

max_value

100.0

float

value

100.0

bool

charging

true

float

charge_rate

10.0

Methods🔗

void

_process(delta: float)


Signals🔗

changed(new_value: int) 🔗

Emitted when value is changed (value > 0)


exhausted() 🔗

Emitted when value is exhausted (value == 0)


Property Descriptions🔗

float max_value = 100.0 🔗

The maximum energy value


float value = 100.0 🔗

  • void @value_setter(value: float)

The amount of energy left to consume


bool charging = true 🔗

Wether the energy value should recharge over time based on charge_rate


float charge_rate = 10.0 🔗

The energy charge rate per second, expressed as a percentage of max_value


Method Descriptions🔗

void _process(delta: float) 🔗

There is currently no description for this method. Please help us by contributing one!