|
SPARK
0.1.0
A general purpose game engine written in C++.
|
A CRTP class to implement a GameObject. It is used to wrap the onSpawn, onUpdate and onDestroyed methods to include custom code around user implementation. More...
#include <AbstractGameObject.h>
Public Member Functions | |
| AbstractGameObject (GameObject *parent=nullptr) | |
| AbstractGameObject (const AbstractGameObject &other)=delete | |
| AbstractGameObject (AbstractGameObject &&other) noexcept=default | |
| AbstractGameObject & | operator= (const AbstractGameObject &other)=delete |
| AbstractGameObject & | operator= (AbstractGameObject &&other) noexcept=default |
| void | onSpawn () |
| Method calling the corresponding method on the implementation, the children and components. | |
| void | onUpdate (float dt) |
| Method calling the corresponding method on the implementation, the children and components. | |
| void | onDestroyed () |
| Method calling the corresponding method on the implementation, the children and components. | |
Public Member Functions inherited from spark::patterns::Composite< GameObject, GameObjectDeleter > | |
| Composite (GameObject *parent) | |
| Composite (const Composite &other)=delete | |
| Composite (Composite &&other) noexcept=default | |
| Composite & | operator= (const Composite &other)=delete |
| Composite & | operator= (Composite &&other) noexcept=default |
| std::vector< GameObject * > | children () const |
| GameObject * | parent () |
| const GameObject * | parent () const |
| GameObject * | root () |
| const GameObject * | root () const |
Friends | |
| class | spark::core::GameObject |
A CRTP class to implement a GameObject. It is used to wrap the onSpawn, onUpdate and onDestroyed methods to include custom code around user implementation.
| Impl | The implementation of the GameObject. |
| void spark::core::details::AbstractGameObject< Impl >::onUpdate | ( | float | dt | ) |
Method calling the corresponding method on the implementation, the children and components.
| dt | The time in seconds since the last frame. |