Fix sounds not loading. Add ESC as hard-reset button.
This commit is contained in:
parent
050dbe594e
commit
14bca78bc8
@ -5,7 +5,7 @@ const ASSET_DIR := "./assets.zip"
|
||||
static func load_sfx()->Dictionary[StringName, AudioStream]:
|
||||
var dict := load_user_assets(
|
||||
VFileAccess.IMPORTS.AUDIO_FILES, ["ogg","mp3","wav"])
|
||||
var ugh:Dictionary[StringName,AudioStream]
|
||||
var ugh:Dictionary[StringName,AudioStream] = {}
|
||||
ugh.assign(dict)
|
||||
return ugh
|
||||
|
||||
|
@ -9,7 +9,7 @@ custom_features=""
|
||||
export_filter="all_resources"
|
||||
include_filter=""
|
||||
exclude_filter=""
|
||||
export_path="../Builds/dino_tomato.x86_64"
|
||||
export_path="../toolsbuilds/dino_tomato.x86_64"
|
||||
patches=PackedStringArray()
|
||||
encryption_include_filters=""
|
||||
encryption_exclude_filters=""
|
||||
|
6
main.gd
6
main.gd
@ -72,6 +72,11 @@ func _ready()->void:
|
||||
pass
|
||||
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action(&"ui_cancel"):
|
||||
get_tree().reload_current_scene()
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if not context: return
|
||||
time_label.text = PREFIX_LABELS % get_clock_string()
|
||||
@ -104,4 +109,5 @@ func _on_timeout() -> void:
|
||||
context.increment_phase()
|
||||
timer.start(context.get_state_timer(context.current_state))
|
||||
image.texture = images[context.current_state]
|
||||
sfx.stream = sounds[context.current_state]
|
||||
sfx.play()
|
||||
|
1
vfs/create_vfs.gd.uid
Normal file
1
vfs/create_vfs.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://bsgdqh48saa8a
|
1
vfs/vfs.gd.uid
Normal file
1
vfs/vfs.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://db54x8n5ig7dc
|
@ -36,9 +36,7 @@ static func load_txt(buffer:PackedByteArray)->String:
|
||||
return txt
|
||||
|
||||
static func load_wav(buffer:PackedByteArray)->AudioStreamWAV:
|
||||
var sfx := AudioStreamWAV.new()
|
||||
sfx.load_from_buffer(buffer)
|
||||
return sfx
|
||||
return AudioStreamWAV.load_from_buffer(buffer)
|
||||
|
||||
# can't use CONST since Callables are technically instanced dynamically
|
||||
|
||||
|
1
vfs/vfs_loaders.gd.uid
Normal file
1
vfs/vfs_loaders.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://dgw5dbnf2dpuq
|
Loading…
Reference in New Issue
Block a user