make fami cutscene skipable
This commit is contained in:
parent
5e8ebcd3d0
commit
fd10cfca8c
2 changed files with 50 additions and 14 deletions
|
@ -1,3 +1,17 @@
|
|||
extends Node2D
|
||||
|
||||
signal cutscene_finished
|
||||
|
||||
export var cutscene_skip: float = 92.0
|
||||
|
||||
onready var animation_player: AnimationPlayer = $AnimationPlayer
|
||||
|
||||
func _input(event: InputEvent) -> void:
|
||||
if event.is_action_pressed("jump") and animation_player.current_animation_position < (cutscene_skip - Options.transition_speed_secs * 2.0):
|
||||
skip_cutscene()
|
||||
|
||||
func skip_cutscene() -> void:
|
||||
Fade.fade_out(Options.transition_speed_secs)
|
||||
yield(Fade, "fade_finished")
|
||||
animation_player.seek(cutscene_skip)
|
||||
Fade.fade_in(Options.transition_speed_secs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue