aboutsummaryrefslogtreecommitdiff
path: root/game/preview/PrevPlayerScript.h
diff options
context:
space:
mode:
Diffstat (limited to 'game/preview/PrevPlayerScript.h')
-rw-r--r--game/preview/PrevPlayerScript.h17
1 files changed, 13 insertions, 4 deletions
diff --git a/game/preview/PrevPlayerScript.h b/game/preview/PrevPlayerScript.h
index cc3184e..ae66449 100644
--- a/game/preview/PrevPlayerScript.h
+++ b/game/preview/PrevPlayerScript.h
@@ -1,10 +1,10 @@
-
+#include <crepe/api/Animator.h>
+#include <crepe/api/Config.h>
#include <crepe/api/Event.h>
+#include <crepe/api/Rigidbody.h>
#include <crepe/api/Script.h>
-#include <crepe/util/OptionalRef.h>
-
-#include <crepe/api/Animator.h>
#include <crepe/api/Sprite.h>
+#include <crepe/util/OptionalRef.h>
class PrevPlayerScript : public crepe::Script {
private:
@@ -20,4 +20,13 @@ private:
void init();
void fixed_update(crepe::duration_t dt);
bool key_pressed(const crepe::KeyPressEvent & ev);
+
+private:
+ bool on_key_down(const crepe::KeyPressEvent & ev);
+ bool on_key_up(const crepe::KeyReleaseEvent & ev);
+ void help_kick(const crepe::vec2 & direction);
+
+private:
+ float & engine_gravity = crepe::Config::get_instance().physics.gravity;
+ crepe::OptionalRef<crepe::Rigidbody> rb;
};