aboutsummaryrefslogtreecommitdiff
path: root/game/GameScene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/GameScene.cpp')
-rw-r--r--game/GameScene.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/game/GameScene.cpp b/game/GameScene.cpp
index 57c6531..90a8b58 100644
--- a/game/GameScene.cpp
+++ b/game/GameScene.cpp
@@ -21,6 +21,7 @@
#include "background/BackgroundSubScene.h"
#include "prefab/PlayerObject.h"
+#include "prefab/ZapperObject.h"
using namespace crepe;
using namespace std;
@@ -40,7 +41,7 @@ void GameScene::load_scene() {
camera.add_component<BehaviorScript>().set_script<MoveCameraManualyScript>();
camera.add_component<Rigidbody>(Rigidbody::Data {});
- PlayerObject player {new_object("player", "player", vec2(-100, 200))};
+ PlayerObject {new_object("player", "player", vec2(-100, 200))};
GameObject floor = new_object("floor", "game_world", vec2(0, 325));
floor.add_component<Rigidbody>(Rigidbody::Data {
@@ -66,6 +67,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>();
}