Building Game Engines
Public Member Functions | List of all members
CollisionComponent Class Reference

#include <CollisionComponent.hpp>

Inheritance diagram for CollisionComponent:
Inheritance graph
Collaboration diagram for CollisionComponent:
Collaboration graph

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
 

Detailed Description

Allows collision with a tilemap

Constructor & Destructor Documentation

◆ CollisionComponent()

CollisionComponent::CollisionComponent ( TransformComponent transform,
TileMap tilemap 
)

Constructs a CollisionComponent to allow the given transform to collide with the given tilemap

Parameters
transform
tilemap
Here is the call graph for this function:

◆ ~CollisionComponent()

CollisionComponent::~CollisionComponent ( )

Nothing to destruct

Member Function Documentation

◆ Render()

void CollisionComponent::Render ( SDL_Renderer *  renderer)
virtual

Nothing to render.

Implements Component.

◆ Update()

void CollisionComponent::Update ( )
virtual

Collisions are handled in other functions This does nothing.

Implements Component.

◆ UpdateCollisions()

void CollisionComponent::UpdateCollisions ( )

Updates the collision of the transform with any tiles in the tilemap that it might collide with

Here is the call graph for this function:

The documentation for this class was generated from the following files: