Add current progression

This commit is contained in:
Julian
2020-03-28 13:50:48 +01:00
parent 72129de8f0
commit c5f9dfd628
12 changed files with 169 additions and 17 deletions

View 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.
});
};
};