added typewriter sound

This commit is contained in:
2023-02-12 11:14:27 +01:00
parent 5217ce9bf0
commit 3054f08779
4 changed files with 33 additions and 1 deletions

View File

@@ -92,7 +92,10 @@ public partial class dialog_bubble : CanvasLayer
public void OnTypewriterTimerTimeout()
{
if (richText.VisibleCharacters < Regex.Replace(richText.Text, @"\[[^]]+\]", "").Length)
{
richText.VisibleCharacters++;
GetNode<AudioStreamPlayer>("typewriter_audio_stream").Play();
}
else typewriterTimer.Stop();
}
public void MakeAnswerBox(string[] dialogOptions)