Implement audio management system with effects and music players; add settings for sound and music volume

This commit is contained in:
Kirill
2026-10-03 13:21:53 +03:00
parent b6c683298b
commit 9e13c8bbe3
14 changed files with 334 additions and 0 deletions
+40
View File
@@ -0,0 +1,40 @@
class_name OwniverseAudioLoader
const MUSIC: Dictionary = {
"apocalypse_the_end": preload("res://sound/music/apocalypse_the_end.ogg"),
"cosmic_unicorns": preload("res://sound/music/cosmic_unicorns.ogg"),
"funky_eldritch": preload("res://sound/music/funky_eldritch.ogg"),
"meditative_beings": preload("res://sound/music/meditative_beings.ogg"),
"owniverse_main_theme": preload("res://sound/music/owniverse_main_theme.ogg"),
}
const EFFECTS: Dictionary = {
"black_hole_feed": preload("res://sound/effects/black_hole_feed.ogg"),
"blast": preload("res://sound/effects/blast.ogg"),
"civ_birth": preload("res://sound/effects/civ_birth.ogg"),
"civ_death": preload("res://sound/effects/civ_death.ogg"),
"civ_top": preload("res://sound/effects/civ_top.ogg"),
"cloud_decay": preload("res://sound/effects/cloud_decay.ogg"),
"create": preload("res://sound/effects/create.ogg"),
"force": preload("res://sound/effects/force.ogg"),
"gamma_ray": preload("res://sound/effects/gamma_ray.ogg"),
"life_birth": preload("res://sound/effects/life_birth.ogg"),
"life_death": preload("res://sound/effects/life_death.ogg"),
"select": preload("res://sound/effects/select.ogg"),
"star_birth": preload("res://sound/effects/star_birth.ogg"),
"structure_decay": preload("res://sound/effects/structure_decay.ogg"),
"swipe": preload("res://sound/effects/swipe.ogg"),
"time_minus": preload("res://sound/effects/time_minus.ogg"),
"time_plus": preload("res://sound/effects/time_plus.ogg"),
"trend_action": preload("res://sound/effects/trend_action.ogg"),
"window_close": preload("res://sound/effects/window_close.ogg"),
"window_open": preload("res://sound/effects/window_open.ogg"),
}
static func get_music() -> Dictionary:
return MUSIC.duplicate()
static func get_effects() -> Dictionary:
return EFFECTS.duplicate()