From 8bd84f92e7703c106c934c20a99c812b4ff2133d Mon Sep 17 00:00:00 2001 From: Yoshman29 <81191621+YoshiCrafter29@users.noreply.github.com> Date: Sat, 21 Jan 2023 15:00:23 +0100 Subject: [PATCH] text type sfx --- buildnumber.txt | 2 +- source/funkin/cutscenes/DialogueCutscene.hx | 2 +- source/funkin/cutscenes/dialogue/DialogueBox.hx | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/buildnumber.txt b/buildnumber.txt index 3de00380..7637952e 100644 --- a/buildnumber.txt +++ b/buildnumber.txt @@ -1 +1 @@ -2134 \ No newline at end of file +2136 \ No newline at end of file diff --git a/source/funkin/cutscenes/DialogueCutscene.hx b/source/funkin/cutscenes/DialogueCutscene.hx index e551bdab..ce41c3fd 100644 --- a/source/funkin/cutscenes/DialogueCutscene.hx +++ b/source/funkin/cutscenes/DialogueCutscene.hx @@ -49,7 +49,7 @@ class DialogueCutscene extends Cutscene { char: node.getAtt('char').getDefault('boyfriend'), bubble: node.getAtt('bubble').getDefault('normal'), callback: node.getAtt('callback'), - speed: node.has.speed ? Std.parseFloat(node.att.speed).getDefault(0.02) : 0.02 + speed: node.has.speed ? Std.parseFloat(node.att.speed).getDefault(0.05) : 0.05 }); } diff --git a/source/funkin/cutscenes/dialogue/DialogueBox.hx b/source/funkin/cutscenes/dialogue/DialogueBox.hx index c27314e0..a87fb2fb 100644 --- a/source/funkin/cutscenes/dialogue/DialogueBox.hx +++ b/source/funkin/cutscenes/dialogue/DialogueBox.hx @@ -58,6 +58,7 @@ class DialogueBox extends FunkinSprite { text.size = Std.parseInt(textNode.att.size).getDefault(20); text.font = Paths.font('${textNode.getAtt("font").getDefault("vcr")}.ttf'); text.antialiasing = textNode.getAtt("antialiasing").getDefault("false") == "true"; + text.sounds = [FlxG.sound.load(textTypeSFX)]; } catch(e) { active = false; Logs.trace('Couldn\'t load dialogue box "$name": ${e.toString()}', ERROR); @@ -76,7 +77,7 @@ class DialogueBox extends FunkinSprite { private var __nextText:String; private var __speed:Float; - public function playBubbleAnim(bubble:String, text:String, speed:Float = 0.02) { + public function playBubbleAnim(bubble:String, text:String, speed:Float = 0.05) { this.__nextText = text; this.__speed = speed; this.text.resetText(text);