diff options
author | ClarkeCode <33846391+ClarkeCode@users.noreply.github.com> | 2023-03-04 19:46:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 19:46:42 +0100 |
commit | 028247a24866726b79c56cb2f266738a8a9abc70 (patch) | |
tree | 0807714d81b61002b4613dfa0c10aa7b1209eac6 /game/src/Autoload | |
parent | 2f4842769b0856bc08a256907b64046fb55381ac (diff) | |
parent | 3e088a2642d2d05eed011b2dd1bdee566225719f (diff) |
Merge pull request #55 from Hop311/req-comments
Comments marking implemented requirements
Diffstat (limited to 'game/src/Autoload')
-rw-r--r-- | game/src/Autoload/Events/Options.gd | 5 | ||||
-rw-r--r-- | game/src/Autoload/SoundManager.gd | 8 |
2 files changed, 12 insertions, 1 deletions
diff --git a/game/src/Autoload/Events/Options.gd b/game/src/Autoload/Events/Options.gd index 8af620d..6b9e089 100644 --- a/game/src/Autoload/Events/Options.gd +++ b/game/src/Autoload/Events/Options.gd @@ -7,6 +7,8 @@ signal reset_settings() func load_settings_from_file() -> void: load_settings.emit(_settings_file) +# REQUIREMENTS +# * SS-11 func save_settings_to_file() -> void: save_settings.emit(_settings_file) _settings_file.save(_settings_file_path) @@ -20,6 +22,9 @@ const settings_file_path_default : String = "user://settings.cfg" var _settings_file_path : String = ProjectSettings.get_setting(settings_file_path_setting, settings_file_path_default) var _settings_file := ConfigFile.new() +# REQUIREMENTS +# * SS-9 +# * UIFUN-7 func _init(): if FileAccess.file_exists(_settings_file_path): _settings_file.load(_settings_file_path) diff --git a/game/src/Autoload/SoundManager.gd b/game/src/Autoload/SoundManager.gd index d3f8039..c58ce1a 100644 --- a/game/src/Autoload/SoundManager.gd +++ b/game/src/Autoload/SoundManager.gd @@ -1,11 +1,16 @@ extends Node +# REQUIREMENTS: +# * SS-68 + const _audio_directory_path : StringName = &"res://audio/sfx/" var _loaded_sound : Dictionary = {} var _bus_to_stream_player : Dictionary = {} +# REQUIREMENTS: +# * SND-10 func _ready(): var dir = DirAccess.open(_audio_directory_path) for fname in dir.get_files(): @@ -28,7 +33,8 @@ func play_stream(sound : AudioStream, bus_type : String) -> void: func play(sound : String, bus_type : String) -> void: play_stream(_loaded_sound[sound], bus_type) -# SND-7 +# REQUIREMENTS: +# * SND-7 func play_effect_stream(sound : AudioStream) -> void: play_stream(sound, "SFX") |