Added TickObject.h/.cpp

This commit is contained in:
2024-08-07 01:30:41 +08:00
parent 1bc9a625da
commit 8bd440674b
4 changed files with 43 additions and 0 deletions

25
inc/hgl/type/TickObject.h Normal file
View File

@@ -0,0 +1,25 @@
#pragma once
#include<hgl/type/_Object.h>
namespace hgl
{
class TickObject:public _Object
{
private:
bool EnableTick=false;
public:
const bool &IsEnabledTick()const{return EnableTick;}
void SetEnableTick(bool et){EnableTick=et;}
public:
TickObject()=default;
virtual ~TickObject()=default;
virtual void Tick()=0;
};//class TickObject:public _Object
}//namespace hgl

View File

@@ -5,11 +5,18 @@
namespace hgl
{
//对象属性位定义
#define HGL_OBJECT_ATTRIBUTE_BIT_TICK 0x00000001
/**
* 最终基类
*/
class _Object ///最终基类
{
private:
unsigned int object_attribute_bits=0; ///<对象属性位集合
public:
virtual ~_Object()=default; ///<本类析构函数