From 698628cf1fb1b8a1f68bf6a5672d984bd64be58f Mon Sep 17 00:00:00 2001 From: heavydemon21 Date: Wed, 8 Jan 2025 15:26:35 +0100 Subject: added camera stop boss fight --- game/scheduler/ObjectsScheduler.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'game/scheduler/ObjectsScheduler.cpp') diff --git a/game/scheduler/ObjectsScheduler.cpp b/game/scheduler/ObjectsScheduler.cpp index 416a8da..11bb111 100644 --- a/game/scheduler/ObjectsScheduler.cpp +++ b/game/scheduler/ObjectsScheduler.cpp @@ -3,7 +3,9 @@ #include "ObjectsScheduler.h" #include "../Random.h" +#include "../Config.h" #include "../missile/SpawnEvent.h" +#include "api/Rigidbody.h" #include "api/Transform.h" #include "enemy/BattleScript.h" #include "prefab/ZapperPoolSubScene.h" @@ -15,10 +17,16 @@ void ObjectsScheduler::preset_1() { trigger_event(MissileSpaw void ObjectsScheduler::preset_2() { trigger_event(CreateZapperEvent {}); } void ObjectsScheduler::preset_3() {} void ObjectsScheduler::preset_4() {} -void ObjectsScheduler::boss_fight_1() { trigger_event(BattleStartEvent {}); } +void ObjectsScheduler::boss_fight_1() { + this->get_components_by_name("camera").front().get().data.linear_velocity.x = 0; + this->get_components_by_name("player").front().get().data.linear_velocity.x = 0; + + this->trigger_event(BattleStartEvent{.num_enemies = 5}); +} bool ObjectsScheduler::boss_fight_1_event() { - std::cout << "BATTLE WON" << std::endl; + this->get_components_by_name("camera").front().get().data.linear_velocity.x = PLAYER_SPEED; + this->get_components_by_name("player").front().get().data.linear_velocity.x = PLAYER_SPEED; return false; } -- cgit v1.2.3