Audio bus implemented and test pawn intro sound clips added. PawnBodies hooked up to PawnBaseData but not yet implemented.

This commit is contained in:
2026-03-07 03:33:59 -05:00
parent 52fe2f58d4
commit 984567cf96
28 changed files with 296 additions and 43 deletions

View File

@@ -26,6 +26,9 @@ var selector_wait : float = 0
var selected : int = -1
var selectors : Dictionary[int,PawnSelector] = {}
var displays : Dictionary[int, PawnDisplay] = {}
var announce_tween : Tween = null
@onready var announcer : AudioStreamPlayer = %Announcer
@onready var selector_start : Control = %SelectorStart
@onready var switch_sound : AudioStreamPlayer = %SwitchSound
@onready var select_sound : AudioStreamPlayer = %SelectSound
@@ -105,6 +108,14 @@ func move_selector(peer_id : int, selection : int) -> void:
var v = Vector2(175 * selector.selection, 0)
selector.position = Vector2(175 * selector.selection, 0)
switch_sound.play()
if announce_tween != null and announce_tween.is_running():
announce_tween.stop()
if announcer.playing:
announcer.stop()
announce_tween = create_tween()
announce_tween.tween_interval(.25)
announcer.stream = pawns[selection].name_audio
announce_tween.tween_callback(announcer.play)
@rpc("any_peer","call_local","reliable")
func lock_selector(peer_id : int) -> void: