12 lines
186 B
GDScript3
12 lines
186 B
GDScript3
|
class_name SkillsComponent
|
||
|
extends Node
|
||
|
|
||
|
var player: Player
|
||
|
|
||
|
func _ready():
|
||
|
player = owner
|
||
|
player.attacked.connect(attack)
|
||
|
|
||
|
func attack():
|
||
|
%Health.take_damage(DamageInstance.new(10))
|