diff options
Diffstat (limited to 'game/StartGameScript.cpp')
-rw-r--r-- | game/StartGameScript.cpp | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/game/StartGameScript.cpp b/game/StartGameScript.cpp index e88b329..3de577c 100644 --- a/game/StartGameScript.cpp +++ b/game/StartGameScript.cpp @@ -1,3 +1,4 @@ +#include <iostream> #include "StartGameScript.h" #include "Config.h" #include "api/BehaviorScript.h" @@ -12,7 +13,7 @@ using namespace std; void StartGameScript::fixed_update(crepe::duration_t dt) { Transform & player_transform = this->get_components_by_name<Transform>("player").front(); - + // cout << "startgameScript call speed: " << PLAYER_SPEED * dt.count() << endl; // Create hole in wall and activate panic lamp if (player_transform.position.x > 75 && !this->created_hole) { Sprite & lamp_sprite = this->get_components_by_name<Sprite>("start_end").back(); @@ -63,14 +64,14 @@ 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(PLAYER_SPEED * dt.count(), 0); - BehaviorScript & player_script - = this->get_components_by_name<BehaviorScript>("player").front(); - player_script.active = true; - BehaviorScript & this_script - = this->get_components_by_name<BehaviorScript>("start_game_script").front(); - this_script.active = false; - } + // if (player_transform.position.x > 500) { + // Rigidbody & rb = this->get_components_by_name<Rigidbody>("camera").front(); + // 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; + // BehaviorScript & this_script + // = this->get_components_by_name<BehaviorScript>("start_game_script").front(); + // this_script.active = false; + // } } |