🐛 Fix explosion bugs and cleanup logic

This commit is contained in:
Squinternator 2024-04-11 17:44:13 +00:00
parent 7a8f0c91a1
commit 91f14aea21
6 changed files with 22 additions and 25 deletions

View file

@ -1,13 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://ds1hekx1dq1bg"]
[gd_scene load_steps=2 format=3 uid="uid://ds1hekx1dq1bg"]
[ext_resource type="Script" path="res://components/area_damage_component.gd" id="1_hn2e3"]
[sub_resource type="SphereShape3D" id="SphereShape3D_080vi"]
radius = 5.0
[node name="AreaDamage" type="Area3D"]
collision_layer = 4
script = ExtResource("1_hn2e3")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
shape = SubResource("SphereShape3D_080vi")

View file

@ -1,8 +1,8 @@
extends Area3D
class_name HealthComponent
@export var max_health : int = 100
@export var health : int = 100:
@export var max_health : float = 100.0
@export var health : float = 100.0:
set(value):
health = value
health_changed.emit(value)