going/project/objects/jump_pickup.tscn
2025-06-18 21:27:33 +02:00

43 lines
1.5 KiB
Plaintext

[gd_scene load_steps=4 format=3 uid="uid://bjln17owwexi"]
[ext_resource type="PackedScene" uid="uid://cdyr4yad84cp2" path="res://models/pickups/twirly.blend" id="1_60et7"]
[sub_resource type="GDScript" id="GDScript_a2vvy"]
script/source = "extends Area3D
func _on_body_entered(body: Node3D) -> void:
if body.is_class(\"PlayerBody\"):
body.can_jump = true
queue_free()
GameUI.get_singleton().display_message(\"Jump by pressing [img height=\\\"100\\\"]uid://baw7deolvkudx[/img]/shift and [img height=\\\"100\\\"]uid://d1kw2owusg8fn[/img]/space simultaneously\")
(body as PlayerBody).save_checkpoint()
func _physics_process(delta):
$twirly.rotate_y(delta * 2.0)
"
[sub_resource type="SphereShape3D" id="SphereShape3D_a2vvy"]
radius = 2.50626
[node name="JumpPickup" type="Area3D"]
script = SubResource("GDScript_a2vvy")
[node name="twirly" parent="." instance=ExtResource("1_60et7")]
[node name="OmniLight3D" type="OmniLight3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.503185, 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.00915, 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_a2vvy")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]