diff options
Diffstat (limited to 'src/libjin/Game')
-rw-r--r-- | src/libjin/Game/je_entity.cpp | 11 | ||||
-rw-r--r-- | src/libjin/Game/je_entity.h | 31 | ||||
-rw-r--r-- | src/libjin/Game/je_scene.cpp | 0 | ||||
-rw-r--r-- | src/libjin/Game/je_scene.h | 4 |
4 files changed, 38 insertions, 8 deletions
diff --git a/src/libjin/Game/je_entity.cpp b/src/libjin/Game/je_entity.cpp new file mode 100644 index 0000000..1396518 --- /dev/null +++ b/src/libjin/Game/je_entity.cpp @@ -0,0 +1,11 @@ +#include "je_entity.h" + +namespace JinEngine +{ + namespace Game + { + + + + } // namespace Game +} // namespace JinEngine
\ No newline at end of file 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 }; diff --git a/src/libjin/Game/je_scene.cpp b/src/libjin/Game/je_scene.cpp new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/src/libjin/Game/je_scene.cpp diff --git a/src/libjin/Game/je_scene.h b/src/libjin/Game/je_scene.h index 34d4569..f510a1f 100644 --- a/src/libjin/Game/je_scene.h +++ b/src/libjin/Game/je_scene.h @@ -65,8 +65,8 @@ namespace JinEngine }; - } -} + } // namespace Game +} // namespace JinEngine #endif // jin_game |