Skip to content

Components

Components are data containers attached to entities.

  • Position - x, y, rotation
  • Sprite - texture, animation, pivot
  • Shape - circle, rectangle, polygon
  • RigidBody - physics body type
  • Collider - collision shape

Define in components/:

components/health.zig
pub const Health = struct {
current: i32 = 100,
max: i32 = 100,
};

Register in project.labelle or use the component registry.