diff options
author | max-001 <maxsmits21@kpnmail.nl> | 2024-12-17 12:29:04 +0100 |
---|---|---|
committer | max-001 <maxsmits21@kpnmail.nl> | 2024-12-17 12:29:04 +0100 |
commit | fd5392e2a4617db5669178169c289dd966064393 (patch) | |
tree | 7c4aaf23c5b73ceb2477c2429a56ba3c2d4f8d12 /src | |
parent | 88ac4197787086487a199c5af7d0f143ddc42432 (diff) |
Improved script
Diffstat (limited to 'src')
-rw-r--r-- | src/example/GameScene.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/example/GameScene.cpp b/src/example/GameScene.cpp index 2c1f989..107f964 100644 --- a/src/example/GameScene.cpp +++ b/src/example/GameScene.cpp @@ -65,13 +65,16 @@ public: jetpack_sprite.active = true; } - // Start camera movement and enable player jumping + // Start camera movement, enable player jumping and disable this script if (player_transform.position.x == 150) { Rigidbody & rb = this->get_components_by_name<Rigidbody>("camera").front(); rb.data.linear_velocity = vec2(100, 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; } } }; |