From fc077c51008831b85f847ca9f817992da6b6608d Mon Sep 17 00:00:00 2001 From: hyzboy Date: Fri, 14 Jul 2023 23:36:26 +0800 Subject: [PATCH] renamed follow ObjectManage --- RuntimeAssetManager.h | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/RuntimeAssetManager.h b/RuntimeAssetManager.h index 7fe6e46..b00322c 100644 --- a/RuntimeAssetManager.h +++ b/RuntimeAssetManager.h @@ -1,10 +1,10 @@ #pragma once -#include +#include using namespace hgl; -template struct RuntimeAssetManager:public ResManage +template struct RuntimeAssetManager:public ObjectManage { public: @@ -12,7 +12,7 @@ public: { if(!v)return(false); - return ResManage::Add(v->GetID(),v); + return ObjectManage::Add(v->GetID(),v); } }; @@ -89,4 +89,33 @@ public: } }; +#define HGL_RUNTIME_ASSET_CLASS(RA_ID_TYPE,_RA_CLASS) + #define HGL_RUNTIME_ASSET_DECLARATION(RA_ID_TYPE,RA_CLASS) RuntimeAssetManager RuntimeAsset::RAM; + +/** + * ·¶Ąż + * + * MyRuntimeAsset.h + * + * using MyAssetID=uint; + * + * struct MyRuntimeAsset:public RuntimeAsset + * { + * public: + * + * using RuntimeAsset::RuntimeAsset; + * }; + * + * MyRuntimeAsset.cpp + * + * #include"MyRuntimeAsset.h" + * + * HGL_RUNTIME_ASSET_DECLARATION(MyAssetID,MyRuntimeAsset); + * + */ + + + + +