From 831e814ce9bdb84e86c06c4a52008f6bdaaa00d6 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 16 Nov 2018 00:24:51 +0800 Subject: =?UTF-8?q?*=E5=90=88=E5=B9=B6master=E5=88=B0minimal=E5=88=86?= =?UTF-8?q?=E6=94=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Game/je_entity.h | 64 ++++++--------------------------------------- 1 file changed, 8 insertions(+), 56 deletions(-) (limited to 'src/libjin/Game/je_entity.h') 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 -#include -#include - -#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 EntityList; - - /// - /// Entity set. For searching and keeps entities unique and sorted. - /// - typedef std::set EntitySet; - } // namespace Game -} // namespace JinEngine - -#endif // jin_game +} // namespace JinEngine #endif \ No newline at end of file -- cgit v1.1-26-g67d0