17 lines
474 B
GDScript3
Raw Normal View History

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-16 14:30:29 +00:00
var voice: VoiceComponent
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
2024-02-16 14:30:29 +00:00
voice = get_parent().get_node("Voice") as VoiceComponent
2024-02-15 12:45:17 +00:00
state.current = StateComponent.State.Skill
func end():
animation.player.speed_scale = 1.0
state.current = state.next_state()
queue_free()