Trap explosions with damage and health bar depletion.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://bk3yqawritfnj"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://bk3yqawritfnj"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://yjsgte3x7jjw" path="res://scripts/trap.gd" id="1_6h4aj"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://bih57xe642hrc" path="res://models/trap.obj" id="2_oj6ox"]
|
||||
@@ -14,7 +14,12 @@ albedo_color = Color(1, 1, 0, 1)
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_dw7u0"]
|
||||
size = Vector3(0.8, 1, 0.8)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_6h4aj"]
|
||||
resource_local_to_scene = true
|
||||
|
||||
[node name="Trap" type="Area3D"]
|
||||
collision_layer = 4
|
||||
collision_mask = 2
|
||||
script = ExtResource("1_6h4aj")
|
||||
|
||||
[node name="Model" type="MeshInstance3D" parent="."]
|
||||
@@ -40,4 +45,14 @@ texture = ExtResource("3_mxvh5")
|
||||
[node name="RevealTimer" type="Timer" parent="."]
|
||||
unique_name_in_owner = true
|
||||
|
||||
[node name="RangeArea" type="Area3D" parent="."]
|
||||
unique_name_in_owner = true
|
||||
collision_layer = 0
|
||||
collision_mask = 2
|
||||
|
||||
[node name="RangeShape" type="CollisionShape3D" parent="RangeArea"]
|
||||
unique_name_in_owner = true
|
||||
shape = SubResource("BoxShape3D_6h4aj")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
||||
[connection signal="timeout" from="RevealTimer" to="." method="_on_reveal_timeout"]
|
||||
|
||||
Reference in New Issue
Block a user