44 lines
1.5 KiB
Bash
44 lines
1.5 KiB
Bash
[gd_scene load_steps=4 format=3 uid="uid://cxkk7sfkv3otl"]
|
|
|
|
[ext_resource type="PackedScene" uid="uid://bhccbn5c7dhf7" path="res://models/pickups/pinecone.blend" id="1_f2ibw"]
|
|
|
|
[sub_resource type="GDScript" id="GDScript_f2ibw"]
|
|
script/source = "extends Area3D
|
|
|
|
func _on_body_entered(body: Node3D) -> void:
|
|
if body.is_class(\"PlayerBody\"):
|
|
body.can_bash = true
|
|
queue_free()
|
|
GameUI.get_singleton().display_message(\"Bash through obstacles by pressing (X) during a split-step\")
|
|
(body as PlayerBody).save_checkpoint()
|
|
|
|
func _physics_process(delta):
|
|
$pinecone.rotate_y(delta * 2.0)
|
|
"
|
|
|
|
[sub_resource type="SphereShape3D" id="SphereShape3D_4fish"]
|
|
radius = 2.22562
|
|
|
|
[node name="BashPickup" type="Area3D"]
|
|
script = SubResource("GDScript_f2ibw")
|
|
|
|
[node name="pinecone" parent="." instance=ExtResource("1_f2ibw")]
|
|
transform = Transform3D(1.62103, 0, 0, 0, 1.62103, 0, 0, 0, 1.62103, 0, 0.235161, 0)
|
|
|
|
[node name="OmniLight3D" type="OmniLight3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.79643, 0)
|
|
light_color = Color(0.880355, 0.555272, 0, 1)
|
|
light_energy = 8.133
|
|
omni_range = 3.15575
|
|
|
|
[node name="OmniLight3D2" type="OmniLight3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.38918, 0)
|
|
light_color = Color(0.880355, 0.555272, 0, 1)
|
|
light_energy = 8.133
|
|
omni_range = 3.15575
|
|
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
|
shape = SubResource("SphereShape3D_4fish")
|
|
|
|
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|