♻️ small refactoring

This commit is contained in:
anyreso 2024-05-12 21:57:44 -04:00
parent de902271df
commit f1df203a76
7 changed files with 8 additions and 39 deletions

View file

@ -1,6 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://qb5sf7awdeui"]
[ext_resource type="Script" path="res://entities/components/explosive_damage_component.gd" id="1_alx3x"]
[ext_resource type="Script" path="res://entities/components/explosive_damage/explosive_damage_component.gd" id="1_alx3x"]
[sub_resource type="SphereShape3D" id="SphereShape3D_1htx7"]
radius = 5.0

View file

@ -14,12 +14,13 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>.
class_name HealthComponent extends Area3D
@export var match_participant : MatchParticipant
@export var max_health : float = 1.
@export var health : float = 1.:
set(value):
health = value
health_changed.emit(value)
@export var match_participant : MatchParticipant
signal health_zeroed(killer_id : int)
signal health_changed(value : float)