Game Engine 2D Platformer
Public Member Functions | List of all members
PhysicsComponent Class Reference

PhysicsComponent class used manage a GameEntity's movement. More...

#include <PhysicsComponent.hpp>

Inheritance diagram for PhysicsComponent:
Inheritance graph
[legend]
Collaboration diagram for PhysicsComponent:
Collaboration graph
[legend]

Public Member Functions

 PhysicsComponent ()
 Constuctor for PhysicsComponent. More...
 
 ~PhysicsComponent ()
 Destructor for PhysicsComponent. More...
 
void StartUp ()
 Initializes the attributes for PhysicsComponent. More...
 
void ShutDown ()
 Destroys and frees attributes for PhysicsComponent. More...
 
void Update (GameEntity &entity)
 Updates the PhysicsComponent. More...
 
- Public Member Functions inherited from Component
 Component ()=default
 Constuctor for Component class. More...
 
virtual void Render (GameEntity &entity)
 To render objects for children classes. More...
 
virtual void LoadImage (std::string filepath, SDL_Renderer *ren)
 To initalize loadImages for children classes. More...
 
virtual void HandleEvent (GameEntity &entity)
 Handle the events of GameEntity object for children classes. More...
 

Detailed Description

PhysicsComponent class used manage a GameEntity's movement.

Constructor & Destructor Documentation

◆ PhysicsComponent()

PhysicsComponent::PhysicsComponent ( )

Constuctor for PhysicsComponent.

◆ ~PhysicsComponent()

PhysicsComponent::~PhysicsComponent ( )

Destructor for PhysicsComponent.

Member Function Documentation

◆ ShutDown()

void PhysicsComponent::ShutDown ( )
virtual

Destroys and frees attributes for PhysicsComponent.

Reimplemented from Component.

◆ StartUp()

void PhysicsComponent::StartUp ( )
virtual

Initializes the attributes for PhysicsComponent.

Reimplemented from Component.

◆ Update()

void PhysicsComponent::Update ( GameEntity entity)
virtual

Updates the PhysicsComponent.

Updates the position of the Entity and handles any collisions with other game entities.

Parameters
entityGameEntity Object
GameEntity&entity

Implements Component.


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