update sound for menus
This commit is contained in:
parent
d29a1ff019
commit
488ec31f8f
6 changed files with 33 additions and 3 deletions
|
@ -1,9 +1,10 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://s683ua4q2ewm"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://s683ua4q2ewm"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://cohbys634cf18" path="res://menu/main_menu/MainMenuTheme.tres" id="1_fna2g"]
|
||||
[ext_resource type="PackedScene" uid="uid://dii1q3f5dj72y" path="res://objects/CRT.tscn" id="2_vaod1"]
|
||||
[ext_resource type="Script" path="res://scripts/pause_menu_control.gd" id="3_tyr11"]
|
||||
[ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="4_u4plf"]
|
||||
[ext_resource type="AudioStream" uid="uid://bgx6cs627hq7q" path="res://sound/digital_text_typing.wav" id="5_ymkl7"]
|
||||
|
||||
[node name="PauseMenu" type="MarginContainer"]
|
||||
anchors_preset = 15
|
||||
|
@ -82,6 +83,9 @@ layout_mode = 2
|
|||
text = "main menu"
|
||||
flat = true
|
||||
|
||||
[node name="TypingSoundPlayer" type="AudioStreamPlayer2D" parent="Control"]
|
||||
stream = ExtResource("5_ymkl7")
|
||||
|
||||
[connection signal="pressed" from="Control/VBoxContainer/Buttons/HBoxContainer/continue" to="Control" method="_on_continue_button_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer/Buttons/HBoxContainer2/restart" to="Control" method="_on_restart_button_pressed"]
|
||||
[connection signal="pressed" from="Control/VBoxContainer/Buttons/HBoxContainer3/main menu" to="Control" method="_on_back_to_main_menu_button_pressed"]
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://cut2xjnvh8i58"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://cut2xjnvh8i58"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://cohbys634cf18" path="res://menu/main_menu/MainMenuTheme.tres" id="1_tmf11"]
|
||||
[ext_resource type="Script" path="res://scripts/menu_credit_control.gd" id="2_ogwi7"]
|
||||
[ext_resource type="PackedScene" uid="uid://dii1q3f5dj72y" path="res://objects/CRT.tscn" id="3_rybt6"]
|
||||
[ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="4_pv7fe"]
|
||||
[ext_resource type="AudioStream" uid="uid://bgx6cs627hq7q" path="res://sound/digital_text_typing.wav" id="5_xjxso"]
|
||||
|
||||
[node name="CreditScene" type="MarginContainer"]
|
||||
anchors_preset = 15
|
||||
|
@ -46,4 +47,7 @@ layout_mode = 2
|
|||
text = "back to menu"
|
||||
flat = true
|
||||
|
||||
[node name="TypingSoundPlayer" type="AudioStreamPlayer2D" parent="Control"]
|
||||
stream = ExtResource("5_xjxso")
|
||||
|
||||
[connection signal="pressed" from="Control/VBoxContainer/BackToMenu/back" to="Control" method="_return_to_main_menu"]
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
[gd_scene load_steps=5 format=3 uid="uid://n2culjgg5aji"]
|
||||
[gd_scene load_steps=6 format=3 uid="uid://n2culjgg5aji"]
|
||||
|
||||
[ext_resource type="Theme" uid="uid://cohbys634cf18" path="res://menu/main_menu/MainMenuTheme.tres" id="1_tm23e"]
|
||||
[ext_resource type="PackedScene" uid="uid://dii1q3f5dj72y" path="res://objects/CRT.tscn" id="2_d3r0j"]
|
||||
[ext_resource type="Script" path="res://scripts/level_completed_control.gd" id="3_38v2l"]
|
||||
[ext_resource type="FontFile" uid="uid://d3pbvdemdbxes" path="res://CommodoreSixtyFour.ttf" id="4_8fqei"]
|
||||
[ext_resource type="AudioStream" uid="uid://bgx6cs627hq7q" path="res://sound/digital_text_typing.wav" id="5_m323i"]
|
||||
|
||||
[node name="LevelComplete" type="MarginContainer"]
|
||||
anchors_preset = 15
|
||||
|
@ -46,4 +47,7 @@ layout_mode = 2
|
|||
text = "back to level menu"
|
||||
flat = true
|
||||
|
||||
[node name="TypingSoundPlayer" type="AudioStreamPlayer2D" parent="Control"]
|
||||
stream = ExtResource("5_m323i")
|
||||
|
||||
[connection signal="pressed" from="Control/VBoxContainer/BackToMenu/back" to="Control" method="_return_to_main_menu"]
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -19,6 +19,8 @@ var is_typing = true
|
|||
var current_button_index = 0
|
||||
var button
|
||||
|
||||
@onready var typing_sound_player = $TypingSoundPlayer
|
||||
|
||||
func _ready():
|
||||
_initialize_menu()
|
||||
_start_typing()
|
||||
|
@ -73,6 +75,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()
|
||||
|
|
|
@ -21,6 +21,8 @@ var buttons = []
|
|||
var current_scene = null
|
||||
var pause_menu_node = null
|
||||
|
||||
@onready var typing_sound_player = $TypingSoundPlayer
|
||||
|
||||
func _ready():
|
||||
current_scene = get_tree().current_scene
|
||||
|
||||
|
@ -79,6 +81,10 @@ func _update_text() -> void:
|
|||
if char_index < display_text.length():
|
||||
current_text += display_text[char_index]
|
||||
$VBoxContainer/VBoxContainer2/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
Reference in a new issue