Улучшен поиск путей
This commit is contained in:
parent
3e60215e11
commit
26cc09241f
8 changed files with 107 additions and 18 deletions
|
@ -1,11 +1,11 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://bmyjqerhno5vi"]
|
||||
|
||||
[ext_resource type="SpriteFrames" uid="uid://blijqhtsnyq7n" path="res://sprites/enemies/wretched/wretched.tres" id="1_aqrsj"]
|
||||
[ext_resource type="SpriteFrames" uid="uid://cisc0k30gpx1q" path="res://sprites/enemies/wretched/wretched.tres" id="1_aqrsj"]
|
||||
[ext_resource type="Script" path="res://scripts/enemies/Wretched.cs" id="1_ec388"]
|
||||
[ext_resource type="PackedScene" uid="uid://cf0wpahgwygxx" path="res://prefabs/light_sense.tscn" id="2_16fib"]
|
||||
|
||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_svj4b"]
|
||||
size = Vector2(24, 16)
|
||||
size = Vector2(15, 15)
|
||||
|
||||
[sub_resource type="CircleShape2D" id="CircleShape2D_nortt"]
|
||||
radius = 15.0
|
||||
|
@ -28,7 +28,7 @@ frame_progress = 0.776966
|
|||
polygon = PackedVector2Array(-5, -16, -7, -3, -7, 9, -11, 14, -11, 16, 8, 16, 8, 8, 7, 4, 7, -16)
|
||||
|
||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||
position = Vector2(1, 8)
|
||||
position = Vector2(0, 8)
|
||||
shape = SubResource("RectangleShape2D_svj4b")
|
||||
|
||||
[node name="PlayerCollision" type="Area2D" parent="."]
|
||||
|
@ -38,5 +38,13 @@ monitorable = false
|
|||
position = Vector2(1, 8)
|
||||
shape = SubResource("CircleShape2D_nortt")
|
||||
|
||||
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
|
||||
path_desired_distance = 0.1
|
||||
target_desired_distance = 0.1
|
||||
avoidance_enabled = true
|
||||
avoidance_mask = 2
|
||||
debug_use_custom = true
|
||||
debug_path_custom_color = Color(0, 1, 0, 1)
|
||||
|
||||
[connection signal="area_entered" from="LightSense" to="." method="_OnLightEntered"]
|
||||
[connection signal="body_entered" from="PlayerCollision" to="." method="_OnPlayerCollision"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue