Added health bars
This commit is contained in:
11
client/player/skills/SkillsComponent.gd
Normal file
11
client/player/skills/SkillsComponent.gd
Normal file
@ -0,0 +1,11 @@
|
||||
class_name SkillsComponent
|
||||
extends Node
|
||||
|
||||
var player: Player
|
||||
|
||||
func _ready():
|
||||
player = owner
|
||||
player.attacked.connect(attack)
|
||||
|
||||
func attack():
|
||||
%Health.take_damage(DamageInstance.new(10))
|
6
client/player/skills/SkillsComponent.tscn
Normal file
6
client/player/skills/SkillsComponent.tscn
Normal file
@ -0,0 +1,6 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://b8xf4ltqyorjv"]
|
||||
|
||||
[ext_resource type="Script" path="res://player/skills/SkillsComponent.gd" id="1_016bx"]
|
||||
|
||||
[node name="Skills" type="Node"]
|
||||
script = ExtResource("1_016bx")
|
Reference in New Issue
Block a user