improved audio debug with gdscript

This commit is contained in:
2023-02-12 14:55:49 +01:00
parent aee94697a5
commit a9ccc3d49f
2 changed files with 16 additions and 6 deletions

View File

@@ -0,0 +1,11 @@
extends StaticBody2D
@export var soundOn = true
func _ready():
$audio_stream_player_2d.autoplay = soundOn
if(soundOn):
$audio_stream_player_2d.play()
func OnAudioFinished():
if(soundOn):
$audio_stream_player_2d.play()