mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Unmute audio layes when making them visible while the animation is playing
This commit is contained in:
parent
0fad406967
commit
8e55b91a39
|
@ -36,7 +36,7 @@ func _ready() -> void:
|
|||
Global.cel_switched.connect(_on_cel_switched)
|
||||
var layer := Global.current_project.layers[layer_index]
|
||||
layer.name_changed.connect(func(): label.text = layer.name)
|
||||
layer.visibility_changed.connect(update_buttons)
|
||||
layer.visibility_changed.connect(_on_layer_visibility_changed)
|
||||
if layer is PixelLayer:
|
||||
linked_button.visible = true
|
||||
elif layer is GroupLayer:
|
||||
|
@ -86,6 +86,13 @@ func _on_cel_switched() -> void:
|
|||
_play_audio(true)
|
||||
|
||||
|
||||
func _on_layer_visibility_changed() -> void:
|
||||
update_buttons()
|
||||
var layer := Global.current_project.layers[layer_index]
|
||||
if layer is AudioLayer:
|
||||
_play_audio(not animation_running)
|
||||
|
||||
|
||||
func _on_animation_started(_dir: bool) -> void:
|
||||
animation_running = true
|
||||
_play_audio(false)
|
||||
|
|
Loading…
Reference in a new issue