diff options
author | JAROWMR <jarorutjes07@gmail.com> | 2025-01-09 21:15:06 +0100 |
---|---|---|
committer | JAROWMR <jarorutjes07@gmail.com> | 2025-01-09 21:15:06 +0100 |
commit | 5863e43cdbf19738dabbd285e92622d740c72f71 (patch) | |
tree | 77e2af84b538498e5de2113d18dd3ee10c6139bc /game/scheduler/ObjectsScheduler.cpp | |
parent | f6683fa71fa670cfbe6aa6233fafb869295da11a (diff) | |
parent | 8b32dbc33c434f84b4aab98819147c3b8416ff69 (diff) |
Merge branch 'master' of github.com:lonkaars/crepe into jaro/game
Diffstat (limited to 'game/scheduler/ObjectsScheduler.cpp')
-rw-r--r-- | game/scheduler/ObjectsScheduler.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/game/scheduler/ObjectsScheduler.cpp b/game/scheduler/ObjectsScheduler.cpp index 60e3f47..3ce2018 100644 --- a/game/scheduler/ObjectsScheduler.cpp +++ b/game/scheduler/ObjectsScheduler.cpp @@ -23,6 +23,12 @@ void ObjectsScheduler::boss_fight_1() { this->get_components_by_name<Rigidbody>("camera").front().get().data.linear_velocity.x = 0; this->get_components_by_name<Rigidbody>("player").front().get().data.linear_velocity.x = 0; this->trigger_event<BattleStartEvent>(BattleStartEvent {.num_enemies = 2}); + + RefVector<Rigidbody> rb_back_forest + = this->get_components_by_tag<Rigidbody>("forest_background"); + for (Rigidbody & rb : rb_back_forest) { + rb.data.linear_velocity.x = 0; + } } bool ObjectsScheduler::boss_fight_1_event() { @@ -30,6 +36,12 @@ bool ObjectsScheduler::boss_fight_1_event() { = PLAYER_SPEED * 0.02; this->get_components_by_name<Rigidbody>("player").front().get().data.linear_velocity.x = PLAYER_SPEED * 0.02; + + RefVector<Rigidbody> rb_back_forest + = this->get_components_by_tag<Rigidbody>("forest_background"); + rb_back_forest.front().get().data.linear_velocity.x = 30; + rb_back_forest.back().get().data.linear_velocity.x = 40; + return false; } |