2024-02-13 22:12:32 +00:00
|
|
|
class_name SkillInstance
|
2024-02-15 12:45:17 +00:00
|
|
|
extends Node
|
2024-02-13 22:12:32 +00:00
|
|
|
|
2024-02-15 12:45:17 +00:00
|
|
|
var state: StateComponent
|
|
|
|
var animation: AnimationComponent
|
2024-02-13 22:12:32 +00:00
|
|
|
|
2024-02-15 12:45:17 +00:00
|
|
|
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()
|