blob: 3d06476a581d400b2163d5726cde3ae3b4678807 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#include <cassert>
#include <crepe/api/Rigidbody.h>
#include "PlayerScript.h"
using namespace crepe;
using namespace std;
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});
}
|