Trying to merge with develop

This commit is contained in:
Zoe Roux
2021-06-07 14:40:24 +02:00
112 changed files with 2955 additions and 1081 deletions
+5 -9
View File
@@ -6,24 +6,20 @@
#include "KeyboardSystem.hpp"
#include "Component/Keyboard/KeyboardComponent.hpp"
#include "Component/Controllable/ControllableComponent.hpp"
#include "Entity/Entity.hpp"
#include "Controllers/Keyboard.hpp"
using Keyboard = RAY::Controller::Keyboard;
namespace BBM
{
KeyboardSystem::KeyboardSystem()
: WAL::System({
typeid(KeyboardComponent),
typeid(ControllableComponent)
})
KeyboardSystem::KeyboardSystem(WAL::Wal &wal)
: System(wal)
{}
void KeyboardSystem::onUpdate(WAL::Entity &entity, std::chrono::nanoseconds)
void KeyboardSystem::onUpdate(WAL::ViewEntity<KeyboardComponent, ControllableComponent> &entity, std::chrono::nanoseconds)
{
const auto &keyboard = entity.getComponent<KeyboardComponent>();
auto &controllable = entity.getComponent<ControllableComponent>();
const auto &keyboard = entity.get<KeyboardComponent>();
auto &controllable = entity.get<ControllableComponent>();
const std::map<KeyboardKey, bool &> keyPressedMap = {
{keyboard.keyJump, controllable.jump},