aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Game/je_entity.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/Game/je_entity.h')
-rw-r--r--src/libjin/Game/je_entity.h64
1 files changed, 8 insertions, 56 deletions
diff --git a/src/libjin/Game/je_entity.h b/src/libjin/Game/je_entity.h
index 4a252da..39822b6 100644
--- a/src/libjin/Game/je_entity.h
+++ b/src/libjin/Game/je_entity.h
@@ -1,15 +1,7 @@
-#ifndef __JE_GAME_OBJECT_H
-#define __JE_GAME_OBJECT_H
+#ifndef __JE_ENTITY_H__
+#define __JE_ENTITY_H__
-#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"
+#include "je_gameobject.h"
namespace JinEngine
{
@@ -17,59 +9,19 @@ namespace JinEngine
{
///
- /// Game object base class.
+ ///
///
- class Entity : public Object
+ class Entity : public GameObject
{
public:
+ Entity();
- ///
- ///
- ///
- virtual ~Entity();
-
- ///
- ///
- ///
- void lifecycle();
-
- ///
- ///
- ///
- void setVisible(bool isVisible);
+ private:
- ///
- ///
- ///
- 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, 64 now
- bool mIsVisible; // if the entity is visible or not
- bool mIsActive; // if the entity is joined into the logic
};
- ///
- /// Entity list. For quickly adding and removing entities.
- ///
- typedef std::list<Entity*> EntityList;
-
- ///
- /// Entity set. For searching and keeps entities unique and sorted.
- ///
- typedef std::set<Entity*> EntitySet;
-
} // namespace Game
-} // namespace JinEngine
-
-#endif // jin_game
+} // namespace JinEngine
#endif \ No newline at end of file