Made capacitors and emitters destroyable

This commit is contained in:
Marco 2025-09-01 16:51:55 +02:00
commit 9dd4b6d6e1
5 changed files with 458 additions and 387 deletions

View file

@ -8,7 +8,7 @@
[sub_resource type="CylinderShape3D" id="CylinderShape3D_dkwt8"]
height = 0.882874
[node name="CapacitorMini" type="StaticBody3D"]
[node name="CapacitorMini" type="StaticBody3D" groups=["Destroyable"]]
collision_layer = 16
collision_mask = 0
script = ExtResource("1_lyqcr")

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=6 format=3 uid="uid://d4ek8xjuh6y11"]
[gd_scene load_steps=7 format=3 uid="uid://d4ek8xjuh6y11"]
[ext_resource type="Script" uid="uid://dpibtd73awwp7" path="res://Scripts/Actors/ScriptableBulletsEmitter3D.cs" id="1_dtfaj"]
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="2_dtfaj"]
[ext_resource type="Resource" uid="uid://bes254wblt1lm" path="res://Resources/Bullets/3D/Explosion_Harmless_Small_3D.tres" id="2_o5sow"]
[ext_resource type="PackedScene" uid="uid://sy821kigcoqx" path="res://3D/BlockbenchModels/FloorEmitter/Floor_Emitter.gltf" id="3_ro7iq"]
[ext_resource type="Script" uid="uid://bf5f2phitdqw8" path="res://Scripts/Actors/BulletSpawner3D.cs" id="4_0cjnq"]
@ -9,12 +10,13 @@
height = 0.297607
radius = 0.277344
[node name="FloorEmitter" type="StaticBody3D"]
[node name="FloorEmitter" type="StaticBody3D" groups=["Destroyable"]]
collision_layer = 64
collision_mask = 0
script = ExtResource("1_dtfaj")
EmitOnStart = true
Health = 10.0
ExplosionData = ExtResource("2_o5sow")
DamageResistances = Array[ExtResource("2_dtfaj")]([])
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=6 format=3 uid="uid://yath5bvxo3cn"]
[gd_scene load_steps=7 format=3 uid="uid://yath5bvxo3cn"]
[ext_resource type="Script" uid="uid://dpibtd73awwp7" path="res://Scripts/Actors/ScriptableBulletsEmitter3D.cs" id="1_3n1ol"]
[ext_resource type="Script" uid="uid://ddsqqfx1usc3j" path="res://Scripts/Resources/DamageResistance.cs" id="2_eoje4"]
[ext_resource type="Resource" uid="uid://bes254wblt1lm" path="res://Resources/Bullets/3D/Explosion_Harmless_Small_3D.tres" id="2_g6b3n"]
[ext_resource type="PackedScene" uid="uid://lwpt32xplrjw" path="res://3D/BlockbenchModels/WallEmitter/Wall_Emitter.gltf" id="3_3n1ol"]
[ext_resource type="Script" uid="uid://bf5f2phitdqw8" path="res://Scripts/Actors/BulletSpawner3D.cs" id="3_g6b3n"]
@ -9,12 +10,13 @@
height = 0.297607
radius = 0.277344
[node name="WallEmitter" type="StaticBody3D"]
[node name="WallEmitter" type="StaticBody3D" groups=["Destroyable"]]
collision_layer = 64
collision_mask = 0
script = ExtResource("1_3n1ol")
EmitOnStart = true
Health = 10.0
ExplosionData = ExtResource("2_g6b3n")
DamageResistances = Array[ExtResource("2_eoje4")]([])
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]