judelco / entitas-cpp Goto Github PK
View Code? Open in Web Editor NEWEntitas++ is a fast Entity Component System (ECS) C++11 port of Entitas C#
License: MIT License
Entitas++ is a fast Entity Component System (ECS) C++11 port of Entitas C#
License: MIT License
entity = EntityPtr(new Entity(&mComponentPools), [](void* entity)
{
(static_cast<Entity*>(entity)->OnEntityReleased(static_cast<Entity*>(entity)));
});
when new pool,the mComponentPools is null, so use pool to create entity, no componetpool to entity, entity add componet by self, but why entity's component ref not pass to pool's mComponentPools, because entity's component not need pass to pool's mComponentPools, the mComponentPools will always null. so this a problem?
I noticed there havent been any changes in awhile - is it still up to date with the main CSharp version?
When trying to add the reactive system example from the readme to the project's main.cpp, Visual Studio won't compile with the following error:
Error C2280 'EntitasPP::IReactiveSystem::IReactiveSystem(void)': attempting to reference a deleted function
When omitting the constructor, CreateSystem() will fail because it apparently expects one.
Assigning the trigger event in the constructor also fails as the expected and returned type don't match.
Any ideas?
Here's a gist: https://gist.github.com/mhaemmerle/851273780b3af155d801302458e24b16
Hi, When i compiled it, some compile error about std::funtion,
and I add ///#include functional, in Delegate.hpp , it works well.
maybe forgot it or the version of compiler diff?
shared_ptr<Group> _group;
public:
void SetPool(Pool* pool) override
{
_group = pool->GetGroup(Matcher_AllOf(ObjectmatrixComponent, PositionComponent));
When i want to get a group with a matcher that has multiple types i get this error.
no instance of function template "EntitasPP::ComponentTypeId::Get" matches the argument list
The types are both IComponent.
I also tried it like this.
ComponentIdList l;
public:
void SetPool(Pool* pool) override
{
l.push_back(ComponentTypeId::Get<ObjectmatrixComponent>());
l.push_back(ComponentTypeId::Get<PositionComponent>());
Matcher m = Matcher::AllOf(l);
pool->GetGroup(m)->OnEntityAdded += [](std::shared_ptr<Group> group, EntityPtr entity, ComponentId index, IComponent* component)
{
cout << "test" << endl;
};
Then i get a crash.
void Pool::UpdateGroupsComponentAddedOrRemoved
events has a nullptr.
EntityPtr createdEntity = pool->CreateEntity();
pool->ClearGroups();
pool->DestroyAllEntities();
this code will occur an runtime_error. use_count issues
entity = EntityPtr(new Entity(&mComponentPools), [](void* entity)
{
(static_cast<Entity*>(entity)->OnEntityReleased(static_cast<Entity*>(entity)));
});
when new pool,the mComponentPools is null, so use pool to create entity, no componetpool to entity, entity add componet by self, but why no component ref pass to pool's mComponentPools, because entity's component not need pass to pool's mComponentPools, the mComponentPools will always null. so this a problem?
I am adding new entities with a given component and in a system, I'm iterating over the existing entities that have that component using a group matcher. Are the entities returned with the getEntity function guaranteed to be provided in the same order in which they given assigned given component?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.