Adds a collision box to an entity when added via entity.addComponent()
More...
#include <ColliderComponent.h>
Adds a collision box to an entity when added via entity.addComponent()
◆ ColliderComponent() [1/2]
| ColliderComponent::ColliderComponent |
( |
const char * | tag | ) |
|
Constructor for ColliderComponent.
- Parameters
-
| tag | The tag of the collider, can be any char* |
◆ ColliderComponent() [2/2]
| ColliderComponent::ColliderComponent |
( |
const char * | tag, |
|
|
float | hitboxScale ) |
Constructor for ColliderComponent.
- Parameters
-
| tag | The tag of the collider, can be any char* |
| hitboxScale | The scale of the collider, used to scale the collider size, default is 1.0f and takes up the 32x32 pixels |
◆ getCollider()
| SDL_Rect & ColliderComponent::getCollider |
( |
| ) |
|
|
inline |
- Returns
- the collider of the entity
◆ getTag()
| const char * ColliderComponent::getTag |
( |
| ) |
const |
|
inline |
- Returns
- the tag of the entity
◆ hasCollision()
| bool ColliderComponent::hasCollision |
( |
| ) |
const |
|
inline |
- Returns
- the collision state of the entity
The documentation for this class was generated from the following files: