diff options
Diffstat (limited to 'src/libjin/Game/je_entity.h')
-rw-r--r-- | src/libjin/Game/je_entity.h | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/src/libjin/Game/je_entity.h b/src/libjin/Game/je_entity.h index 41a3c10..4a252da 100644 --- a/src/libjin/Game/je_entity.h +++ b/src/libjin/Game/je_entity.h @@ -4,9 +4,11 @@ #include "../core/je_configuration.h" #if defined(jin_game) +#include <list> #include <map> #include <set> +#include "../common/je_object.h" #include "../common/je_types.h" namespace JinEngine @@ -17,24 +19,41 @@ namespace JinEngine /// /// Game object base class. /// - class Entity + class Entity : public Object { public: + + /// + /// + /// virtual ~Entity(); + /// + /// + /// void lifecycle(); + /// + /// + /// + void setVisible(bool isVisible); + + /// + /// + /// + void setActive(bool isActive); + protected: virtual void onAlive(); virtual void onUpdate(float dt); virtual void onDraw(); virtual void onDie(); - uint32 layer; // layer where entity belongs - uint32 index; // render index in layer - uint64 tag; // tag of entity - bool mIsVisible; - bool mIsActive; + uint32 layer; // layer where entity belongs + uint32 index; // render index in layer + uint64 tag; // tag of entity, 64 now + bool mIsVisible; // if the entity is visible or not + bool mIsActive; // if the entity is joined into the logic }; |