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
+3
View File
@@ -64,6 +64,7 @@ const SWIPE_DURATION: float = 0.4
@onready var g_time_minus: TextureButton = $World/TopMenu/TimeMinus
@onready var g_time_plus: TextureButton = $World/TopMenu/TimePlus
@onready var effects_player: OwniverseEffectsPlayer = $"../FXPlayer"
@onready var screens: Dictionary = {
"World": $World,
@@ -263,12 +264,14 @@ func _swipe_to_nearest_page() -> void:
func _input(event: InputEvent) -> void:
if event is InputEventScreenDrag:
#effects_player.play_effect("swipe")
stage_page_scroller.scroll_horizontal = clamp(
stage_page_scroller.scroll_horizontal - PAGE_COUNT * event.screen_relative.x,
0, PAGE_WIDTH * (PAGE_COUNT - 1))
g_counters.swipe.is_active = true
g_counters.swipe.value = 0
elif event is InputEventPanGesture:
#effects_player.play_effect("swipe")
g_counters.swipe.is_active = true
g_counters.swipe.value = 0
elif event is InputEventScreenTouch: