aboutsummaryrefslogtreecommitdiff
path: root/game/GameScene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/GameScene.cpp')
-rw-r--r--game/GameScene.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/game/GameScene.cpp b/game/GameScene.cpp
index a8fcb47..4193581 100644
--- a/game/GameScene.cpp
+++ b/game/GameScene.cpp
@@ -1,11 +1,3 @@
-#include "GameScene.h"
-#include "Config.h"
-#include "MoveCameraManualyScript.h"
-#include "StartGameScript.h"
-
-#include "background/BackgroundSubScene.h"
-#include "player/PlayerSubScene.h"
-
#include <cmath>
#include <crepe/api/Animator.h>
#include <crepe/api/Asset.h>
@@ -22,10 +14,23 @@
#include <crepe/api/Transform.h>
#include <crepe/types.h>
+#include "Config.h"
+#include "MoveCameraManualyScript.h"
+#include "StartGameScript.h"
+
+#include "GameScene.h"
+#include "MoveCameraManualyScript.h"
+
+#include "player/PlayerSubScene.h"
+#include "background/BackgroundSubScene.h"
+#include "prefab/ZapperObject.h"
+
using namespace crepe;
using namespace std;
void GameScene::load_scene() {
+ logf(Log::DEBUG, "Loading (main) GameScene...");
+
BackgroundSubScene background(*this);
GameObject camera = new_object("camera", "camera", vec2(650, 0));
@@ -64,6 +69,8 @@ void GameScene::load_scene() {
});
ceiling.add_component<BoxCollider>(vec2(INFINITY, 200));
+ ZapperObject {new_object("zapper", "zapper", vec2(800, 0))};
+
GameObject start_game_script = new_object("start_game_script", "script", vec2(0, 0));
start_game_script.add_component<BehaviorScript>().set_script<StartGameScript>();