Exemplo n.º 1
0
        public ECSEngine()
        {
            entityPool  = new EntityPool();
            components  = new Components();
            systemPool  = new SystemPool();
            groupsCache = new Dictionary <Filter, List <uint> >();

            eventBus = new EventBus(this, entityPool, components, systemPool);
        }
Exemplo n.º 2
0
        public EventBus(ECSEngine engine, EntityPool entityPool, Components componentPool, SystemPool systemPool)
        {
            this.engine     = engine;
            this.entityPool = entityPool;
            this.components = componentPool;
            this.systemPool = systemPool;

            this.components.EventBus = this;
            this.systemPool.EventBus = this;
        }