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 | List of all members
PhysicsComponent Class Reference

#include <PhysicsComponent.hpp>

Inheritance diagram for PhysicsComponent:
Component

Public Member Functions

 PhysicsComponent (bool hasGravity)
 Creates a component with or without gravity. More...
 
 ~PhysicsComponent ()
 
void Update (float deltaTime)
 Update the velocity and transfor of this compenent according to deltaTime. More...
 
- Public Member Functions inherited from Component
 Component ()
 
virtual void Render (SDL_Renderer *ren)
 Render this component in the screen if it can be rendered. More...
 
virtual ~Component ()
 

Public Attributes

Vector3D velocity
 The velocity of this gameObject. More...
 
bool onGround
 

Additional Inherited Members

- Protected Attributes inherited from Component
GameObjectentity
 The entitity to which this component belongs to. More...
 

Constructor & Destructor Documentation

PhysicsComponent::PhysicsComponent ( bool  hasGravity)

Creates a component with or without gravity.

PhysicsComponent::~PhysicsComponent ( )

Member Function Documentation

void PhysicsComponent::Update ( float  deltaTime)
virtual

Update the velocity and transfor of this compenent according to deltaTime.

Implements Component.

Member Data Documentation

bool PhysicsComponent::onGround
Vector3D PhysicsComponent::velocity

The velocity of this gameObject.


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