update sound for menus
This commit is contained in:
parent
d29a1ff019
commit
488ec31f8f
6 changed files with 33 additions and 3 deletions
|
@ -17,6 +17,8 @@ var is_typing = true
|
|||
var current_button_index = 0
|
||||
var button
|
||||
|
||||
@onready var typing_sound_player = $TypingSoundPlayer
|
||||
|
||||
func _ready():
|
||||
_initialize_menu()
|
||||
_start_typing()
|
||||
|
@ -71,6 +73,10 @@ func _update_text() -> void:
|
|||
if char_index < credits_text.length():
|
||||
current_text += credits_text[char_index]
|
||||
$VBoxContainer/Label.text = current_text
|
||||
|
||||
if typing_sound_player and not typing_sound_player.is_playing():
|
||||
typing_sound_player.play()
|
||||
|
||||
char_index += 1
|
||||
await get_tree().create_timer(typing_speed).timeout
|
||||
_update_text()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue