Enable/Disable environment when entering/exiting breakable wall room

This commit is contained in:
2026-06-06 15:24:34 -07:00
parent 011f72fb63
commit 09db0ccd88
9 changed files with 276 additions and 191 deletions
@@ -1,16 +1,14 @@
[gd_scene load_steps=7 format=3 uid="uid://6ca5oildpf3n"]
[gd_scene load_steps=6 format=3 uid="uid://6ca5oildpf3n"]
[ext_resource type="Script" uid="uid://c5p0e4ywktyvd" path="res://src/items/misc/Plastique.cs" id="1_jk2qh"]
[ext_resource type="Script" uid="uid://b5w4iw4iqmxtn" path="res://src/items/effect/EffectItemStats.cs" id="2_p8vuq"]
[ext_resource type="Texture2D" uid="uid://tvy57alffi36" path="res://src/items/misc/textures/plastique icon1.png" id="4_vv5l4"]
[sub_resource type="Resource" id="Resource_p8vuq"]
metadata/__load_path__ = "res://src/items/Icons/plastique icon1.png"
[ext_resource type="Texture2D" uid="uid://mk5pjmup7xgo" path="res://src/items/misc/textures/Plastique.png" id="2_vv5l4"]
[sub_resource type="Resource" id="Resource_vv5l4"]
script = ExtResource("2_p8vuq")
UsableItemTag = 0
ElementalDamageType = 4
InitialCount = 0
Name = "Plastique"
StatDescription = ""
FlavorText = "Stable destructive substance."
@@ -30,7 +28,7 @@ CurseResistance = 0
ThrowSpeed = 12.0
ThrowDamage = 5
ItemTag = 0
Texture = SubResource("Resource_p8vuq")
Texture = ExtResource("2_vv5l4")
metadata/_custom_type_script = "uid://b5w4iw4iqmxtn"
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_etomv"]
@@ -55,7 +53,7 @@ double_sided = false
alpha_antialiasing_mode = 1
texture_filter = 0
render_priority = 100
texture = ExtResource("4_vv5l4")
texture = ExtResource("2_vv5l4")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Pickup"]
shape = SubResource("CapsuleShape3D_etomv")
+1 -1
View File
@@ -35,7 +35,7 @@ public partial class SetItem : RigidBody3D
private void ExplosionArea_AreaEntered(Area3D area)
{
if (area.GetOwner() is ExplodableWall wall)
if (area.GetParent() is ExplodableWall wall)
wall.Demolish();
if (area.GetOwner() is IEnemy enemy)
enemy.HealthComponent.Damage(10, ElementType.Igneous);