27 "Transform", sol::constructors<ecs::Transform(), ecs::Transform(float, float)>());
49 "Velocity", sol::constructors<ecs::Velocity(float, float, float)>());
70 "Health", sol::constructors<ecs::Health(int), ecs::Health(int, int)>());
72 health_type[
"currentHealth"] =
79 health_type[
"invincibilityTimer"] =
Component representing entity health and invincibility.
int getCurrentHealth() const
Get current health points.
bool isInvincible() const
Check if entity is invincible.
void setInvincible(bool invincible)
Set invincibility state.
float getInvincibilityTimer() const
Get remaining invincibility time.
void setInvincibilityTimer(float timer)
Set invincibility timer.
void setCurrentHealth(int health)
Set current health.
int getMaxHealth() const
Get maximum health points.
void setMaxHealth(int health)
Set maximum health.
Component representing movement direction and speed.
Vector2 getDirection() const
Get the direction vector.
void setSpeed(float speed)
Set the movement speed.
float getSpeed() const
Get the movement speed.
void setDirection(float dirX, float dirY)
Set the direction vector.
High-level ECS manager providing clean server-side API.
Helper to simplify component registration.
void registerComponent(const std::string &name)
Register a component that's already been bound to Lua.
void clear()
Clear all registered components (for testing/reinitialization)
ComponentBindingHelper & bindComponents(sol::state &lua, ecs::wrapper::ECSWorld *world)
Bind ECS component types to Lua.
static ComponentBindingHelper g_componentHelper