diff options
Diffstat (limited to 'game/prefab/PlayerScript.cpp')
| -rw-r--r-- | game/prefab/PlayerScript.cpp | 8 | 
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});  } -  |