42 Collider(
float sizeX,
float sizeY,
float offsetX,
float offsetY, std::uint32_t layer,
44 :
_size{sizeX, sizeY},
Component for collision detection and physics interactions.
Vector2 getOffset() const
Get position offset.
void setLayer(std::uint32_t layer)
Set collision layer.
void setTrigger(bool isTrigger)
Set trigger status.
void setSize(float sizeX, float sizeY)
Set collision box size.
std::uint32_t _mask
Bitmask of interactable layers.
~Collider() override=default
void setMask(std::uint32_t mask)
Set collision mask.
bool _isTrigger
True=trigger zone, false=solid collision.
std::uint32_t getMask() const
Get collision mask.
Vector2 _offset
Offset from entity position.
Vector2 getSize() const
Get collision box size.
void setOffset(float offsetX, float offsetY)
Set position offset.
bool isTrigger() const
Check if this is a trigger.
Collider(float sizeX, float sizeY, float offsetX, float offsetY, std::uint32_t layer, std::uint32_t mask, bool isTrigger)
Constructor with full collision parameters.
std::uint32_t _layer
Collision layer identifier.
std::uint32_t getLayer() const
Get collision layer.
ComponentType getType() const override
Get the component type ID.
Vector2 _size
Collision box dimensions (width, height)
Base interface for all ECS components.
Maximum number of distinct component types supported by the Registry.
std::size_t ComponentType
Type alias for component identification.
2D vector for size and offset.