mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Don't play audio is layer is invisible
This commit is contained in:
parent
5242b96f64
commit
145036f71d
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue