Game Engine 2D Platformer
Public Member Functions | List of all members
Component Class Referenceabstract

The interface class for different components to inherit. More...

#include <Component.hpp>

Inheritance diagram for Component:
Inheritance graph
[legend]

Public Member Functions

 Component ()=default
 Constuctor for Component class. More...
 
virtual void StartUp ()
 To initalize attributes for children classes. More...
 
virtual void ShutDown ()
 To destroy and free attributes for children classes. 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...
 
virtual void Update (GameEntity &entity)=0
 To update the attributes for children classes. More...
 

Detailed Description

The interface class for different components to inherit.

Constructor & Destructor Documentation

◆ Component()

Component::Component ( )
default

Constuctor for Component class.

Member Function Documentation

◆ HandleEvent()

virtual void Component::HandleEvent ( GameEntity entity)
inlinevirtual

Handle the events of GameEntity object for children classes.

Parameters
entityGameEntity Object

Reimplemented in InputComponent.

◆ LoadImage()

virtual void Component::LoadImage ( std::string  filepath,
SDL_Renderer *  ren 
)
inlinevirtual

To initalize loadImages for children classes.

Parameters
filepathThe path of the file to load the image
renRenderer of the Main Game Loop

Reimplemented in GraphicsComponent, and AIGraphicsComponent.

◆ Render()

virtual void Component::Render ( GameEntity entity)
inlinevirtual

To render objects for children classes.

Parameters
entityGameEntity Object

Reimplemented in TileComponent, SoundComponent, ScoreDisplayComponent, LifeDisplayComponent, GraphicsComponent, and AIGraphicsComponent.

◆ ShutDown()

virtual void Component::ShutDown ( )
inlinevirtual

◆ StartUp()

virtual void Component::StartUp ( )
inlinevirtual

◆ Update()

virtual void Component::Update ( GameEntity entity)
pure virtual

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