#include #include #include #include #include #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.add(); systems.add(); systems.add(); systems.add(); systems.add(); systems.configure(); // init ui FontSystem::init(game::config::fontFamily); FontSystem::setFontSize(16); FontSystem::setFontColor(1, 1, 1); FontSystem::setFontZ(-6.0f); ui::initSounds(); ui::menu::init(); game::config::update(); PlayerSystem::create(); } 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 systems.update(dt); systems.update(dt); systems.update(dt); systems.update(dt); //systems.update(dt); } namespace game { entityx::EventManager events; entityx::EntityManager entities (events); //SpriteLoader sprite_l; Engine engine; }