mirror of
https://gitlab.com/open-fpsz/open-fpsz.git
synced 2026-07-15 08:24:48 +00:00
🐛 Fix explosion bugs and cleanup logic
This commit is contained in:
parent
7a8f0c91a1
commit
91f14aea21
6 changed files with 22 additions and 25 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue