51 lines
2.1 KiB
Plaintext
51 lines
2.1 KiB
Plaintext
|
[gd_scene load_steps=7 format=3 uid="uid://c6noskjp3ks4p"]
|
||
|
|
||
|
[ext_resource type="Script" path="res://sceen/people/Player.gd" id="1_pursd"]
|
||
|
[ext_resource type="PackedScene" uid="uid://ql5aokids4f6" path="res://sceen/people/people.tscn" id="2_ggqm4"]
|
||
|
[ext_resource type="Script" path="res://sceen/people/StateMachine/StateMachine.gd" id="3_ltxep"]
|
||
|
[ext_resource type="Script" path="res://sceen/people/Idle.gd" id="4_ru6er"]
|
||
|
[ext_resource type="Script" path="res://sceen/people/Walk.gd" id="5_aav7k"]
|
||
|
|
||
|
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_n25t3"]
|
||
|
radius = 0.3
|
||
|
|
||
|
[node name="Player" type="CharacterBody3D"]
|
||
|
script = ExtResource("1_pursd")
|
||
|
|
||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.701889, 0)
|
||
|
visible = false
|
||
|
shape = SubResource("CapsuleShape3D_n25t3")
|
||
|
|
||
|
[node name="people" parent="." instance=ExtResource("2_ggqm4")]
|
||
|
transform = Transform3D(-1, 0, -1.50996e-07, 0, 1, 0, 1.50996e-07, 0, -1, 0, 0, 0)
|
||
|
|
||
|
[node name="Area3D" type="Area3D" parent="." groups=["player"]]
|
||
|
|
||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Area3D"]
|
||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.701889, 0)
|
||
|
shape = SubResource("CapsuleShape3D_n25t3")
|
||
|
|
||
|
[node name="StateMachine" type="Node3D" parent="." node_paths=PackedStringArray("current_state")]
|
||
|
script = ExtResource("3_ltxep")
|
||
|
current_state = NodePath("Idle")
|
||
|
|
||
|
[node name="Idle" type="Node3D" parent="StateMachine" node_paths=PackedStringArray("player")]
|
||
|
script = ExtResource("4_ru6er")
|
||
|
player = NodePath("../..")
|
||
|
|
||
|
[node name="Walk" type="Node3D" parent="StateMachine" node_paths=PackedStringArray("player")]
|
||
|
script = ExtResource("5_aav7k")
|
||
|
player = NodePath("../..")
|
||
|
|
||
|
[node name="NavigationAgent3D" type="NavigationAgent3D" parent="."]
|
||
|
avoidance_enabled = true
|
||
|
height = 2.0
|
||
|
|
||
|
[node name="NavigationTimer" type="Timer" parent="."]
|
||
|
wait_time = 0.05
|
||
|
|
||
|
[connection signal="area_entered" from="Area3D" to="." method="_on_area_3d_area_entered"]
|
||
|
[connection signal="area_exited" from="Area3D" to="." method="_on_area_3d_area_exited"]
|
||
|
[connection signal="timeout" from="NavigationTimer" to="." method="_on_navigation_timer_timeout"]
|