aboutsummaryrefslogtreecommitdiff
path: root/game/StartGameScript.cpp
diff options
context:
space:
mode:
authorMax-001 <maxsmits21@kpnmail.nl>2024-12-29 12:29:40 +0100
committerMax-001 <maxsmits21@kpnmail.nl>2024-12-29 12:29:40 +0100
commite7cebc43f567b0fa1701d953a9f25d5f527e89bb (patch)
treeb53e2f18c506f0f2771e236fa6830d2e0af59622 /game/StartGameScript.cpp
parentbc66ba7754dec9d6f907bc69730f211ae2215906 (diff)
Added Player params to Config
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..72bdcd5 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, 0);
BehaviorScript & player_script
= this->get_components_by_name<BehaviorScript>("player").front();
player_script.active = true;