From 63f77990b9058006eb60b98bebe5035184d62585 Mon Sep 17 00:00:00 2001 From: rom Date: Mon, 26 Apr 2021 18:46:57 +0200 Subject: sound effect --- scenes/menu.gd | 2 ++ scenes/menu.tscn | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) (limited to 'scenes') diff --git a/scenes/menu.gd b/scenes/menu.gd index f0be2dd..646bc1a 100644 --- a/scenes/menu.gd +++ b/scenes/menu.gd @@ -20,6 +20,7 @@ func _on_Outgoing_animation_finished(anim_name): func _on_Back_on_click(): + $success_sound.play(0.5) $Outgoing.play_backwards("tosettings") func _difficulty_text(): @@ -34,4 +35,5 @@ func _on_HardMode_on_click(): Settings.save() func _on_SettingsButton_on_click(): + $success_sound.play() $Outgoing.play("tosettings") diff --git a/scenes/menu.tscn b/scenes/menu.tscn index 48707b6..c8883b6 100644 --- a/scenes/menu.tscn +++ b/scenes/menu.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=2] +[gd_scene load_steps=14 format=2] [ext_resource path="res://components/Logo.tscn" type="PackedScene" id=1] [ext_resource path="res://components/button.tscn" type="PackedScene" id=2] @@ -8,6 +8,7 @@ [ext_resource path="res://textures/texts/name.png" type="Texture" id=6] [ext_resource path="res://textures/icons/light_bulb.png" type="Texture" id=7] [ext_resource path="res://textures/icons/light_bulb_r.png" type="Texture" id=8] +[ext_resource path="res://sfx/success.wav" type="AudioStream" id=9] [sub_resource type="AnimatedTexture" id=1] frames = 2 @@ -194,6 +195,10 @@ anims/startgame = SubResource( 2 ) [node name="Outgoing" type="AnimationPlayer" parent="."] anims/tointro = SubResource( 3 ) anims/tosettings = SubResource( 4 ) + +[node name="success_sound" type="AudioStreamPlayer" parent="."] +stream = ExtResource( 9 ) + [connection signal="on_click" from="Content/Back" to="." method="_on_Back_on_click"] [connection signal="on_click" from="Content/HardMode" to="." method="_on_HardMode_on_click"] [connection signal="on_click" from="Content/Exit" to="." method="_on_Exit_on_click"] -- cgit