1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-30 23:19:49 +00:00

Don't play audio is layer is invisible

This commit is contained in:
Emmanouil Papadeas 2024-12-08 03:56:13 +02:00
parent 5242b96f64
commit 145036f71d

View file

@ -85,6 +85,9 @@ func _on_animation_finished() -> void:
func _play_audio() -> void:
if not is_instance_valid(audio_player):
return
var layer := Global.current_project.layers[layer_index]
if not layer.visible:
return
var audio_length := audio_player.stream.get_length()
var final_frame := audio_length * Global.current_project.fps
if Global.current_project.current_frame < final_frame: