Skip to content

Commit

Permalink
dynamic navPolygons
Browse files Browse the repository at this point in the history
I removed the manual navPolygons and added dynamic navpolygon generation in BuildingTemplate.gd

That way, if we update the map images, the navpolygons will match automatically.
  • Loading branch information
plexsoup committed Nov 12, 2022
1 parent 77418dd commit ab50464
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 103 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ signal shit_calmed_down() # for music
func _ready():
generate_light_occluders_from_bitmap()


func init(mapObj):

map_scene = mapObj
Expand Down Expand Up @@ -72,14 +71,33 @@ func generate_light_occluders_from_bitmap():
wallBitmap.create_from_image_alpha(wallImage)

occlusionPolygons = wallBitmap.opaque_to_polygons(wallRect)
var navPolygon = NavigationPolygon.new()
var navPolygonInstance = NavigationPolygonInstance.new()

navPolygon.add_outline(rect_to_outline(wallRect))

for polygon in occlusionPolygons:
spawn_light_occluder(polygon)
spawn_static_body(polygon)
navPolygon.add_outline(polygon)

$StaticBodyWalls.position = Vector2.ZERO - ( (rectSize ) / 2)
$LightOccluders.position = $StaticBodyWalls.position


navPolygon.make_polygons_from_outlines()
navPolygonInstance.navpoly = navPolygon
navPolygonInstance.position = $StaticBodyWalls.position
$NPCs.add_child(navPolygonInstance)

func rect_to_outline(rect : Rect2):
var outline = []
outline.push_back(rect.position)
outline.push_back(rect.position+Vector2(0, rect.size.y))
outline.push_back(rect.position+rect.size)
outline.push_back(rect.position+Vector2(rect.size.x, 0))
return outline


func translate_polygon(polygon, translation : Vector2):
#I'm sure there's a number of built-in functions to do this with xForms, but I'm not sure how yet.
Expand Down Expand Up @@ -108,6 +126,7 @@ func spawn_static_body(myPolygon):
newPolyDraw.set_color(Color.violet)
$StaticBodyWalls.add_child(newPolyDraw)





Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ shape = SubResource( 1 )

[node name="StaticBodyWalls" type="Node2D" parent="."]

[node name="NPCs" type="Node2D" parent="."]
[node name="NPCs" type="Navigation2D" parent="."]

[node name="PossibleSpawnPoints" type="Node2D" parent="."]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=16 format=2]
[gd_scene load_steps=10 format=2]

[ext_resource path="res://scenes/City/2D_WorldMap/Buildings/CommercialBuildings/CommercialBuildingWalls.png" type="Texture" id=1]
[ext_resource path="res://scenes/City/2D_WorldMap/Buildings/CommercialBuildings/CommercialBuildingFloors.png" type="Texture" id=2]
Expand All @@ -11,36 +11,6 @@
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 478.5, 369.764 )

[sub_resource type="NavigationPolygon" id=2]
vertices = PoolVector2Array( -78, -103, -76, -46, -118, -46, -119, -75, -123, -104, -126, -75, -170, -146, -235, -146, -236, -240, -75, -239, -75, -147, -123, -145, -126, -45, -236, -45, -235, -138, -171, -137, -123, -111, -123, -138, -75, -137, -75, -112 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 0, 3, 5 ), PoolIntArray( 6, 7, 8, 9, 10 ), PoolIntArray( 6, 10, 11 ), PoolIntArray( 12, 13, 14, 15, 5 ), PoolIntArray( 4, 5, 15, 16 ), PoolIntArray( 17, 18, 19, 16, 15 ), PoolIntArray( 17, 15, 6, 11 ) ]
outlines = [ PoolVector2Array( -75, -239, -236, -240, -235, -146, -170, -146, -171, -137, -235, -138, -236, -45, -126, -45, -126, -75, -119, -75, -118, -46, -76, -46, -78, -103, -123, -104, -123, -111, -75, -112, -75, -137, -123, -138, -123, -145, -75, -147 ) ]

[sub_resource type="NavigationPolygon" id=3]
vertices = PoolVector2Array( 30, -87, 78, -88, 78, -45, 1, -45, 1, -75, -6, -44, -68, -43, -69, -240, -6, -75, 79, -240, 30, -95, 78, -95 )
polygons = [ PoolIntArray( 0, 1, 2, 3, 4 ), PoolIntArray( 5, 6, 7, 8 ), PoolIntArray( 4, 8, 7, 9, 10 ), PoolIntArray( 9, 11, 10 ), PoolIntArray( 0, 4, 10 ), PoolIntArray( 0, 10, 10 ) ]
outlines = [ PoolVector2Array( 79, -240, -69, -240, -68, -43, -6, -44, -6, -75, 1, -75, 1, -45, 78, -45, 78, -88, 30, -87, 30, -95, 30, -95, 78, -95 ) ]

[sub_resource type="NavigationPolygon" id=4]
vertices = PoolVector2Array( 232, -239, 233, -146, 183, -146, 87, -240, 232, -138, 233, -44, 86, -44, 184, -138, 86, -139, 134, -139, 134, -146, 86, -146 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 6, 7 ), PoolIntArray( 7, 6, 8, 9 ), PoolIntArray( 2, 7, 9, 10 ), PoolIntArray( 3, 2, 10 ), PoolIntArray( 3, 10, 11 ) ]
outlines = [ PoolVector2Array( 232, -239, 233, -146, 183, -146, 184, -138, 232, -138, 233, -44, 86, -44, 86, -139, 134, -139, 134, -146, 86, -146, 87, -240 ) ]

[sub_resource type="NavigationPolygon" id=5]
vertices = PoolVector2Array( 71, 102, 71, 42, 114, 43, 114, 73, 120, 102, 122, 73, 72, 136, 72, 109, 120, 110, 120, 137, 169, 144, 234, 143, 234, 239, 71, 239, 71, 143, 120, 143, 168, 139, 122, 42, 234, 43, 234, 138 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 0, 3, 5 ), PoolIntArray( 6, 7, 8, 9 ), PoolIntArray( 10, 11, 12, 13 ), PoolIntArray( 10, 13, 14, 15 ), PoolIntArray( 16, 10, 15, 9 ), PoolIntArray( 5, 17, 18, 19, 16 ), PoolIntArray( 4, 5, 16, 8 ), PoolIntArray( 8, 16, 9 ) ]
outlines = [ PoolVector2Array( 234, 43, 234, 138, 168, 139, 169, 144, 234, 143, 234, 239, 71, 239, 71, 143, 120, 143, 120, 137, 72, 136, 72, 109, 120, 110, 120, 102, 71, 102, 71, 42, 114, 43, 114, 73, 122, 73, 122, 42 ) ]

[sub_resource type="NavigationPolygon" id=6]
vertices = PoolVector2Array( 65, 43, 64, 237, 19, 176, 19, 105, -82, 43, 11, 105, -82, 238, 12, 176, -33, 176, -40, 176, -39, 105, -33, 105 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 0, 3, 5 ), PoolIntArray( 2, 1, 6, 7 ), PoolIntArray( 8, 7, 6 ), PoolIntArray( 9, 8, 6 ), PoolIntArray( 9, 6, 4, 10 ), PoolIntArray( 5, 7, 8, 11 ), PoolIntArray( 4, 5, 11 ), PoolIntArray( 4, 11, 10 ) ]
outlines = [ PoolVector2Array( 65, 43, 64, 237, -82, 238, -82, 43 ), PoolVector2Array( -39, 105, -33, 105, -33, 176, -40, 176 ), PoolVector2Array( 11, 105, 19, 105, 19, 176, 12, 176 ) ]

[sub_resource type="NavigationPolygon" id=7]
vertices = PoolVector2Array( -235, 238, -236, 161, -169, 161, -89, 238, -138, 109, -89, 109, -169, 154, -235, 154, -236, 41, -175, 41, -175, 106, -168, 108, -138, 104, -168, 42, -89, 42, -89, 103 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 5, 3, 2, 6 ), PoolIntArray( 7, 8, 9, 10 ), PoolIntArray( 6, 7, 10, 11 ), PoolIntArray( 4, 6, 11, 12 ), PoolIntArray( 12, 11, 13, 14 ), PoolIntArray( 12, 14, 15 ) ]
outlines = [ PoolVector2Array( -89, 42, -89, 103, -138, 104, -138, 109, -89, 109, -89, 238, -235, 238, -236, 161, -169, 161, -169, 154, -235, 154, -236, 41, -175, 41, -175, 106, -168, 108, -168, 42 ) ]

[sub_resource type="CanvasItemMaterial" id=8]
light_mode = 1

Expand Down Expand Up @@ -71,24 +41,6 @@ shape = SubResource( 1 )

[node name="NPCs" type="Navigation2D" parent="."]

[node name="NavigationPolygonInstance7" type="NavigationPolygonInstance" parent="NPCs"]
navpoly = SubResource( 2 )

[node name="NavigationPolygonInstance8" type="NavigationPolygonInstance" parent="NPCs"]
navpoly = SubResource( 3 )

[node name="NavigationPolygonInstance9" type="NavigationPolygonInstance" parent="NPCs"]
navpoly = SubResource( 4 )

[node name="NavigationPolygonInstance10" type="NavigationPolygonInstance" parent="NPCs"]
navpoly = SubResource( 5 )

[node name="NavigationPolygonInstance11" type="NavigationPolygonInstance" parent="NPCs"]
navpoly = SubResource( 6 )

[node name="NavigationPolygonInstance12" type="NavigationPolygonInstance" parent="NPCs"]
navpoly = SubResource( 7 )

[node name="PossibleSpawnPoints" type="Node2D" parent="."]

[node name="Position2D" type="Position2D" parent="PossibleSpawnPoints"]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=12 format=2]
[gd_scene load_steps=11 format=2]

[ext_resource path="res://scenes/City/2D_WorldMap/Buildings/MunicipalBuilding/municipal building 01 Roof2.png" type="Texture" id=1]
[ext_resource path="res://scenes/City/2D_WorldMap/Buildings/MunicipalBuilding/municipal building 01 all walls.png" type="Texture" id=2]
Expand All @@ -14,11 +14,6 @@ polygon = PoolVector2Array( -99.9051, 66.0484, -248.098, 62.7182, -269.189, 43.8
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 478.5, 369.764 )

[sub_resource type="NavigationPolygon" id=5]
vertices = PoolVector2Array( -150.968, -54.9478, -119.886, -67.7134, -119.886, -51.6176, -159.293, -11.6556, -127.101, -250.873, -151.523, -64.3833, -160.958, -251.983, 439.027, -251.428, 440.692, -64.3833, 236.442, -73.2637, 236.442, -95.4649, 236.442, -251.428, 233.112, -127.657, 224.231, -97.1299, 220.901, -127.657, -446.243, -248.653, -364.099, -251.983, -364.099, -175.389, -448.463, -70.4886, -362.988, -66.6034, -361.878, -148.748, -159.293, 2.22011, -65.4933, 2.22011, -73.8188, 216.461, -107.675, 232.557, -246.433, 232.002, -276.959, 215.906, -280.844, 99.9051, -192.595, 2.77514, -64.9383, -250.873, -68.8235, -66.0484, 208.136, 2.22011, 333.017, 0, 333.017, 101.57, 305.266, 102.125, 345.228, -47.7324, 345.228, -55.5028, 441.802, -53.8377, 440.692, 77.1489, 424.042, 95.4649, 404.061, 100.46, 48.2875, 236.997, -24.9763, 235.887, -21.0911, 113.226, 55.5028, 102.125, -442.358, -424.597, -432.367, -435.142, -416.826, -449.573, -257.533, -449.573, -260.308, -261.418, -321.361, -261.973, -350.223, -265.859, 305.821, 215.351, 261.418, 238.662, 124.326, 239.772, 93.2448, 215.351, 94.9098, 0.555028, 177.054, 2.22011, 431.812, -438.472, 441.247, -420.156, 437.917, -264.193, 234.777, -265.859, 235.887, -321.361, 412.386, -447.908, 235.332, -447.908, 234.777, -355.218, 224.231, -352.443, 222.566, -323.581, -444.023, -55.5028, -333.017, -56.6129, -333.017, -40.5171, -447.353, 66.0484, -53.8377, -67.7134, -55.5028, -451.793, 147.638, -450.683, 149.303, -64.9383, 95.4649, -64.9383, 66.0484, -64.9383, 234.777, -42.7372, 331.907, -16.0958, 331.907, -9.99051, 207.026, -11.1006, 219.791, -42.7372, -244.767, -450.683, -67.7134, -449.573, -67.1584, -260.308, -127.101, -260.308, -160.958, -263.083, 66.0484, -56.6129, 97.685, -54.3928, 80.4791, -11.1006, -304.711, -70.4886, -350.223, -70.4886, -350.223, -147.638, -304.711, -71.0436, -322.471, 98.24, -319.141, 1.11006, -248.098, -265.303, 160.958, -57.1679, 164.843, -447.908, 220.346, -447.908, 175.944, -11.1006, -329.132, -21.0911, -332.462, 101.015, -415.716, 99.9051, -437.362, 89.9146, -355.218, -263.638, -444.023, -265.859, -192.595, -8.88045, -317.476, -11.1006, -317.476, -21.0911, 236.442, -57.1679, 333.017, -56.6129, 333.572, -45.5123, -350.223, -177.609, -324.692, -250.873, -273.074, -64.9383, -274.184, -55.5028, -303.6, -55.5028, 346.893, 97.685, 343.563, -17.2059, 77.1489, 99.9051, -318.586, -40.5171, -318.031, -52.1727, -28.3064, 101.57, -56.6129, 94.3548, -57.7229, -8.88045, -28.3064, 110.451, -318.586, -52.7277 )
polygons = [ PoolIntArray( 0, 1, 2, 3 ), PoolIntArray( 4, 1, 0, 5, 6 ), PoolIntArray( 7, 8, 9, 10 ), PoolIntArray( 11, 7, 10, 12 ), PoolIntArray( 12, 10, 13, 14 ), PoolIntArray( 15, 16, 17, 18 ), PoolIntArray( 19, 18, 17, 20 ), PoolIntArray( 21, 22, 23, 24, 25, 26, 27, 28 ), PoolIntArray( 4, 29, 30, 1 ), PoolIntArray( 31, 32, 33, 34 ), PoolIntArray( 35, 36, 37, 38, 39, 40 ), PoolIntArray( 41, 42, 43, 44 ), PoolIntArray( 45, 46, 47, 48, 49, 50, 51 ), PoolIntArray( 52, 53, 54, 55, 56, 57, 34 ), PoolIntArray( 58, 59, 60, 61, 62, 63 ), PoolIntArray( 64, 63, 62, 65 ), PoolIntArray( 66, 65, 62, 67 ), PoolIntArray( 68, 69, 70, 71 ), PoolIntArray( 72, 73, 74, 75, 76 ), PoolIntArray( 77, 72, 76 ), PoolIntArray( 78, 79, 80, 81, 82 ), PoolIntArray( 83, 84, 85, 86, 87 ), PoolIntArray( 88, 77, 76, 89, 90 ), PoolIntArray( 91, 92, 93, 94 ), PoolIntArray( 27, 95, 96, 28 ), PoolIntArray( 87, 97, 83 ), PoolIntArray( 6, 87, 86, 4 ), PoolIntArray( 98, 99, 100, 66, 67 ), PoolIntArray( 98, 67, 14 ), PoolIntArray( 98, 14, 13, 82, 81, 101 ), PoolIntArray( 102, 103, 104, 105, 71, 70 ), PoolIntArray( 106, 107, 45, 51 ), PoolIntArray( 108, 109, 110 ), PoolIntArray( 78, 111, 112, 113, 79 ), PoolIntArray( 21, 28, 108, 3 ), PoolIntArray( 114, 115, 6, 5, 116, 94, 93 ), PoolIntArray( 117, 118, 94, 116 ), PoolIntArray( 20, 17, 114, 93 ), PoolIntArray( 40, 119, 120, 35 ), PoolIntArray( 51, 50, 115, 114 ), PoolIntArray( 90, 121, 44 ), PoolIntArray( 113, 35, 120, 79 ), PoolIntArray( 102, 70, 122, 110 ), PoolIntArray( 3, 108, 110, 122, 123, 118, 117, 0 ), PoolIntArray( 124, 125, 126, 90 ), PoolIntArray( 31, 34, 57 ), PoolIntArray( 81, 31, 57, 101 ), PoolIntArray( 98, 101, 90, 89 ), PoolIntArray( 2, 88, 90, 126, 3 ), PoolIntArray( 90, 44, 43, 127, 124 ), PoolIntArray( 123, 122, 128 ), PoolIntArray( 94, 123, 128 ), PoolIntArray( 91, 94, 128 ) ]
outlines = [ PoolVector2Array( -432.367, -435.142, -442.358, -424.597, -444.023, -265.859, -355.218, -263.638, -350.223, -265.859, -350.223, -177.609, -364.099, -175.389, -364.099, -251.983, -446.243, -248.653, -448.463, -70.4886, -362.988, -66.6034, -361.878, -148.748, -350.223, -147.638, -350.223, -70.4886, -304.711, -70.4886, -318.586, -52.7277, -318.586, -40.5171, -333.017, -40.5171, -333.017, -56.6129, -444.023, -55.5028, -447.353, 66.0484, -437.362, 89.9146, -415.716, 99.9051, -332.462, 101.015, -329.132, -21.0911, -317.476, -21.0911, -317.476, -11.1006, -192.595, -8.88045, -192.595, 2.77514, -319.141, 1.11006, -322.471, 98.24, -280.844, 99.9051, -276.959, 215.906, -246.433, 232.002, -107.675, 232.557, -73.8188, 216.461, -65.4933, 2.22011, -159.293, 2.22011, -159.293, -11.6556, -57.7229, -8.88045, -56.6129, 94.3548, -28.3064, 101.57, -28.3064, 110.451, -21.0911, 113.226, -24.9763, 235.887, 48.2875, 236.997, 55.5028, 102.125, 77.1489, 99.9051, 80.4791, -11.1006, 175.944, -11.1006, 177.054, 2.22011, 94.9098, 0.555028, 93.2448, 215.351, 124.326, 239.772, 261.418, 238.662, 305.821, 215.351, 305.266, 102.125, 333.017, 101.57, 333.017, 0, 208.136, 2.22011, 207.026, -11.1006, 331.907, -9.99051, 331.907, -16.0958, 343.563, -17.2059, 346.893, 97.685, 404.061, 100.46, 424.042, 95.4649, 440.692, 77.1489, 441.802, -53.8377, 345.228, -55.5028, 345.228, -47.7324, 333.572, -45.5123, 333.017, -56.6129, 236.442, -57.1679, 234.777, -42.7372, 219.791, -42.7372, 224.231, -97.1299, 236.442, -95.4649, 236.442, -73.2637, 440.692, -64.3833, 439.027, -251.428, 236.442, -251.428, 233.112, -127.657, 220.901, -127.657, 222.566, -323.581, 235.887, -321.361, 234.777, -265.859, 437.917, -264.193, 441.247, -420.156, 431.812, -438.472, 412.386, -447.908, 235.332, -447.908, 234.777, -355.218, 224.231, -352.443, 220.346, -447.908, 164.843, -447.908, 160.958, -57.1679, 97.685, -54.3928, 95.4649, -64.9383, 149.303, -64.9383, 147.638, -450.683, -55.5028, -451.793, -53.8377, -67.7134, 66.0484, -64.9383, 66.0484, -56.6129, -119.886, -51.6176, -119.886, -67.7134, -68.8235, -66.0484, -64.9383, -250.873, -127.101, -250.873, -127.101, -260.308, -67.1584, -260.308, -67.7134, -449.573, -244.767, -450.683, -248.098, -265.303, -160.958, -263.083, -160.958, -251.983, -324.692, -250.873, -321.361, -261.973, -260.308, -261.418, -257.533, -449.573, -416.826, -449.573 ), PoolVector2Array( -151.523, -64.3833, -150.968, -54.9478, -274.184, -55.5028, -273.074, -64.9383 ), PoolVector2Array( -318.031, -52.1727, -303.6, -55.5028, -304.711, -71.0436 ) ]

[sub_resource type="CanvasItemMaterial" id=4]

[node name="Municipal Building" type="Node2D"]
Expand Down Expand Up @@ -52,9 +47,6 @@ shape = SubResource( 1 )

[node name="NPCs" type="Navigation2D" parent="."]

[node name="NavigationPolygonInstance" type="NavigationPolygonInstance" parent="NPCs"]
navpoly = SubResource( 5 )

[node name="PossibleSpawnPoints" type="Node2D" parent="."]

[node name="Position2D" type="Position2D" parent="PossibleSpawnPoints"]
Expand Down
10 changes: 1 addition & 9 deletions ProjectFolder/scenes/City/2D_WorldMap/Buildings/Park/Park.tscn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[gd_scene load_steps=10 format=2]
[gd_scene load_steps=9 format=2]

[ext_resource path="res://scenes/City/2D_WorldMap/Buildings/Park/ParkWalls.png" type="Texture" id=1]
[ext_resource path="res://scenes/City/2D_WorldMap/Buildings/Park/ParkFloor.png" type="Texture" id=2]
Expand All @@ -10,11 +10,6 @@
[sub_resource type="RectangleShape2D" id=1]
extents = Vector2( 478.5, 369.764 )

[sub_resource type="NavigationPolygon" id=2]
vertices = PoolVector2Array( 201, -17, 219, -193, 219, 200, 199, 1, 45, 174, 53, 177, 11, 178, 189, 15, 191, -30, 192, 218, 63, 175, 65, 160, 170, 15, 65, -178, 193, -219, 177, -35, 64, -157, -199, -219, 44, -178, 12, -178, -9, -179, -41, -177, -64, -179, -46, -8, -51, 1, -153, -7, -158, -23, 164, -32, -11, -159, -44, -158, 46, 8, 51, 0, 151, -14, 153, 5, 55, 155, 39, 14, 28, 17, -43, 160, -9, 159, -10, 177, -46, 178, 45, 159, 10, 159, 7, 47, 9, -156, 44, -159, 6, -49, -1, -50, 18, 18, 18, 23, 16, 31, 13, 39, 0, 49, 28, -17, 18, -18, 18, -26, -25, 18, -19, 18, -18, 28, -63, 158, -8, 46, -17, -26, -18, -18, -28, -18, -219, -193, 49, -7, -66, -161, -158, 9, -46, 9, 39, -13, 15, -35, 11, -44, -7, -48, -13, -39, -14, 37, -38, -14, -170, -32, -182, -32, -196, -23, -196, 218, -220, 192, -64, 177, -37, 15, -174, 16, -190, 12, -201, -12, -199, 3 )
polygons = [ PoolIntArray( 0, 1, 2 ), PoolIntArray( 3, 0, 2 ), PoolIntArray( 4, 5, 6 ), PoolIntArray( 7, 3, 2 ), PoolIntArray( 1, 0, 8 ), PoolIntArray( 7, 2, 9, 10, 11, 12 ), PoolIntArray( 13, 14, 1, 8, 15, 16 ), PoolIntArray( 17, 14, 13, 18 ), PoolIntArray( 17, 18, 19, 20 ), PoolIntArray( 17, 20, 21, 22 ), PoolIntArray( 23, 24, 25, 26 ), PoolIntArray( 16, 15, 27 ), PoolIntArray( 21, 20, 28, 29 ), PoolIntArray( 30, 31, 32, 33, 11, 34 ), PoolIntArray( 33, 12, 11 ), PoolIntArray( 35, 30, 34 ), PoolIntArray( 36, 35, 34 ), PoolIntArray( 37, 38, 39, 40 ), PoolIntArray( 41, 4, 6, 42, 43 ), PoolIntArray( 44, 19, 18, 45, 46, 47 ), PoolIntArray( 48, 36, 34, 49 ), PoolIntArray( 50, 49, 34 ), PoolIntArray( 51, 50, 34 ), PoolIntArray( 43, 51, 34, 41 ), PoolIntArray( 52, 43, 42, 38 ), PoolIntArray( 53, 54, 55, 16 ), PoolIntArray( 56, 57, 58, 59 ), PoolIntArray( 60, 52, 38, 37, 59 ), PoolIntArray( 61, 62, 63, 64 ), PoolIntArray( 32, 31, 65, 16, 27 ), PoolIntArray( 17, 22, 66, 64 ), PoolIntArray( 67, 25, 24, 68, 59 ), PoolIntArray( 16, 65, 69 ), PoolIntArray( 16, 69, 53 ), PoolIntArray( 16, 55, 70 ), PoolIntArray( 16, 70, 71 ), PoolIntArray( 16, 71, 46, 45 ), PoolIntArray( 29, 28, 44, 47, 72 ), PoolIntArray( 66, 29, 72, 73 ), PoolIntArray( 74, 60, 59 ), PoolIntArray( 64, 66, 73, 61 ), PoolIntArray( 64, 63, 75 ), PoolIntArray( 64, 75, 23, 26, 76 ), PoolIntArray( 64, 76, 77 ), PoolIntArray( 64, 77, 78 ), PoolIntArray( 9, 79, 80, 81, 40 ), PoolIntArray( 58, 74, 59 ), PoolIntArray( 82, 56, 59 ), PoolIntArray( 68, 82, 59 ), PoolIntArray( 83, 67, 59, 81 ), PoolIntArray( 84, 83, 81, 80 ), PoolIntArray( 64, 78, 85 ), PoolIntArray( 80, 64, 85 ), PoolIntArray( 80, 85, 86 ), PoolIntArray( 80, 86, 84 ), PoolIntArray( 9, 40, 39, 6 ), PoolIntArray( 9, 6, 5 ), PoolIntArray( 9, 5, 10 ) ]
outlines = [ PoolVector2Array( 193, -219, 219, -193, 219, 200, 192, 218, -196, 218, -220, 192, -219, -193, -199, -219 ), PoolVector2Array( -1, -50, -7, -48, -13, -39, -17, -26, -18, -18, -28, -18, -38, -14, -46, -8, -51, 1, -46, 9, -37, 15, -25, 18, -19, 18, -18, 28, -14, 37, -8, 46, 0, 49, 7, 47, 13, 39, 16, 31, 18, 23, 18, 18, 28, 17, 39, 14, 46, 8, 51, 0, 49, -7, 39, -13, 28, -17, 18, -18, 18, -26, 15, -35, 11, -44, 6, -49 ), PoolVector2Array( 164, -32, 151, -14, 153, 5, 170, 15, 189, 15, 199, 1, 201, -17, 191, -30, 177, -35 ), PoolVector2Array( -182, -32, -170, -32, -158, -23, -153, -7, -158, 9, -174, 16, -190, 12, -199, 3, -201, -12, -196, -23 ), PoolVector2Array( -64, -179, -66, -161, -44, -158, -41, -177 ), PoolVector2Array( -9, -179, -11, -159, 9, -156, 12, -178 ), PoolVector2Array( 44, -178, 44, -159, 64, -157, 65, -178 ), PoolVector2Array( -63, 158, -64, 177, -46, 178, -43, 160 ), PoolVector2Array( -9, 159, -10, 177, 11, 178, 10, 159 ), PoolVector2Array( 45, 159, 45, 174, 53, 177, 63, 175, 65, 160, 55, 155 ) ]

[sub_resource type="CanvasItemMaterial" id=3]
light_mode = 1

Expand Down Expand Up @@ -45,9 +40,6 @@ shape = SubResource( 1 )

[node name="NPCs" type="Navigation2D" parent="."]

[node name="NavigationPolygonInstance" type="NavigationPolygonInstance" parent="NPCs"]
navpoly = SubResource( 2 )

[node name="PossibleSpawnPoints" type="Node2D" parent="."]

[node name="Position2D" type="Position2D" parent="PossibleSpawnPoints"]
Expand Down
Loading

0 comments on commit ab50464

Please sign in to comment.