aboutsummaryrefslogtreecommitdiff
path: root/game/StartGameScript.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-06 11:27:15 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-06 11:27:15 +0100
commitc35a53ff122d9ea3547ef8ae6035bd9e1b10d4cb (patch)
tree38af0734a951440ffdc7daac0e66aa1ba9b7287b /game/StartGameScript.cpp
parent2c4494e371881361e5c883e8fe6952af3400cadc (diff)
parent20ae1e9dc2043ef3c190f77dd5f9de74bcd533de (diff)
pull max char
Diffstat (limited to 'game/StartGameScript.cpp')
-rw-r--r--game/StartGameScript.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/game/StartGameScript.cpp b/game/StartGameScript.cpp
index 50ba86c..c786eb4 100644
--- a/game/StartGameScript.cpp
+++ b/game/StartGameScript.cpp
@@ -1,4 +1,5 @@
#include "StartGameScript.h"
+#include "Config.h"
#include <crepe/api/Animator.h>
#include <crepe/api/ParticleEmitter.h>
@@ -50,7 +51,7 @@ void StartGameScript::fixed_update(crepe::duration_t dt) {
// Start camera movement, enable player jumping and disable this script
if (player_transform.position.x > 500) {
Rigidbody & rb = this->get_components_by_name<Rigidbody>("camera").front();
- rb.data.linear_velocity = vec2(100, 0);
+ rb.data.linear_velocity = vec2(PLAYER_SPEED * dt.count(), 0);
BehaviorScript & player_script
= this->get_components_by_name<BehaviorScript>("player").front();
player_script.active = true;