Exploding wall implementation

This commit is contained in:
2026-01-26 02:15:03 -08:00
parent 2ef838f270
commit 4ffe04fcff
8 changed files with 440 additions and 338 deletions

View File

@@ -64,7 +64,7 @@ tracks/4/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 1,
"values": [false]
"values": [true]
}
[sub_resource type="Animation" id="Animation_v8u1n"]
@@ -296,6 +296,7 @@ skeleton = NodePath("../..")
[node name="CollisionShape3D" type="CollisionShape3D" parent="ExplosionArea"]
shape = SubResource("SphereShape3D_kgxna")
disabled = true
[node name="CollisionShape3D2" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.199832, 0.0127869)

View File

@@ -7,9 +7,12 @@ public partial class ExplodableWall : Node3D
{
[Node] public AnimationPlayer AnimationPlayer { get; set; }
[Node] public StaticBody3D Collision { get; set; }
public override void _Notification(int what) => this.Notify(what);
public void Demolish()
{
AnimationPlayer.Play("Animation");
Collision.QueueFree();
}
}

View File

@@ -46,7 +46,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -51.309, 0, 13.5671)
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, -51.3399, 0, -2.43289)
[node name="Pit Room A" parent="." instance=ExtResource("9_7rwna")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -22.9411, 0, -2.04539)
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -22.941, 3.44562, -2.045)
[node name="Node3D5" parent="." instance=ExtResource("10_max4y")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -23.028, 0, -27.0573)

View File

@@ -212,7 +212,6 @@ transform = Transform3D(1.3, 0, 0, 0, 1.3, 0, 0, 0, 1.3, 0, 0.52099, 0)
[node name="Collision" type="Node3D" parent="."]
transform = Transform3D(1.3, 0, 0, 0, 1.3, 0, 0, 0, 1.3, 0, 0.52099, 0)
visible = false
[node name="Maze" type="StaticBody3D" parent="Collision"]

View File

@@ -140,7 +140,6 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.473629, 0.0699916, -8.3828)
[node name="Collision" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.681246, -0.227311)
visible = false
[node name="StaticBody3D" type="StaticBody3D" parent="Collision"]
transform = Transform3D(15.9651, 0, 0, 0, 10, 0, 0, 0, 10, 2.14491, 7.98349, 0.0159407)

View File

@@ -88,7 +88,6 @@ script = ExtResource("1_w3a78")
[node name="Collision" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.32238, 0)
visible = false
[node name="StaticBody3D" type="StaticBody3D" parent="Collision"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.301441, 2.71136, -0.0148315)

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=99 format=4 uid="uid://drasshmo7ntqc"]
[gd_scene load_steps=97 format=4 uid="uid://drasshmo7ntqc"]
[ext_resource type="Shader" uid="uid://c4a68uhm5o2h4" path="res://src/map/map shaders/Altar Sky Environment.gdshader" id="2_w8uwt"]
[ext_resource type="Texture2D" uid="uid://dw50ys561j8no" path="res://src/map/assets/DUST_1.png" id="3_lctjc"]
@@ -26,7 +26,6 @@
[ext_resource type="Texture2D" uid="uid://cgi62ryvviox5" path="res://src/map/dungeon/models/Special Floors & Rooms/Special Room - Breakable Wall Outter Secret/Special Room - Secret _A1_block3.png" id="22_75kbp"]
[ext_resource type="Texture2D" uid="uid://gaj2p4ulugqy" path="res://src/map/dungeon/models/Special Floors & Rooms/Special Room - Breakable Wall Outter Secret/Special Room - Secret _A1_eyeblock.png" id="23_p5yvr"]
[ext_resource type="Texture2D" uid="uid://dq0j76x44v7xx" path="res://src/map/dungeon/models/Special Floors & Rooms/Special Room - Breakable Wall Outter Secret/Special Room - Secret _A1_block4.png" id="24_vax7s"]
[ext_resource type="Texture2D" uid="uid://dsves1n1fpdl6" path="res://src/map/dungeon/models/Special Floors & Rooms/Special Room - Breakable Wall Outter Secret/Special Room - Secret _bombable.png" id="27_jnd1d"]
[sub_resource type="ShaderMaterial" id="ShaderMaterial_hlln8"]
shader = ExtResource("2_w8uwt")
@@ -1244,42 +1243,11 @@ _surfaces = [{
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_62yv3")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fwll5"]
resource_name = "Material"
cull_mode = 2
albedo_texture = ExtResource("27_jnd1d")
[sub_resource type="BoxShape3D" id="BoxShape3D_tk2fq"]
size = Vector3(20.0704, 0.001, 16.0277)
[sub_resource type="ArrayMesh" id="ArrayMesh_oq20l"]
_surfaces = [{
"aabb": AABB(-1, -1, -1, 2, 2, 2),
"format": 34896613377,
"index_count": 36,
"index_data": PackedByteArray("AAABAAIAAAADAAEABAACAAEAAwAEAAEABQAAAAIAAwAAAAUABAAGAAIABQACAAYAAwAHAAQAAwAFAAcABwAGAAQABwAFAAYA"),
"name": "Material",
"primitive": 3,
"uv_scale": Vector4(0, 0, 0, 0),
"vertex_count": 8,
"vertex_data": PackedByteArray("AAAAAP//AAAAAP//AAAAAAAA/////wAAAAAAAAAAAAD/////AAAAAP//AAD//wAA////////AAD//wAAAAAAAA==")
}]
blend_shape_mode = 0
[sub_resource type="ArrayMesh" id="ArrayMesh_24q1f"]
resource_name = "Special Room - Secret _Cube"
_surfaces = [{
"aabb": AABB(-1, -1, -1, 2, 2, 2),
"attribute_data": PackedByteArray("ZKv//7HVU9Wx1f//ZKtT1WSrU9Wx1aeqsdVT1WSrp6pkq6eqsdX8f7HVp6pkq/x/ZKv8f7HVUFWx1fx/ZKtQVRaBp6pkq/x/ZKunqhaB/H+x1aeq///8f///p6qx1fx/"),
"format": 34896613399,
"index_count": 36,
"index_data": PackedByteArray("AAABAAIAAAADAAEABAAFAAYABAAHAAUACAAJAAoACAALAAkADAANAA4ADAAPAA0AEAARABIAEAATABEAFAAVABYAFAAXABUA"),
"material": SubResource("StandardMaterial3D_fwll5"),
"name": "Material",
"primitive": 3,
"uv_scale": Vector4(5.72277, 5.67345, 0, 0),
"vertex_count": 24,
"vertex_data": PackedByteArray("AAAAAP//VNUAAP//AABU1QAA/////1TVAAAAAAAAVNUAAAAAAAD///////8AAP//AAD//wAA/////wAAAAD/////AAAAAFTV////////VNX/////AABU1f//AAD//1TV//8AAP///78AAP//////v/////////+/AAAAAP///78AAAAAAAD/v///AAD///+///8AAAAA/78AAAAA////v/////8AAP//AAD///////8AAP//AAD/////////////VNVU1VTVVNVU1VTVVNVU1f+//7//v/+//7//v/+//7+qKqoqqiqqKqoqqiqqKqoq/////////////////////wAA/38AAP9/AAD/fwAA/3//f/+//3//v/9//7//f/+/")
}]
blend_shape_mode = 0
shadow_mesh = SubResource("ArrayMesh_oq20l")
[sub_resource type="BoxShape3D" id="BoxShape3D_d725d"]
size = Vector3(1, 7.14288, 8.22485)
[node name="BreakableWallRoom" type="Node3D"]
@@ -1420,7 +1388,12 @@ visible = false
[node name="Explodable Wall" parent="." instance=ExtResource("6_baf70")]
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, -12.775, -0.625338, -20.9935)
[node name="Cube_001" type="MeshInstance3D" parent="Explodable Wall"]
transform = Transform3D(-1.43306e-08, 2.08969, -1.11152e-06, 0, 1.121e-06, 2.07203, 0.327845, 9.13434e-08, -4.85862e-14, -0.11697, 2.09972, 0.242016)
mesh = SubResource("ArrayMesh_24q1f")
skeleton = NodePath("")
[node name="StaticBody3D" type="StaticBody3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.23135, -0.4995, -22.9114)
shape = SubResource("BoxShape3D_tk2fq")
[node name="CollisionShape3D2" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -12.6626, 3.07144, -27.0855)
shape = SubResource("BoxShape3D_d725d")