ProtoZed
awesome branch
A simple but powerful game framework
|
Small reusable block of behavior. More...
Public Member Functions | |
virtual | ~Component () |
virtual void | Init () |
Initializes the component. | |
virtual void | Destroy () |
Destroys the component. | |
virtual void | Update (float deltaTime) |
Runs an update. | |
Application & | GetApplication () const |
EntityID | GetOwnerID () const |
MetaEntity | GetOwnerEntity () const |
EntityManager & | GetManager () const |
const Timestamp & | GetTimestamp () const |
Gets the timestamp for when this component was last updated. | |
![]() | |
PropertyList () | |
virtual | ~PropertyList () |
bool | AddProperty (PropertyBase &prop) |
bool | RemoveProperty (const std::string &name) |
void | ClearProperties () |
bool | HasProperty (const std::string &name) const |
PropertyBase & | GetProperty (const std::string &name) |
const PropertyBase & | GetProperty (const std::string &name) const |
template<typename T > | |
Property< T > & | GetProperty (const std::string &name) |
template<typename T > | |
const Property< T > & | GetProperty (const std::string &name) const |
const PropertyMap & | GetAllProperties () const |
![]() | |
EventHandler () | |
virtual | ~EventHandler () |
bool | SubscribeTo (EventHandler &handler) |
bool | UnsubscribeTo (EventHandler &handler) |
template<class T , class EventT > | |
bool | RegisterEvent (T *obj, void(T::*memFn)(EventT &)) |
template<class T , class EventT > | |
bool | UnregisterEvent (T *obj, void(T::*memFn)(EventT &)) |
void | HandleEvent (const Event &e) |
void | EmitEvent (const Event &e) const |
Protected Member Functions | |
Component () | |
Default constructor. | |
void | UpdateTimestamp () |
virtual void | PropertyUpdated (const PropertyBase &prop) |
![]() | |
NonCopyable () | |
Friends | |
class | EntityManager |
Small reusable block of behavior.
|
inlineprotected |
Default constructor.
Don't put any initialization logic inside the constructor (anything that will call GetManager() or GetOwnerID()). Use Init() instead.
|
inlinevirtual |
|
inlinevirtual |
Destroys the component.
This is provided for consistency with Init(). It is okay to put destruction logic inside the destructor.
You should not call this method. It will be called by EntityManager.
Reimplemented in PZ::SceneNode.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Gets the timestamp for when this component was last updated.
This can be used to do an update only when the component has changed.
|
inlinevirtual |
Initializes the component.
You should not call this method. It will be called by EntityManager.
Reimplemented in PZ::Position2D.
|
inlineprotectedvirtual |
Reimplemented from PZ::PropertyList.
Reimplemented in PZ::Position2D.
|
inlinevirtual |
Runs an update.
deltaTime | Time since the last frame. |
|
inlineprotected |
|
friend |