15 lines
390 B
GDScript

class_name SkillInstance
extends Node
var state: StateComponent
var animation: AnimationComponent
func _enter_tree():
state = get_parent().get_node("State") as StateComponent
animation = get_parent().get_node("Animation") as AnimationComponent
state.current = StateComponent.State.Skill
func end():
animation.player.speed_scale = 1.0
state.current = state.next_state()
queue_free()