Giter VIP home page Giter VIP logo

entitas-cpp's People

Contributors

judelco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

entitas-cpp's Issues

pool's componentPools.

	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?

Reactive systems example won't compile

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

compile error

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?

no instance of function template "EntitasPP::ComponentTypeId::Get" matches the argument list

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.

use_count > 1 error

EntityPtr createdEntity = pool->CreateEntity();
pool->ClearGroups();
pool->DestroyAllEntities();

this code will occur an runtime_error. use_count issues

pool's components.

	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?

is the order of the entities matching in a group guaranteed?

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.