aboutsummaryrefslogtreecommitdiff
path: root/game/scheduler/ObjectsScheduler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/scheduler/ObjectsScheduler.cpp')
-rw-r--r--game/scheduler/ObjectsScheduler.cpp12
1 files changed, 10 insertions, 2 deletions
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<MissileSpawnEvent>(MissileSpaw
void ObjectsScheduler::preset_2() { trigger_event<CreateZapperEvent>(CreateZapperEvent {}); }
void ObjectsScheduler::preset_3() {}
void ObjectsScheduler::preset_4() {}
-void ObjectsScheduler::boss_fight_1() { trigger_event<BattleStartEvent>(BattleStartEvent {}); }
+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 = 5});
+}
bool ObjectsScheduler::boss_fight_1_event() {
- std::cout << "BATTLE WON" << std::endl;
+ this->get_components_by_name<Rigidbody>("camera").front().get().data.linear_velocity.x = PLAYER_SPEED;
+ this->get_components_by_name<Rigidbody>("player").front().get().data.linear_velocity.x = PLAYER_SPEED;
return false;
}