#include "PlayerScript.h" #include using namespace crepe; using namespace std; void PlayerScript::update() { Rigidbody & rb = this->get_components_by_name("player").front(); if (this->get_key_state(Keycode::SPACE)) rb.add_force_linear(vec2(0, -10)); }