aboutsummaryrefslogtreecommitdiff
path: root/game/GameScene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/GameScene.cpp')
-rw-r--r--game/GameScene.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/game/GameScene.cpp b/game/GameScene.cpp
index c30276a..8bd6c74 100644
--- a/game/GameScene.cpp
+++ b/game/GameScene.cpp
@@ -14,10 +14,12 @@
#include "menus/endgame/EndGameSubScript.h"
#include "player/PlayerSubScene.h"
#include "prefab/ZapperPoolSubScene.h"
+#include "workers/WorkersSubScene.h"
#include <cmath>
#include <crepe/api/Animator.h>
#include <crepe/api/Asset.h>
+#include <crepe/api/AudioSource.h>
#include <crepe/api/BehaviorScript.h>
#include <crepe/api/BoxCollider.h>
#include <crepe/api/Camera.h>
@@ -55,6 +57,8 @@ void GameScene::load_scene() {
PlayerSubScene player(*this);
+ WorkersSubScene workers(*this);
+
GameObject floor = new_object("floor", "game_world", vec2(0, 325));
floor.add_component<Rigidbody>(Rigidbody::Data {
.body_type = Rigidbody::BodyType::STATIC,
@@ -91,6 +95,14 @@ void GameScene::load_scene() {
HudSubScene hud;
hud.create(*this);
+ GameObject background_music = new_object("background_music", "audio", vec2(0, 0));
+ Asset background_music_asset {"asset/music/level.ogg"};
+ background_music.add_component<AudioSource>(background_music_asset);
+
+ GameObject boom_audio = new_object("boom_audio", "audio", vec2(0, 0));
+ Asset boom_audio_asset {"asset/sfx/window_smash.ogg"};
+ boom_audio.add_component<AudioSource>(boom_audio_asset);
+
GameObject laser = new_object("laser", "laser", vec2(2000, 0));
Asset laser_asset {"asset/obstacles/laser/laserPower.png"};
Sprite & laser_sprite = laser.add_component<Sprite>(