Handling buttons on key up

This commit is contained in:
Zoe Roux
2021-06-18 12:42:51 +02:00
parent 673d4f446d
commit 8d9432c1f4
6 changed files with 18 additions and 10 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ namespace BBM
};
for (auto key : keyPressedMap)
key.second = Keyboard::isDown(key.first);
key.second = controllable.fastClick ? Keyboard::isDown(key.first) : Keyboard ::isPressed(key.first);
controllable.move = Vector2f();
if (Keyboard::isDown(keyboard.keyRight))
controllable.move.x -= 1;