Skip to content

Commit

Permalink
🐛 Prevent replay music when it's already playing
Browse files Browse the repository at this point in the history
  • Loading branch information
EmilienLeroy committed Nov 29, 2022
1 parent cfd2077 commit c71cb00
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ func update_current_view(view):
yield($Fade/Animation, "animation_finished");

func _on_settings_updated(settings):
if (settings.musics and $Music.playing == true):
return;

if (settings.musics):
return $Music.play();

Expand Down

0 comments on commit c71cb00

Please sign in to comment.