From 04f7a8ed11f4cf93afe93d03759990a6c670b321 Mon Sep 17 00:00:00 2001 From: chai Date: Tue, 23 Oct 2018 13:30:45 +0800 Subject: =?UTF-8?q?*=E4=BF=AE=E6=94=B9tag=E4=BD=8D=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libjin/Game/je_entity.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 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..d67a71f 100644 --- a/src/libjin/Game/je_entity.h +++ b/src/libjin/Game/je_entity.h @@ -10,6 +10,7 @@ #include "../common/je_object.h" #include "../common/je_types.h" +#include "../graphics/je_sprite.h" namespace JinEngine { @@ -43,15 +44,20 @@ namespace JinEngine /// void setActive(bool isActive); + /// + /// + /// + void setOrder(uint32 order); + protected: virtual void onAlive(); virtual void onUpdate(float dt); virtual void onDraw(); - virtual void onDie(); + virtual void onDestroy(); - uint32 layer; // layer where entity belongs - uint32 index; // render index in layer - uint64 tag; // tag of entity, 64 now + uint32 mLayer; // layer where entity belongs + uint32 mOrder; // render index in layer + uint32 mTag; // tag of entity, support 32 tags now bool mIsVisible; // if the entity is visible or not bool mIsActive; // if the entity is joined into the logic -- cgit v1.1-26-g67d0