aboutsummaryrefslogtreecommitdiff
path: root/game/prefab/PlayerScript.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-12-22 20:05:02 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-12-22 20:05:02 +0100
commitec69f40540317215d0f30e1f8e43d0e18450f8cc (patch)
tree1468a8d5bbf4a8800cee89c9e114d09348fa88bb /game/prefab/PlayerScript.cpp
parenta600cc55468a6513743ce916aa3da129270c23f0 (diff)
`make format`
Diffstat (limited to 'game/prefab/PlayerScript.cpp')
-rw-r--r--game/prefab/PlayerScript.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/game/prefab/PlayerScript.cpp b/game/prefab/PlayerScript.cpp
index 67aadb6..3d06476 100644
--- a/game/prefab/PlayerScript.cpp
+++ b/game/prefab/PlayerScript.cpp
@@ -1,15 +1,13 @@
-#include <crepe/api/Rigidbody.h>
#include <cassert>
+#include <crepe/api/Rigidbody.h>
#include "PlayerScript.h"
using namespace crepe;
using namespace std;
-PlayerScript::PlayerScript(const PlayerObject & player) : player(player) { }
+PlayerScript::PlayerScript(const PlayerObject & player) : player(player) {}
void PlayerScript::fixed_update(crepe::duration_t dt) {
- if (this->get_key_state(Keycode::SPACE))
- player.body.add_force_linear({ 0, -10 });
+ if (this->get_key_state(Keycode::SPACE)) player.body.add_force_linear({0, -10});
}
-