Polish dialog and intro transitions
This commit is contained in:
parent
3975959017
commit
d413d1da9f
7 changed files with 228 additions and 4 deletions
|
|
@ -240,12 +240,26 @@ func _advance() -> void:
|
|||
label.visible_characters = 0
|
||||
speaker_label.text = speaker
|
||||
visible = true
|
||||
_release_touch_joysticks()
|
||||
Sfx.play(get_tree(), Sfx.DIALOG)
|
||||
_layout()
|
||||
queue_redraw()
|
||||
_sync_pause()
|
||||
|
||||
|
||||
# A touch release delivered while the tree is paused never reaches an
|
||||
# ordinary joystick. Neutralise every spring-loaded stick immediately before
|
||||
# applying the pause, so neither movement nor firing resumes from stale input
|
||||
# when the dialog closes (#182).
|
||||
func _release_touch_joysticks() -> void:
|
||||
var tree: SceneTree = get_tree()
|
||||
if tree == null:
|
||||
return
|
||||
for joystick in tree.get_nodes_in_group("touch_joysticks"):
|
||||
if is_instance_valid(joystick) and joystick.has_method("release_input"):
|
||||
joystick.release_input()
|
||||
|
||||
|
||||
func is_typing() -> bool:
|
||||
return current != "" and revealed < float(current.length())
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue