Disabled navigation

This commit is contained in:
Marco 2025-01-24 15:24:37 +01:00
commit 3681614196
7 changed files with 126 additions and 4 deletions

View file

@ -56,6 +56,8 @@ BulletScene = ExtResource("2_ogldd")
BulletCapacity = 4
BulletSpeed = 50.0
[node name="NavigationAgent2D" type="NavigationAgent2D" parent="."]
[connection signal="area_entered" from="." to="." method="_on_area_entered"]
[connection signal="area_entered" from="PlayerDetection" to="." method="_on_player_detection_area_entered"]
[connection signal="area_exited" from="PlayerDetection" to="." method="_on_player_detection_area_exited"]

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=28 format=4 uid="uid://bv451a8wgty4u"]
[gd_scene load_steps=38 format=4 uid="uid://bv451a8wgty4u"]
[ext_resource type="Script" path="res://Scripts/GameManager.cs" id="1_8tmoj"]
[ext_resource type="PackedScene" uid="uid://bghghp5ep4w2j" path="res://Scenes/player.tscn" id="2_8mh54"]
@ -25,6 +25,66 @@
[ext_resource type="PackedScene" uid="uid://dkwi1hu1bixoe" path="res://Scenes/HUD/HUD.tscn" id="22_krk0o"]
[ext_resource type="Script" path="res://Scenes/CameraTarget.gd" id="24_0c2yt"]
[sub_resource type="NavigationPolygon" id="NavigationPolygon_lnwgu"]
vertices = PackedVector2Array(8, 8, -8, 8, -8, -8, 8, -8)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_ml1qs"]
vertices = PackedVector2Array(8, 8, -8, 8, -8, -8, 8, -8)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_h4p0b"]
vertices = PackedVector2Array(8, 8, -8, 8, -8, -8, 8, -8)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_1miy6"]
vertices = PackedVector2Array(8, 8, -8, 8, -8, -8, 8, -8)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_uanwu"]
vertices = PackedVector2Array(8, 8, -8, 8, -8, -8, 8, -8)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_6t4b1"]
vertices = PackedVector2Array(8, 8, -8, 8, -8, -8, 8, -8)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_ajuv4"]
vertices = PackedVector2Array(8, 8, -8, 8, -8, -8, 8, -8)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_3ass8"]
vertices = PackedVector2Array(8, 8, -8, 8, -8, -8, 8, -8)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_2t186"]
vertices = PackedVector2Array(8, 8, -8, 8, -8, -8, 8, -8)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)])
agent_radius = 0.0
[sub_resource type="NavigationPolygon" id="NavigationPolygon_63d1d"]
vertices = PackedVector2Array(8, 8, -8, 8, -8, -8, 8, -8)
polygons = Array[PackedInt32Array]([PackedInt32Array(0, 1, 2, 3)])
outlines = Array[PackedVector2Array]([PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)])
agent_radius = 0.0
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_jwf4b"]
resource_name = "Factory"
texture = ExtResource("8_0km4o")
@ -50,6 +110,7 @@ texture = ExtResource("8_0km4o")
5:1/0 = 0
5:1/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
6:1/0 = 0
6:1/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_uanwu")
7:1/0 = 0
8:1/0 = 0
9:1/0 = 0
@ -60,13 +121,18 @@ texture = ExtResource("8_0km4o")
4:2/0 = 0
5:2/0 = 0
6:2/0 = 0
6:2/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_6t4b1")
7:2/0 = 0
8:2/0 = 0
9:2/0 = 0
0:3/0 = 0
0:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_lnwgu")
1:3/0 = 0
1:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_ml1qs")
2:3/0 = 0
2:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_h4p0b")
3:3/0 = 0
3:3/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_1miy6")
4:3/0 = 0
5:3/0 = 0
7:3/0 = 0
@ -99,8 +165,11 @@ texture = ExtResource("8_0km4o")
5:5/0 = 0
5:5/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
6:5/0 = 0
6:5/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_ajuv4")
7:5/0 = 0
7:5/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_ajuv4")
8:5/0 = 0
8:5/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_ajuv4")
9:5/0 = 0
0:6/0 = 0
0:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
@ -113,8 +182,10 @@ texture = ExtResource("8_0km4o")
5:6/0 = 0
5:6/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
6:6/0 = 0
6:6/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_3ass8")
7:6/0 = 0
8:6/0 = 0
8:6/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_63d1d")
9:6/0 = 0
0:7/0 = 0
0:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
@ -127,8 +198,11 @@ texture = ExtResource("8_0km4o")
5:7/0 = 0
5:7/0/physics_layer_0/polygon_0/points = PackedVector2Array(-8, -8, 8, -8, 8, 8, -8, 8)
6:7/0 = 0
6:7/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_2t186")
7:7/0 = 0
7:7/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_2t186")
8:7/0 = 0
8:7/0/navigation_layer_0/polygon = SubResource("NavigationPolygon_63d1d")
9:7/0 = 0
0:8/0 = 0
1:8/0 = 0
@ -220,6 +294,7 @@ physics_layer_0/collision_layer = 1
physics_layer_0/collision_mask = 30
physics_layer_1/collision_layer = 32
physics_layer_1/collision_mask = 18
navigation_layer_0/layers = 1
sources/0 = SubResource("TileSetAtlasSource_jwf4b")
sources/1 = SubResource("TileSetScenesCollectionSource_qg3vu")