Add current progression
This commit is contained in:
19
src/core/systems/InputProcessor.h
Normal file
19
src/core/systems/InputProcessor.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <entityx/entityx.h>
|
||||
#include "../../GameServer.h"
|
||||
#include "../Components.h"
|
||||
|
||||
struct InputProcessor : public entityx::System<InputProcessor>
|
||||
{
|
||||
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<InputVelocity, PhysicBody>([](entityx::Entity entity, InputVelocity &iVel, PhysicBody &bod) {
|
||||
// Do things with entity, position and direction.
|
||||
});
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user