#include #include #include #include #include #include #include #include #include Engine::Engine(void) : shouldRun(true), systems(game::entities, game::events) { } void Engine::init(void) { game::config::read(); game::events.subscribe(*this); systems.add(); systems.add(); systems.add(); //systems.add(); systems.add(); systems.add(); systems.add(); systems.add(); systems.add(); systems.add(); systems.configure(); ui::initSounds(); game::config::update(); getSystem()->create(); } void Engine::render(entityx::TimeDelta dt) { systems.update(dt); //systems.update(dt); // doesn't do anything... ui::fadeUpdate(); } void Engine::resetRender(entityx::TimeDelta dt) { systems.update(dt); } void Engine::update(entityx::TimeDelta dt) { systems.update(dt); systems.update(dt); //systems.update(dt); // doesn't do anything systems.update(dt); systems.update(dt); //systems.update(dt); // doesn't do anything } namespace game { entityx::EventManager events; entityx::EntityManager entities (events); //SpriteLoader sprite_l; Engine engine; }