tiger-cleanup #1
|
|
@ -77,8 +77,7 @@ func _ready() -> void:
|
||||||
if skip_control is SkipControl and not Engine.is_editor_hint():
|
if skip_control is SkipControl and not Engine.is_editor_hint():
|
||||||
skip_control.skip.connect(skip_text)
|
skip_control.skip.connect(skip_text)
|
||||||
|
|
||||||
if get_tree().root.get_child(-1) == self:
|
# Clunky rebuild...
|
||||||
play()
|
|
||||||
story_array = story_array
|
story_array = story_array
|
||||||
progress = progress
|
progress = progress
|
||||||
|
|
||||||
|
|
@ -123,12 +122,14 @@ func try_scroll():
|
||||||
|
|
||||||
func play():
|
func play():
|
||||||
print_debug("StoryPlayable.gd: %s.play()" % self.name)
|
print_debug("StoryPlayable.gd: %s.play()" % self.name)
|
||||||
animation_player.play("RESET")
|
|
||||||
|
# There's an ugly glitch here.
|
||||||
|
hide()
|
||||||
|
animation_player.play("RESET")
|
||||||
await animation_player.animation_finished
|
await animation_player.animation_finished
|
||||||
|
|
||||||
# Show ourselves before playing
|
# Show ourselves before playing
|
||||||
get_parent().show() # Canvaslayer!
|
get_parent().show() # Ensure visible Canvaslayer!
|
||||||
show()
|
|
||||||
|
|
||||||
scroll_target = 0
|
scroll_target = 0
|
||||||
|
|
||||||
|
|
@ -142,8 +143,15 @@ func play():
|
||||||
_:
|
_:
|
||||||
animation_player.queue("en")
|
animation_player.queue("en")
|
||||||
|
|
||||||
|
# Wait and get ready.
|
||||||
|
await get_tree().process_frame
|
||||||
|
show()
|
||||||
|
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||||
|
|
||||||
|
# Don't know how to do this.
|
||||||
|
#%StoryScroll.grab_focus()
|
||||||
|
|
||||||
if name == "draven":
|
if name == "draven":
|
||||||
await get_tree().process_frame
|
|
||||||
await get_tree().process_frame
|
await get_tree().process_frame
|
||||||
$AnimationPlayer/Music.play()
|
$AnimationPlayer/Music.play()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ var is_auto_proceeding: bool = false:
|
||||||
action_prompt.action = "ui_cancel"
|
action_prompt.action = "ui_cancel"
|
||||||
button.text = "keep reading"
|
button.text = "keep reading"
|
||||||
is_auto_proceeding = value
|
is_auto_proceeding = value
|
||||||
|
|
||||||
#resets progress bar on button
|
#resets progress bar on button
|
||||||
time_pressed = 0
|
time_pressed = 0
|
||||||
|
|
||||||
|
|
@ -70,7 +70,7 @@ func _process(delta):
|
||||||
text_revealed = true
|
text_revealed = true
|
||||||
else:
|
else:
|
||||||
is_auto_proceeding = true
|
is_auto_proceeding = true
|
||||||
|
|
||||||
elif is_auto_proceeding and text_revealed:
|
elif is_auto_proceeding and text_revealed:
|
||||||
time_pressed += delta
|
time_pressed += delta
|
||||||
progress.value = time_pressed / auto_continue_delay
|
progress.value = time_pressed / auto_continue_delay
|
||||||
|
|
@ -84,7 +84,7 @@ func _input(event: InputEvent) -> void:
|
||||||
if unrevealed:
|
if unrevealed:
|
||||||
$AnimationPlayer.play("reveal_skip")
|
$AnimationPlayer.play("reveal_skip")
|
||||||
unrevealed = false
|
unrevealed = false
|
||||||
|
|
||||||
if event.is_action_pressed("skip"):
|
if event.is_action_pressed("skip"):
|
||||||
if not (is_auto_proceeding or aborted):
|
if not (is_auto_proceeding or aborted):
|
||||||
pressed = true
|
pressed = true
|
||||||
|
|
@ -94,7 +94,7 @@ func _input(event: InputEvent) -> void:
|
||||||
$AnimationPlayer.play("vanish_skip")
|
$AnimationPlayer.play("vanish_skip")
|
||||||
await $AnimationPlayer.animation_finished
|
await $AnimationPlayer.animation_finished
|
||||||
reset()
|
reset()
|
||||||
|
|
||||||
get_viewport().set_input_as_handled()
|
get_viewport().set_input_as_handled()
|
||||||
elif event.is_action_released("skip"):
|
elif event.is_action_released("skip"):
|
||||||
if not is_auto_proceeding:
|
if not is_auto_proceeding:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue