A component that represents a 2D collision box.
More...
#include <Collision2DComponent.hpp>
|
| ComponentType | GetType () override |
| | Get the type of the component.
|
| |
| void | Input (float deltaTime) override |
| | Handle input.
|
| |
| void | Update (float deltaTime) override |
| | Update the game state.
|
| |
| void | Render (SDL_Renderer *renderer) override |
| | Render the game.
|
| |
|
void | SetW (float w) |
| |
|
void | SetH (float h) |
| |
|
void | SetWH (float w, float h) |
| |
|
float | GetW () const |
| |
|
float | GetH () const |
| |
|
void | SetX (float x) |
| |
|
void | SetY (float y) |
| |
|
void | SetXY (float x, float y) |
| |
|
float | GetX () const |
| |
|
float | GetY () const |
| |
|
SDL_FRect | GetRectangle () const |
| |
| void | SetGameEntity (std::shared_ptr< GameEntity > gameEntity) |
| | Set the game entity that the component is attached to.
|
| |
| std::shared_ptr< GameEntity > | GetGameEntity () |
| | Get the game entity that the component is attached to.
|
| |
A component that represents a 2D collision box.
◆ GetType()
| ComponentType Collision2DComponent::GetType |
( |
| ) |
|
|
overridevirtual |
Get the type of the component.
- Returns
- ComponentType
Implements Component.
◆ Input()
| void Collision2DComponent::Input |
( |
float | deltaTime | ) |
|
|
overridevirtual |
Handle input.
- Parameters
-
| deltaTime | Time since last frame |
Reimplemented from Component.
◆ Render()
| void Collision2DComponent::Render |
( |
SDL_Renderer * | renderer | ) |
|
|
overridevirtual |
Render the game.
- Parameters
-
Reimplemented from Component.
◆ Update()
| void Collision2DComponent::Update |
( |
float | deltaTime | ) |
|
|
overridevirtual |
Update the game state.
- Parameters
-
| deltaTime | Time since last frame |
Reimplemented from Component.
The documentation for this struct was generated from the following file: