going/project/objects/breakable_boulder.tscn
2025-06-16 00:14:02 +02:00

42 lines
1.5 KiB
Plaintext

[gd_scene load_steps=5 format=3 uid="uid://cbif1o8njtshs"]
[ext_resource type="PackedScene" uid="uid://2yqgpigg0wr8" path="res://models/props/rock.blend" id="1_mofqw"]
[sub_resource type="GDScript" id="GDScript_mofqw"]
script/source = "extends Node3D
func _on_area_3d_body_entered(body: Node3D) -> void:
print(\"Body entered \", body.get_path())
if body.is_class(\"PlayerBody\") and body.get_node(\"PlayerStateMachine\").get_current_state() == \"BashState\":
queue_free()
"
[sub_resource type="BoxShape3D" id="BoxShape3D_yqw6a"]
size = Vector3(6.69, 6.685, 5.35156)
[sub_resource type="BoxShape3D" id="BoxShape3D_mofqw"]
size = Vector3(6.69, 6.685, 5.05249)
[node name="BreakableBoulder" type="Node3D"]
script = SubResource("GDScript_mofqw")
[node name="Area3D" type="Area3D" parent="."]
collision_layer = 2
collision_mask = 2
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.00162, 0)
shape = SubResource("BoxShape3D_yqw6a")
debug_color = Color(0.09, 0.529833, 1, 0.835294)
[node name="StaticBody3D" type="StaticBody3D" parent="."]
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.00162, 0)
shape = SubResource("BoxShape3D_mofqw")
debug_color = Color(0.09, 0.529833, 1, 0.835294)
[node name="rock" parent="." instance=ExtResource("1_mofqw")]
[connection signal="body_entered" from="Area3D" to="." method="_on_area_3d_body_entered"]