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]:
|
static func load_sfx()->Dictionary[StringName, AudioStream]:
|
||||||
var dict := load_user_assets(
|
var dict := load_user_assets(
|
||||||
VFileAccess.IMPORTS.AUDIO_FILES, ["ogg","mp3","wav"])
|
VFileAccess.IMPORTS.AUDIO_FILES, ["ogg","mp3","wav"])
|
||||||
var ugh:Dictionary[StringName,AudioStream]
|
var ugh:Dictionary[StringName,AudioStream] = {}
|
||||||
ugh.assign(dict)
|
ugh.assign(dict)
|
||||||
return ugh
|
return ugh
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ custom_features=""
|
|||||||
export_filter="all_resources"
|
export_filter="all_resources"
|
||||||
include_filter=""
|
include_filter=""
|
||||||
exclude_filter=""
|
exclude_filter=""
|
||||||
export_path="../Builds/dino_tomato.x86_64"
|
export_path="../toolsbuilds/dino_tomato.x86_64"
|
||||||
patches=PackedStringArray()
|
patches=PackedStringArray()
|
||||||
encryption_include_filters=""
|
encryption_include_filters=""
|
||||||
encryption_exclude_filters=""
|
encryption_exclude_filters=""
|
||||||
|
6
main.gd
6
main.gd
@ -72,6 +72,11 @@ func _ready()->void:
|
|||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
func _input(event: InputEvent) -> void:
|
||||||
|
if event.is_action(&"ui_cancel"):
|
||||||
|
get_tree().reload_current_scene()
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
if not context: return
|
if not context: return
|
||||||
time_label.text = PREFIX_LABELS % get_clock_string()
|
time_label.text = PREFIX_LABELS % get_clock_string()
|
||||||
@ -104,4 +109,5 @@ func _on_timeout() -> void:
|
|||||||
context.increment_phase()
|
context.increment_phase()
|
||||||
timer.start(context.get_state_timer(context.current_state))
|
timer.start(context.get_state_timer(context.current_state))
|
||||||
image.texture = images[context.current_state]
|
image.texture = images[context.current_state]
|
||||||
|
sfx.stream = sounds[context.current_state]
|
||||||
sfx.play()
|
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
|
return txt
|
||||||
|
|
||||||
static func load_wav(buffer:PackedByteArray)->AudioStreamWAV:
|
static func load_wav(buffer:PackedByteArray)->AudioStreamWAV:
|
||||||
var sfx := AudioStreamWAV.new()
|
return AudioStreamWAV.load_from_buffer(buffer)
|
||||||
sfx.load_from_buffer(buffer)
|
|
||||||
return sfx
|
|
||||||
|
|
||||||
# can't use CONST since Callables are technically instanced dynamically
|
# 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