Improved manual speedup
This commit is contained in:
@@ -6,7 +6,7 @@ enum AdvancementMode { PLAYER, TIMED }
|
|||||||
|
|
||||||
const LINES_PER_PAGE:int = 4
|
const LINES_PER_PAGE:int = 4
|
||||||
const CHARS_PER_SECOND:float = 20.0
|
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_COMMA:float = 0.15
|
||||||
const PAUSE_SENTENCE:float = 0.4
|
const PAUSE_SENTENCE:float = 0.4
|
||||||
const PAUSE_ELLIPSIS_DOT:float = 0.3
|
const PAUSE_ELLIPSIS_DOT:float = 0.3
|
||||||
@@ -122,12 +122,15 @@ func _buildPreWrappedText(parsed:String) -> String:
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
func _processReveal(delta:float) -> void:
|
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:
|
if _pauseTimer > 0.0:
|
||||||
var speedMult:float = SPEEDUP_MULTIPLIER if Input.is_action_pressed("interact") else 1.0
|
|
||||||
_pauseTimer -= delta * speedMult
|
_pauseTimer -= delta * speedMult
|
||||||
return
|
return
|
||||||
|
|
||||||
var speedMult:float = SPEEDUP_MULTIPLIER if Input.is_action_pressed("interact") else 1.0
|
|
||||||
_revealTimer += delta * speedMult
|
_revealTimer += delta * speedMult
|
||||||
|
|
||||||
while _revealTimer >= 1.0 / CHARS_PER_SECOND:
|
while _revealTimer >= 1.0 / CHARS_PER_SECOND:
|
||||||
|
|||||||
Reference in New Issue
Block a user