2024-02-13 23:12:32 +01:00

16 lines
249 B
GDScript

class_name SkillsComponent
extends Node
var player: Player
func _ready():
player = owner
player.skill_used.connect(use_skill)
func use_skill(skill: Skill):
if !skill:
return
var scene := skill.scene.instantiate()
player.add_child(scene)