Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
Component

with Methods

struct Health {
f32 current = 100.0f;
f32 maximum = 100.0f;
void heal(f32 amount) {
current = std::min(current + amount, maximum);
}
ES_METHOD(const)
bool isDead() const {
return current <= 0.0f;
}
};
#define ES_COMPONENT(...)
Mark a struct/class as a component that should be exposed to scripts.
#define ES_PROPERTY(...)
Mark a field as a property that should be exposed to scripts.
#define ES_METHOD(...)
Mark a method that should be exposed to scripts.