mirror of
https://github.com/zoriya/Bomberman.git
synced 2026-05-28 00:31:50 +00:00
Trying to merge with develop
This commit is contained in:
@@ -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},
|
||||
|
||||
Reference in New Issue
Block a user