Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubpa committed Jul 30, 2020
1 parent adf2b13 commit 8a16514
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
19 changes: 16 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -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 +

Expand Down
2 changes: 2 additions & 0 deletions include/UECS/CmptTag.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ namespace Ubpa::UECS {
template<typename TaggedCmpt>
using DecayTag_t = typename DecayTag<TaggedCmpt>::type;

// TODO: use IsInstance to simplify Is<some-tag>

template<typename TaggedCmpt>
struct IsLastFrame;
template<typename TaggedCmpt>
Expand Down
7 changes: 7 additions & 0 deletions include/UECS/EntityMngr.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@ namespace Ubpa::UECS {
public:
template<typename... Cmpts>
std::tuple<Entity, Cmpts*...> Create();

// use RTDCmptTraits
Entity Create(const CmptType* types, size_t num);

// call Create(const CmptType*, size_t)
template<typename... CmptTypes,
// for function overload
Expand All @@ -41,8 +43,11 @@ namespace Ubpa::UECS {

template<typename... Cmpts>
std::tuple<Cmpts*...> Attach(Entity);

// use RTDCmptTraits
void Attach(Entity, const CmptType* types, size_t num);

// call Attach(Entity, const CmptType*, size_t)
template<typename... CmptTypes,
// for function overload
typename = std::enable_if_t<(std::is_same_v<CmptTypes, CmptType>&&...)>>
Expand All @@ -53,8 +58,10 @@ namespace Ubpa::UECS {

template<typename... Cmpts>
void Detach(Entity);

// use RTDCmptTraits
void Detach(Entity, const CmptType* types, size_t num);

// call Detach(Entity, const CmptType*, size_t);
template<typename... CmptTypes,
// for function overload
Expand Down
2 changes: 1 addition & 1 deletion include/UECS/SystemFunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace Ubpa::UECS {
// 1. per entity function: [[const] Entity e, ] [size_t indexInQuery, ] <Tagged_Component>...
// - - tagged component: {LastFrame|Write|Latest}<Component>
// 2. job: empty argument list
// 3. runtime dynamic function: const EntityLocator* locator, void** cmpts
// 3. runtime dynamic function: RTDCmptsView
class SystemFunc {
public:
EntityQuery query;
Expand Down

0 comments on commit 8a16514

Please sign in to comment.