111 lines
4.5 KiB
Plaintext
111 lines
4.5 KiB
Plaintext
![]() |
[gd_scene load_steps=10 format=2]
|
||
|
|
||
|
[ext_resource path="res://scripts/NPCInteraction.gd" type="Script" id=1]
|
||
|
[ext_resource path="res://scripts/NPC.gd" type="Script" id=2]
|
||
|
[ext_resource path="res://RenderManager.tscn" type="PackedScene" id=3]
|
||
|
|
||
|
[sub_resource type="CapsuleShape" id=50]
|
||
|
radius = 4.75717
|
||
|
height = 14.0077
|
||
|
|
||
|
[sub_resource type="BoxShape" id=51]
|
||
|
extents = Vector3( 0.26092, 1, 1 )
|
||
|
|
||
|
[sub_resource type="CylinderShape" id=52]
|
||
|
height = 3.0
|
||
|
radius = 5.0
|
||
|
|
||
|
[sub_resource type="CylinderShape" id=53]
|
||
|
height = 3.0
|
||
|
radius = 20.0
|
||
|
|
||
|
[sub_resource type="ConvexPolygonShape" id=54]
|
||
|
points = PoolVector3Array( 0, 0, 0, 8, -1.5, -8, -8, -1.5, -8, 0, 0, 0, 8, 1.5, -8, -8, 1.5, -8 )
|
||
|
|
||
|
[sub_resource type="ConvexPolygonShape" id=55]
|
||
|
points = PoolVector3Array( 0, 0, 0, 8, -1.5, -8, -8, -1.5, -8, 0, 0, 0, 8, 1.5, -8, -8, 1.5, -8 )
|
||
|
|
||
|
[node name="NPC" type="Spatial" groups=["Clock", "NPC"]]
|
||
|
script = ExtResource( 2 )
|
||
|
|
||
|
[node name="NPC_Name" type="StaticBody" parent="."]
|
||
|
transform = Transform( 0.1225, 0, 0, 0, 0.1225, 0, 0, 0, 0.1225, 0, 2.5391, 0 )
|
||
|
collision_layer = 2
|
||
|
collision_mask = 2
|
||
|
script = ExtResource( 1 )
|
||
|
|
||
|
[node name="CollisionShape" type="CollisionShape" parent="NPC_Name"]
|
||
|
transform = Transform( 1, 0, 0, 0, -4.37114e-08, -1, 0, 1, -4.37114e-08, 0, -8.89353, 0 )
|
||
|
shape = SubResource( 50 )
|
||
|
|
||
|
[node name="NPCSprite" type="Sprite3D" parent="."]
|
||
|
transform = Transform( 0.25, 0, 0, 0, 0.25, 0, 0, 0, 0.25, 0, 1.5, 0 )
|
||
|
flip_v = true
|
||
|
billboard = 2
|
||
|
shaded = true
|
||
|
double_sided = false
|
||
|
|
||
|
[node name="NPCRenderer" parent="." instance=ExtResource( 3 )]
|
||
|
fxaa = true
|
||
|
|
||
|
[node name="VisibilityEnabler" type="VisibilityEnabler" parent="."]
|
||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0 )
|
||
|
aabb = AABB( -1.5, -1.5, -1.5, 3, 3, 3 )
|
||
|
|
||
|
[node name="NavigationAgent" type="NavigationAgent" parent="."]
|
||
|
target_desired_distance = 5.0
|
||
|
avoidance_enabled = true
|
||
|
|
||
|
[node name="Look" type="Spatial" parent="."]
|
||
|
transform = Transform( -1, 0, -8.74228e-08, 0, 1, 0, 8.74228e-08, 0, -1, 0, 0, 0 )
|
||
|
|
||
|
[node name="InteractionDetection" type="Area" parent="."]
|
||
|
|
||
|
[node name="CollisionShape" type="CollisionShape" parent="InteractionDetection"]
|
||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, -1.6 )
|
||
|
shape = SubResource( 51 )
|
||
|
|
||
|
[node name="HearingNear" type="Area" parent="." groups=["Sense"]]
|
||
|
|
||
|
[node name="CollisionShape" type="CollisionShape" parent="HearingNear"]
|
||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0 )
|
||
|
shape = SubResource( 52 )
|
||
|
|
||
|
[node name="HearingFar" type="Area" parent="." groups=["Sense"]]
|
||
|
|
||
|
[node name="CollisionShape" type="CollisionShape" parent="HearingFar"]
|
||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0 )
|
||
|
shape = SubResource( 53 )
|
||
|
|
||
|
[node name="SightNear" type="Area" parent="." groups=["Sense"]]
|
||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0 )
|
||
|
|
||
|
[node name="CollisionShape" type="CollisionShape" parent="SightNear"]
|
||
|
shape = SubResource( 54 )
|
||
|
|
||
|
[node name="SightFar" type="Area" parent="." groups=["Sense"]]
|
||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.5, 0 )
|
||
|
|
||
|
[node name="CollisionShape" type="CollisionShape" parent="SightFar"]
|
||
|
transform = Transform( 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0 )
|
||
|
shape = SubResource( 55 )
|
||
|
|
||
|
[node name="Head" type="Spatial" parent="."]
|
||
|
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0 )
|
||
|
|
||
|
[node name="Tick" type="Timer" parent="."]
|
||
|
autostart = true
|
||
|
|
||
|
[connection signal="screen_entered" from="VisibilityEnabler" to="." method="_on_VisibilityEnabler_screen_entered"]
|
||
|
[connection signal="screen_exited" from="VisibilityEnabler" to="." method="_on_VisibilityEnabler_screen_exited"]
|
||
|
[connection signal="body_entered" from="InteractionDetection" to="." method="_on_InteractionDetection_body_entered"]
|
||
|
[connection signal="body_entered" from="HearingNear" to="." method="_on_HearingNear_body_entered"]
|
||
|
[connection signal="body_exited" from="HearingNear" to="." method="_on_HearingNear_body_exited"]
|
||
|
[connection signal="body_entered" from="HearingFar" to="." method="_on_HearingFar_body_entered"]
|
||
|
[connection signal="body_exited" from="HearingFar" to="." method="_on_HearingFar_body_exited"]
|
||
|
[connection signal="body_entered" from="SightNear" to="." method="_on_SightNear_body_entered"]
|
||
|
[connection signal="body_exited" from="SightNear" to="." method="_on_SightNear_body_exited"]
|
||
|
[connection signal="body_entered" from="SightFar" to="." method="_on_SightFar_body_entered"]
|
||
|
[connection signal="body_exited" from="SightFar" to="." method="_on_SightFar_body_exited"]
|
||
|
[connection signal="timeout" from="Tick" to="." method="_on_Tick_timeout"]
|