Skip to content

Instantly share code, notes, and snippets.

@henriiquecampos
Last active March 2, 2018 00:35
Show Gist options
  • Save henriiquecampos/aefdd4da7ea9a0c0be9c8767c0e58aab to your computer and use it in GitHub Desktop.
Save henriiquecampos/aefdd4da7ea9a0c0be9c8767c0e58aab to your computer and use it in GitHub Desktop.
extends Panel
var tutor_part = 1
func _ready():
$Button.connect("button_up", self, "_on_next_up")
func _on_next_up():
if $Animator.is_playing():
$Animator.seek($Animator.get_current_animation_length())
else:
if tutor_part < $Animator.get_animation_list().size() -1:
tutor_part += 1
$Animator.play($Animator.get_animation_list()[tutor_part])
else:
get_tree().change_scene(load("../levels/level_01/level_01.tscn"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment