SDL SPOOKY PLATFORMER ENGINE  0.2.0
An implementation of a platformer using sdl, implemented using an entity component system and efficient collision management.
Public Member Functions | Public Attributes | Protected Attributes | List of all members
ColliderComponent Class Reference

#include <ColliderComponent.hpp>

Inheritance diagram for ColliderComponent:
Component

Public Member Functions

 ColliderComponent (Vector3D size, ColliderReceiver *receiver)
 
Vector3DGetSize ()
 
void setColliding (CollisionType to)
 
void Update (float fixedTime)
 Update this component according to the deltaTime. More...
 
void Render (SDL_Renderer *ren)
 Render this component in the screen if it can be rendered. More...
 
- Public Member Functions inherited from Component
 Component ()
 
virtual ~Component ()
 

Public Attributes

ColliderReceiverreceiver
 

Protected Attributes

Vector3D m_size
 
CollisionType is_colliding = CollisionType::NoContact
 
PhysicsComponentphysics = nullptr
 
- Protected Attributes inherited from Component
GameObjectentity
 The entitity to which this component belongs to. More...
 

Constructor & Destructor Documentation

ColliderComponent::ColliderComponent ( Vector3D  size,
ColliderReceiver receiver 
)

Member Function Documentation

Vector3D & ColliderComponent::GetSize ( )
void ColliderComponent::Render ( SDL_Renderer *  ren)
virtual

Render this component in the screen if it can be rendered.

Reimplemented from Component.

void ColliderComponent::setColliding ( CollisionType  to)
void ColliderComponent::Update ( float  deltaTime)
virtual

Update this component according to the deltaTime.

Implements Component.

Member Data Documentation

CollisionType ColliderComponent::is_colliding = CollisionType::NoContact
protected
Vector3D ColliderComponent::m_size
protected
PhysicsComponent* ColliderComponent::physics = nullptr
protected
ColliderReceiver* ColliderComponent::receiver

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