diff options
Diffstat (limited to 'game')
-rw-r--r-- | game/CMakeLists.txt | 7 | ||||
-rw-r--r-- | game/menus/MenusConfig.h | 1 | ||||
-rw-r--r-- | game/prefab/ZapperPoolScript.cpp | 4 | ||||
-rw-r--r-- | game/scheduler/ObjectsScheduler.cpp | 6 | ||||
-rw-r--r-- | game/scheduler/ObjectsScheduler.h | 2 |
5 files changed, 6 insertions, 14 deletions
diff --git a/game/CMakeLists.txt b/game/CMakeLists.txt index dec161d..d1f49ed 100644 --- a/game/CMakeLists.txt +++ b/game/CMakeLists.txt @@ -10,7 +10,7 @@ add_subdirectory(../src crepe) add_executable(main) -add_executable(main PUBLIC +target_sources(main PUBLIC #background background/AquariumSubScene.cpp background/AquariumScript.cpp @@ -43,13 +43,8 @@ add_executable(main PUBLIC preview/NpcScript.cpp preview/PrevPlayerSubScene.cpp preview/PrevPlayerScript.cpp - main.cpp # scripts - -add_executable(main) - -target_sources(main PUBLIC GameScene.cpp MoveCameraManualyScript.cpp StartGameScript.cpp diff --git a/game/menus/MenusConfig.h b/game/menus/MenusConfig.h index 968f8cc..3e357a5 100644 --- a/game/menus/MenusConfig.h +++ b/game/menus/MenusConfig.h @@ -3,7 +3,6 @@ //generic menu config static constexpr int STARTING_SORTING_IN_LAYER = 7; -static constexpr const char * CAMERA_NAME = "camera"; //Scene names static constexpr const char * START_SCENE = "scene1"; static constexpr const char * PREVIEW_SCENE = "preview scene"; diff --git a/game/prefab/ZapperPoolScript.cpp b/game/prefab/ZapperPoolScript.cpp index ac6ce96..b9b2a76 100644 --- a/game/prefab/ZapperPoolScript.cpp +++ b/game/prefab/ZapperPoolScript.cpp @@ -30,10 +30,6 @@ void ZapperPoolScript::fixed_update(crepe::duration_t) { if (zapper.transform.position.x < threshold) zapper.set_active(false); } - - if (i-- > 0) return; - i = 200; - queue_event<CreateZapperEvent>(); } void ZapperPoolScript::spawn_random() { diff --git a/game/scheduler/ObjectsScheduler.cpp b/game/scheduler/ObjectsScheduler.cpp index f354e70..21465e3 100644 --- a/game/scheduler/ObjectsScheduler.cpp +++ b/game/scheduler/ObjectsScheduler.cpp @@ -5,13 +5,13 @@ #include "../Random.h" #include "../missile/SpawnEvent.h" #include "api/Transform.h" +#include "prefab/ZapperPoolSubScene.h" #include <iostream> using namespace crepe; - void ObjectsScheduler::preset_0() { trigger_event<MissileSpawnEvent>(MissileSpawnEvent {}); } void ObjectsScheduler::preset_1() { trigger_event<MissileSpawnEvent>(MissileSpawnEvent {}); } -void ObjectsScheduler::preset_2() {} +void ObjectsScheduler::preset_2() { trigger_event<CreateZapperEvent>(CreateZapperEvent {}); } void ObjectsScheduler::preset_3() {} void ObjectsScheduler::preset_4() {} void ObjectsScheduler::boss_fight_1() { std::cout << "Boss fight" << std::endl; } @@ -19,6 +19,8 @@ void ObjectsScheduler::boss_fight_1() { std::cout << "Boss fight" << std::endl; void ObjectsScheduler::init() { this->obstacles.push_back([this]() { preset_0(); }); this->obstacles.push_back([this]() { preset_1(); }); + this->obstacles.push_back([this]() { preset_2(); }); + this->obstacles.push_back([this]() { boss_fight_1(); }); // subscribe to battlewonevent diff --git a/game/scheduler/ObjectsScheduler.h b/game/scheduler/ObjectsScheduler.h index d2d0f55..7bc9337 100644 --- a/game/scheduler/ObjectsScheduler.h +++ b/game/scheduler/ObjectsScheduler.h @@ -15,7 +15,7 @@ private: int last_boss_check = 0; int last_obstacle_check = 0; - int boss_fight_interval = 2000; + int boss_fight_interval = 2500; int obstacle_interval = 300; int start_offset = 1300; |