#pragma once #include #include "../../GameServer.h" #include "../Components.h" struct InputProcessor : public entityx::System { InputProcessor(GameServer *server) : m_gserver(server) {} GameServer *m_gserver; void update(entityx::EntityManager &es, entityx::EventManager &events, entityx::TimeDelta dt) override { //For each with input component look for id es.each([](entityx::Entity entity, InputVelocity &iVel, PhysicBody &bod) { // Do things with entity, position and direction. }); }; };