Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
rtp::ecs::components::Hitbox Struct Reference

Component representing a rectangular hitbox. More...

#include <Hitbox.hpp>

Collaboration diagram for rtp::ecs::components::Hitbox:

Public Attributes

float width {0.0f}
 Width of the hitbox.
 
float height {0.0f}
 Height of the hitbox.
 
float radius {0.0f}
 Radius for circular hitboxes.
 
float offsetX {0.0f}
 X offset from the entity's position.
 
float offsetY {0.0f}
 Y offset from the entity's position.
 
CollisionShape shape {CollisionShape::Rectangle}
 Shape of the hitbox.
 
CollisionType collisionType {CollisionType::Solid}
 Type of collision behavior.
 

Detailed Description

Component representing a rectangular hitbox.

Definition at line 36 of file Hitbox.hpp.

Member Data Documentation

◆ collisionType

CollisionType rtp::ecs::components::Hitbox::collisionType {CollisionType::Solid}

Type of collision behavior.

Definition at line 43 of file Hitbox.hpp.

◆ height

float rtp::ecs::components::Hitbox::height {0.0f}

Height of the hitbox.

Definition at line 38 of file Hitbox.hpp.

◆ offsetX

float rtp::ecs::components::Hitbox::offsetX {0.0f}

X offset from the entity's position.

Definition at line 40 of file Hitbox.hpp.

◆ offsetY

float rtp::ecs::components::Hitbox::offsetY {0.0f}

Y offset from the entity's position.

Definition at line 41 of file Hitbox.hpp.

◆ radius

float rtp::ecs::components::Hitbox::radius {0.0f}

Radius for circular hitboxes.

Definition at line 39 of file Hitbox.hpp.

◆ shape

CollisionShape rtp::ecs::components::Hitbox::shape {CollisionShape::Rectangle}

Shape of the hitbox.

Definition at line 42 of file Hitbox.hpp.

◆ width

float rtp::ecs::components::Hitbox::width {0.0f}

Width of the hitbox.

Definition at line 37 of file Hitbox.hpp.


The documentation for this struct was generated from the following file: