Hummingbird Framework
|
Base class for implementing custom Components. More...
#include <GameObject.h>
Public Member Functions | |
Component () | |
Default constructor. More... | |
virtual | ~Component () |
Default destructor. | |
virtual void | init () |
Function called once after the Component has been added to a GameObject. More... | |
virtual void | preUpdate () |
Function called in the pre-update step. | |
virtual void | update () |
Function called in the update step. | |
virtual void | postUpdate () |
Function called in the post-update step. | |
GameObject * | getGameObject () const |
Get the GameObject instance composed by this Component. More... | |
void | setActive (bool active) |
Set if Component is active. More... | |
bool | isActive () const |
Get if Component is active. More... | |
Protected Member Functions | |
void | addListenerToGameObject (const std::string &name, std::function< void(DataRepository &)> &&listener) |
void | ignoreToGameObject (const GameObjectMessageManager::ListenerId< DataRepository > &listener_id) |
Friends | |
class | GameObject |
Base class for implementing custom Components.
|
inline |
Default constructor.
At this point getGameObject() is pointing to nothing.
|
inline |
Get the GameObject instance composed by this Component.
|
inlinevirtual |
Function called once after the Component has been added to a GameObject.
At this point getGameObject() returns a pointer to the containing GameObject instance.
Reimplemented in hb::RigidBody2dComponent, and hb::ListenerComponent.
|
inline |
|
inline |