Building Game Engines
|
#include <Component.hpp>
Public Member Functions | |
Component () | |
virtual | ~Component ()=0 |
virtual void | Update ()=0 |
virtual void | Render (SDL_Renderer *renderer)=0 |
An abstract class that represents any Component that a GameObject may have.
Component::Component | ( | ) |
Default constructor. Should never be called directly.
|
pure virtual |
Pure virtual Destructor.
|
pure virtual |
Pure virtual Render Method. Renderer is the game's renderer. Renders the Component if there is a visual component.
Implemented in TileMap, CollisionComponent, AIControllerComponent, PhysicsComponent, Sprite, Background, ControllerComponent, TransformComponent, and CollectibleComponent.
|
pure virtual |
Pure virtual Update Method. Performs any updates needed to this component each frame.
Implemented in TileMap, CollisionComponent, AIControllerComponent, PhysicsComponent, Sprite, Background, ControllerComponent, TransformComponent, and CollectibleComponent.