Skip to content

Commit

Permalink
ADF-38 | Turn on Loop for background music tracks, instead of manuall…
Browse files Browse the repository at this point in the history
…y playing them after then finish (#18)
  • Loading branch information
mielifica authored Jul 13, 2024
1 parent 13352c1 commit 6ab0bbb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/corpse_rot.mp3-32fd64a0e3a999d7b6a021ab5872fe

[params]

loop=false
loop_offset=0
bpm=0
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ dest_files=["res://.godot/imported/criminal_district.mp3-7f8165b9028c270094365a7

[params]

loop=false
loop_offset=0
bpm=0
loop=true
loop_offset=0.0
bpm=0.0
beat_count=0
bar_beats=4
14 changes: 0 additions & 14 deletions global/autoload/audio/music_track/music_track.gd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ func _ready() -> void:
audio_stream_player.stream = audio_stream
if autoplay:
audio_stream_player.play()
_connect_signals()


#############
Expand Down Expand Up @@ -78,16 +77,3 @@ func _fade_out_callback(pause: bool) -> void:
if pause:
_playback_position = audio_stream_player.get_playback_position()
audio_stream_player.stop()


#############
## signals ##
#############


func _connect_signals() -> void:
audio_stream_player.finished.connect(_on_song_finished)


func _on_song_finished() -> void:
audio_stream_player.play()

0 comments on commit 6ab0bbb

Please sign in to comment.