aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax-001 <maxsmits21@kpnmail.nl>2024-12-24 12:23:15 +0100
committerMax-001 <maxsmits21@kpnmail.nl>2024-12-24 12:23:15 +0100
commit81c25a7aa3722e2a65ccae29d22aa37bc5d1bc70 (patch)
treedd91fab09492e321c0d038c785206f682ba52b35
parent9cdc0a89d9b6f504eeef888f845751977b1bc769 (diff)
Slowed down at end
-rw-r--r--game/EndGameScript.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/game/EndGameScript.cpp b/game/EndGameScript.cpp
index 6b9c47f..55f08cd 100644
--- a/game/EndGameScript.cpp
+++ b/game/EndGameScript.cpp
@@ -1,11 +1,20 @@
#include "EndGameScript.h"
+#include <crepe/api/Rigidbody.h>
+#include <crepe/types.h>
+
+using namespace crepe;
+using namespace std;
+
void EndGameScript::init() {
- logf("EndGameScript::init");
- // ...
+ Rigidbody & rb_player = this->get_components_by_name<Rigidbody>("player").front();
+ Rigidbody & rb_camera = this->get_components_by_name<Rigidbody>("camera").front();
+
+ rb_player.data.linear_velocity_coefficient = vec2(0.8, 0.8);
+ rb_camera.data.linear_velocity_coefficient = vec2(0.8, 0.8);
}
void EndGameScript::fixed_update(crepe::duration_t dt) {
- logf("EndGameScript::fixed_update");
+ //logf("EndGameScript::fixed_update");
// ...
}