added answerbox sound

This commit is contained in:
2023-02-12 12:09:13 +01:00
parent 3054f08779
commit 0be8de000a
4 changed files with 30 additions and 1 deletions

Binary file not shown.

View File

@@ -0,0 +1,24 @@
[remap]
importer="wav"
type="AudioStreamWAV"
uid="uid://7si4jccoofsf"
path="res://.godot/imported/small_btn.wav-03523654df09421d5901cf3397cbf614.sample"
[deps]
source_file="res://assets/audios/ui/small_btn.wav"
dest_files=["res://.godot/imported/small_btn.wav-03523654df09421d5901cf3397cbf614.sample"]
[params]
force/8_bit=false
force/mono=false
force/max_rate=false
force/max_rate_hz=44100
edit/trim=false
edit/normalize=false
edit/loop_mode=0
edit/loop_begin=0
edit/loop_end=-1
compress/mode=0

View File

@@ -1,9 +1,10 @@
[gd_scene load_steps=6 format=3 uid="uid://bkm7365u1mm3o"]
[gd_scene load_steps=7 format=3 uid="uid://bkm7365u1mm3o"]
[ext_resource type="Script" path="res://src/scene-scripts/dialogue-system/dialog_bubble.cs" id="1_xtj1q"]
[ext_resource type="FontFile" uid="uid://cx6bvqk0ghmjv" path="res://assets/fonts/urbane-rounded-medium.otf" id="2_qrihj"]
[ext_resource type="AudioStream" uid="uid://cg6grs5k5m33n" path="res://assets/audios/typewrite/default_tw.wav" id="2_wg62u"]
[ext_resource type="Texture2D" uid="uid://04pdpdvkg2s" path="res://assets/textures/dialogue/dialogue_answer_ninepatch.png" id="3_n3y1v"]
[ext_resource type="AudioStream" uid="uid://7si4jccoofsf" path="res://assets/audios/ui/small_btn.wav" id="5_w6jq7"]
[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_5w2xu"]
@@ -106,4 +107,7 @@ theme_override_constants/margin_right = 60
theme_override_constants/margin_bottom = 30
metadata/_edit_lock_ = true
[node name="answerbtn_audio_stream" type="AudioStreamPlayer" parent="."]
stream = ExtResource("5_w6jq7")
[connection signal="timeout" from="typewriter_timer" to="." method="OnTypewriterTimerTimeout"]

View File

@@ -118,6 +118,7 @@ public partial class dialog_bubble : CanvasLayer
if (GetNode<PanelContainer>("box/panel_container").Visible == true
&& GetNode("box/panel_container/margin_container").GetChild(0).GetChild<Button>(0).ButtonGroup.GetPressedButton() != null)
{
GetNode<AudioStreamPlayer>("answerbtn_audio_stream").Play();
var answer = dlgLines.AsGodotArray()[dlgPointer - 1].AsGodotDictionary()[GetNode<Button>(GetNode("box/panel_container/margin_container")
.GetChild(0).GetChild<Button>(0).ButtonGroup.GetPressedButton().GetPath()).Text];
GetNode<PanelContainer>("box/panel_container").Visible = false;