with Methods
struct Health {
f32 current = 100.0f;
f32 maximum = 100.0f;
void heal(f32 amount) {
current = std::min(current + amount, maximum);
}
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.