aboutsummaryrefslogtreecommitdiff
path: root/game/preview/PrevPlayerSubScene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/preview/PrevPlayerSubScene.cpp')
-rw-r--r--game/preview/PrevPlayerSubScene.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/game/preview/PrevPlayerSubScene.cpp b/game/preview/PrevPlayerSubScene.cpp
index 56a434a..831167a 100644
--- a/game/preview/PrevPlayerSubScene.cpp
+++ b/game/preview/PrevPlayerSubScene.cpp
@@ -78,5 +78,9 @@ PrevPlayerSubScene::PrevPlayerSubScene(Scene & scn) {
});
player.add_component<BoxCollider>(vec2(50, 50));
player.add_component<BehaviorScript>().set_script<PrevPlayerScript>();
- player.add_component<AudioSource>(Asset {"asset/music/level.ogg"}).stop();
+
+ AudioSource & audio = player.add_component<AudioSource>(Asset {"asset/music/level.ogg"});
+ audio.loop = true;
+ audio.play_on_awake = true;
+ audio.active = false;
}