fix: music playing
This commit is contained in:
parent
cd42b64d1c
commit
23d2d3bb9e
Binary file not shown.
|
|
@ -28,6 +28,7 @@ func start_room():
|
|||
await _play_intro_scene()
|
||||
else:
|
||||
%LightAnimationPlayer.lights_on()
|
||||
%SceneAnimationPlayer.start_soundtrack()
|
||||
|
||||
Scenes.player_enable.emit(true)
|
||||
|
||||
|
|
@ -98,3 +99,7 @@ func play_chest_reveal() -> void:
|
|||
$visuals/AnimationPlayer.play("chest_reveal")
|
||||
$visuals/SecondaryAnimation.play("chest_reveal")
|
||||
await $visuals/AnimationPlayer.animation_finished
|
||||
|
||||
|
||||
func play_thunder() -> void:
|
||||
%RoomAnimationPlayer.play("lightning_and_thunder")
|
||||
|
|
|
|||
|
|
@ -685,19 +685,23 @@ bus = &"text"
|
|||
[node name="Moving" type="AudioStreamPlayer" parent="logic/SceneAnimationPlayer"]
|
||||
stream = ExtResource("8_egnow")
|
||||
bus = &"music"
|
||||
playback_type = 1
|
||||
|
||||
[node name="Childhood" type="AudioStreamPlayer" parent="logic/SceneAnimationPlayer"]
|
||||
stream = ExtResource("9_i8mqk")
|
||||
volume_db = -80.0
|
||||
bus = &"music"
|
||||
playback_type = 1
|
||||
|
||||
[node name="VoiceTraining" type="AudioStreamPlayer" parent="logic/SceneAnimationPlayer"]
|
||||
stream = ExtResource("10_wwwdq")
|
||||
volume_db = -80.0
|
||||
bus = &"music"
|
||||
playback_type = 1
|
||||
|
||||
[node name="Jui_Jutsu" type="AudioStreamPlayer" parent="logic/SceneAnimationPlayer"]
|
||||
bus = &"music"
|
||||
playback_type = 1
|
||||
|
||||
[node name="starlight_mesh" type="MeshInstance3D" parent="logic/SceneAnimationPlayer"]
|
||||
transform = Transform3D(0.999, 0, 0, 0, 0.999, 0, 0, 0, 0.999, 0, 0, 0)
|
||||
|
|
@ -817,6 +821,7 @@ billboard = false
|
|||
transform = Transform3D(-0.99999964, 0, -8.7422755e-08, 0, 1, 0, 8.7422755e-08, 0, -0.99999964, 0.30241805, 0.49012983, -5.9604645e-08)
|
||||
|
||||
[node name="RoomAnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
libraries = {
|
||||
&"": ExtResource("23_corra")
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ extends Playable
|
|||
signal text_finished
|
||||
signal finished
|
||||
signal intro
|
||||
signal emit_thunder
|
||||
|
||||
@export var scene_id : Scenes.id
|
||||
|
||||
|
|
@ -29,7 +28,6 @@ var progress: float = 0:
|
|||
elif progress > 0:
|
||||
for i in range(min(progress, substring_sizes.size()-1) as int) if progress > 0 else range(substring_sizes.size()-1):
|
||||
start_index += substring_sizes[i]
|
||||
|
||||
label.visible_characters = start_index + int(substring_sizes[min(progress as int, substring_sizes.size()-1)] * fmod(progress, 1))
|
||||
else:
|
||||
label.visible_ratio = 0
|
||||
|
|
@ -179,6 +177,7 @@ func play():
|
|||
|
||||
finished.emit()
|
||||
|
||||
|
||||
func _unhandled_input(event: InputEvent) -> void:
|
||||
var just_revealed_text := false
|
||||
if event is InputEventMouseButton:
|
||||
|
|
@ -222,5 +221,7 @@ func _on_text_finished():
|
|||
if not animation_complete:
|
||||
text_finished.emit()
|
||||
|
||||
func _emit_thunder():
|
||||
emit_thunder.emit()
|
||||
|
||||
func _emit_thunder() -> void:
|
||||
if State.room is YouthRoom: State.room.play_thunder()
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue