aboutsummaryrefslogtreecommitdiff
path: root/game/src/Autoload/SFX.gd
diff options
context:
space:
mode:
Diffstat (limited to 'game/src/Autoload/SFX.gd')
-rw-r--r--game/src/Autoload/SFX.gd20
1 files changed, 0 insertions, 20 deletions
diff --git a/game/src/Autoload/SFX.gd b/game/src/Autoload/SFX.gd
deleted file mode 100644
index 5299848..0000000
--- a/game/src/Autoload/SFX.gd
+++ /dev/null
@@ -1,20 +0,0 @@
-extends Node
-
-var _loaded_sfx = {}
-
-func _ready():
- var dir = DirAccess.open("res://audio/sfx/")
- for fname in dir.get_files():
- if fname.get_extension() == "ogg":
- _loaded_sfx[fname.get_basename()] = load("res://audio/sfx/" + fname) # SND-10
-
-# SND-7
-func play(sound):
- var player = AudioStreamPlayer.new()
- player.bus = "SFX"
- player.stream = _loaded_sfx[sound]
- add_child(player)
- player.play()
- await player.finished
- remove_child(player)
-