|
Jagguar Game Engine
|
#include <Component.hpp>

Public Member Functions | |
| Component () | |
| ~Component () | |
| virtual void | Update (SDL_Event e, int frame, std::vector< std::string > broadcastList) |
| virtual void | Render (SDL_Renderer *ren) |
| virtual void | ShowComponentEditor (bool *showEditor) |
| virtual bool | HasTag (ComponentTag t) |
| virtual const char * | ComponentTypeName () |
| void | ParseAndUpdateBroadcast (std::vector< std::string > broadcastList) |
Protected Attributes | |
| std::vector< ComponentTag > | tags |
| std::vector< std::string > | previousBroadcasts |
| std::vector< std::string > | pendingBroadcasts |
Virtual class for all components to inherit from. Contains all the functionality for Game Objects.
| Component::Component | ( | ) |
Construct a new Component object
| Component::~Component | ( | ) |
Destroy the Component object
|
inlinevirtual |
The name of the component type. Used by the GUI
Reimplemented in ControllerComponent, HealthComponent, RigidbodyComponent, SpriteComponent, TileMapComponent, and TransformComponent.

|
virtual |
Checks if the component has the given tag
| t | the tag to be checked |
| void Component::ParseAndUpdateBroadcast | ( | std::vector< std::string > | broadcastList | ) |
|
virtual |
Renders the component (if it has anything to render)
| ren | the SDL renderer to be displayed upon |
Reimplemented in HealthComponent, ProjectileComponent, SpriteComponent, TileMapComponent, and TransformComponent.
|
virtual |
Using Imgui, render an editor for this component
| showEditor |
Reimplemented in ControllerComponent, HealthComponent, RigidbodyComponent, SpriteComponent, TileMapComponent, and TransformComponent.

|
virtual |
Updates the state of the component object. Called by the Engine every tick
| e | any inputs given by the user |
| frame | what frame is the game currently displaying |
| broadcastList | a list to be used to send messages between components |
Reimplemented in ControllerComponent, ProjectileComponent, RigidbodyComponent, SpriteComponent, TileMapComponent, TransformComponent, and HealthComponent.