aboutsummaryrefslogtreecommitdiff
path: root/game/preview/PrevPlayerScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'game/preview/PrevPlayerScript.cpp')
-rw-r--r--game/preview/PrevPlayerScript.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/game/preview/PrevPlayerScript.cpp b/game/preview/PrevPlayerScript.cpp
index f5a770a..ae25dad 100644
--- a/game/preview/PrevPlayerScript.cpp
+++ b/game/preview/PrevPlayerScript.cpp
@@ -66,7 +66,8 @@ bool PrevPlayerScript::key_pressed(const KeyPressEvent & ev) {
this->head->data.position_offset -= 10;
break;
case Keycode::P:
- this->get_component<AudioSource>().active = true;
+ this->get_components_by_name<AudioSource>("background_music").front().get().active
+ = true;
break;
case Keycode::J:
this->get_components_by_name<Transform>("camera").front().get().position.x