diff --git a/README.md b/README.md index fb0daf8..525772b 100644 --- a/README.md +++ b/README.md @@ -1,13 +1,26 @@ -# UECS -**U**bpa **E**ntity-**C**omponent-**S**ystem in Unity3D-style +``` + + __ __ _______ ______ _______. +| | | | | ____| / | / | +| | | | | |__ | ,----' | (----` +| | | | | __| | | \ \ +| `--' | | |____ | `----.----) | + \______/ |_______| \______|_______/ + + +``` ⭐ Star us on GitHub — it helps! [![repo-size](https://img.shields.io/github/languages/code-size/Ubpa/UECS?style=flat)](https://github.com/Ubpa/UECS/archive/master.zip) [![tag](https://img.shields.io/github/v/tag/Ubpa/UECS)](https://github.com/Ubpa/UECS/tags) [![license](https://img.shields.io/github/license/Ubpa/UECS)](LICENSE) +# UECS + +**U**bpa **E**ntity-**C**omponent-**S**ystem in Unity3D-style + ## Environment -- MSVC 16.5.3 + +- VS 2019 - C++ 17 - CMake 16.3 + diff --git a/include/UECS/CmptTag.h b/include/UECS/CmptTag.h index 4e5166f..fd73fc5 100644 --- a/include/UECS/CmptTag.h +++ b/include/UECS/CmptTag.h @@ -41,6 +41,8 @@ namespace Ubpa::UECS { template using DecayTag_t = typename DecayTag::type; + // TODO: use IsInstance to simplify Is + template struct IsLastFrame; template diff --git a/include/UECS/EntityMngr.h b/include/UECS/EntityMngr.h index cff230d..0784736 100644 --- a/include/UECS/EntityMngr.h +++ b/include/UECS/EntityMngr.h @@ -27,8 +27,10 @@ namespace Ubpa::UECS { public: template std::tuple Create(); + // use RTDCmptTraits Entity Create(const CmptType* types, size_t num); + // call Create(const CmptType*, size_t) template std::tuple Attach(Entity); + // use RTDCmptTraits void Attach(Entity, const CmptType* types, size_t num); + + // call Attach(Entity, const CmptType*, size_t) template&&...)>> @@ -53,8 +58,10 @@ namespace Ubpa::UECS { template void Detach(Entity); + // use RTDCmptTraits void Detach(Entity, const CmptType* types, size_t num); + // call Detach(Entity, const CmptType*, size_t); template... // - - tagged component: {LastFrame|Write|Latest} // 2. job: empty argument list - // 3. runtime dynamic function: const EntityLocator* locator, void** cmpts + // 3. runtime dynamic function: RTDCmptsView class SystemFunc { public: EntityQuery query;