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