diff --git a/ui/component/DialogueTextbox.gd b/ui/component/DialogueTextbox.gd index 612e888..d53e48c 100644 --- a/ui/component/DialogueTextbox.gd +++ b/ui/component/DialogueTextbox.gd @@ -6,7 +6,7 @@ enum AdvancementMode { PLAYER, TIMED } const LINES_PER_PAGE:int = 4 const CHARS_PER_SECOND:float = 20.0 -const SPEEDUP_MULTIPLIER:float = 8.0 +const SPEEDUP_MULTIPLIER:float = 4.0 const PAUSE_COMMA:float = 0.15 const PAUSE_SENTENCE:float = 0.4 const PAUSE_ELLIPSIS_DOT:float = 0.3 @@ -122,12 +122,15 @@ func _buildPreWrappedText(parsed:String) -> String: return result func _processReveal(delta:float) -> void: + if Input.is_action_just_released("interact"): + _hasLetGoOfInteract = true + + var speedMult:float = SPEEDUP_MULTIPLIER if (_hasLetGoOfInteract and Input.is_action_pressed("interact")) else 1.0 + if _pauseTimer > 0.0: - var speedMult:float = SPEEDUP_MULTIPLIER if Input.is_action_pressed("interact") else 1.0 _pauseTimer -= delta * speedMult return - var speedMult:float = SPEEDUP_MULTIPLIER if Input.is_action_pressed("interact") else 1.0 _revealTimer += delta * speedMult while _revealTimer >= 1.0 / CHARS_PER_SECOND: