|
Building Game Engines
|
#include <CollisionComponent.hpp>


Public Member Functions | |
| CollisionComponent (TransformComponent *transform, TileMap *tilemap) | |
| ~CollisionComponent () | |
| void | UpdateCollisions () |
| void | Update () |
| void | Render (SDL_Renderer *renderer) |
Public Member Functions inherited from Component | |
| Component () | |
| virtual | ~Component ()=0 |
Allows collision with a tilemap
| CollisionComponent::CollisionComponent | ( | TransformComponent * | transform, |
| TileMap * | tilemap | ||
| ) |
Constructs a CollisionComponent to allow the given transform to collide with the given tilemap
| transform | |
| tilemap |

| CollisionComponent::~CollisionComponent | ( | ) |
Nothing to destruct
|
virtual |
Nothing to render.
Implements Component.
|
virtual |
Collisions are handled in other functions This does nothing.
Implements Component.
| void CollisionComponent::UpdateCollisions | ( | ) |
Updates the collision of the transform with any tiles in the tilemap that it might collide with

1.8.13