wave-survival/project/objects/player.tscn
2025-08-22 15:56:43 +02:00

64 lines
2.1 KiB
Plaintext

[gd_scene load_steps=6 format=3 uid="uid://snjgu4yp5swd"]
[ext_resource type="PackedScene" uid="uid://cfgwif53qypko" path="res://objects/weapons/revolver.tscn" id="1_eqqp1"]
[sub_resource type="SphereShape3D" id="SphereShape3D_eqqp1"]
radius = 0.2
[sub_resource type="GDScript" id="GDScript_eqqp1"]
script/source = "extends HealthStatus
func _on_death() -> void:
get_tree().change_scene_to_file.call_deferred(\"res://guis/main_menu.tscn\")
"
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_bxedw"]
radius = 0.4350586
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_eqqp1"]
radius = 0.43017578
[node name="PlayerBody" type="PlayerBody"]
wall_min_slide_angle = 0.0
[node name="PlayerCamera" type="PlayerCamera" parent="."]
unique_name_in_owner = true
process_priority = -1
transform = Transform3D(-1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0.27450943, 0)
fov = 65.0
[node name="PlayerInteractor" type="PlayerInteractor" parent="PlayerCamera"]
shape = SubResource("SphereShape3D_eqqp1")
target_position = Vector3(0, 0, -2)
collision_mask = 22
collide_with_areas = true
[node name="PlayerInput" type="PlayerInput" parent="."]
unique_name_in_owner = true
process_mode = 3
[node name="WeaponInventory" type="WeaponInventory" parent="."]
unique_name_in_owner = true
starting_weapon = ExtResource("1_eqqp1")
[node name="HealthStatus" type="HealthStatus" parent="."]
health = 10
script = SubResource("GDScript_eqqp1")
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.33360052, 0)
shape = SubResource("CapsuleShape3D_bxedw")
[node name="Hitbox" type="Hitbox" parent="." node_paths=PackedStringArray("health")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.3336005, 0)
collision_layer = 8
collision_mask = 0
monitoring = false
health = NodePath("../HealthStatus")
[node name="CollisionShape3D" type="CollisionShape3D" parent="Hitbox"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
shape = SubResource("CapsuleShape3D_eqqp1")
[connection signal="death" from="HealthStatus" to="HealthStatus" method="_on_death"]