Update systems to the new view

This commit is contained in:
Zoe Roux
2021-06-05 18:42:10 +02:00
parent acb3935c7c
commit f20445cdc8
24 changed files with 213 additions and 131 deletions

View File

@@ -17,10 +17,10 @@ namespace BBM
: System(wal)
{}
void GamepadSystem::onFixedUpdate(WAL::Entity &entity)
void GamepadSystem::onFixedUpdate(WAL::ViewEntity<GamepadComponent, ControllableComponent> &entity)
{
const auto &gamepadComponent = entity.getComponent<GamepadComponent>();
auto &controllable = entity.getComponent<ControllableComponent>();
const auto &gamepadComponent = entity.get<GamepadComponent>();
auto &controllable = entity.get<ControllableComponent>();
Gamepad gamepad(gamepadComponent.getID());
const std::map<Button, bool &> keyPressedMap = {