diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/Preinstall.json index 91e06bf..53e2684 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/Preinstall.json @@ -1 +1 @@ -[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":63,"Y":19},"Size":{"X":21,"Y":14},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]}]]}] \ No newline at end of file +[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":63,"Y":19},"Size":{"X":21,"Y":14},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":47,"Y":-14},"Size":{"X":0,"Y":0},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0001","Weight":100,"Attr":{"CurrAmmon":"30","ResidueAmmo":"210"},"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/scene/World.tscn b/DungeonShooting_Godot/scene/World.tscn index deda1b8..7c06423 100644 --- a/DungeonShooting_Godot/scene/World.tscn +++ b/DungeonShooting_Godot/scene/World.tscn @@ -9,14 +9,15 @@ glow_strength = 1.05 glow_blend_mode = 1 -[node name="World" type="CanvasModulate" node_paths=PackedStringArray("NormalLayer", "YSortLayer", "TileRoot", "StaticSpriteRoot", "AffiliationAreaRoot", "FogMaskRoot")] +[node name="World" type="CanvasModulate" node_paths=PackedStringArray("NormalLayer", "YSortLayer", "TileRoot", "StaticSpriteRoot", "AffiliationAreaRoot", "FogMaskRoot", "NavigationRoot")] script = ExtResource("1_kt3mm") -NormalLayer = NodePath("NormalLayer") -YSortLayer = NodePath("YSortLayer") +NormalLayer = NodePath("TileRoot/NormalLayer") +YSortLayer = NodePath("TileRoot/YSortLayer") TileRoot = NodePath("TileRoot") -StaticSpriteRoot = NodePath("StaticSpriteRoot") -AffiliationAreaRoot = NodePath("AffiliationAreaRoot") -FogMaskRoot = NodePath("FogMaskRoot") +StaticSpriteRoot = NodePath("TileRoot/StaticSpriteRoot") +AffiliationAreaRoot = NodePath("TileRoot/AffiliationAreaRoot") +FogMaskRoot = NodePath("TileRoot/FogMaskRoot") +NavigationRoot = NodePath("TileRoot/NavigationRoot") metadata/_edit_vertical_guides_ = [] [node name="WorldEnvironment" type="WorldEnvironment" parent="."] @@ -27,27 +28,33 @@ format = 2 layer_0/name = "Floor" layer_0/z_index = -10 +layer_0/navigation_enabled = false layer_1/name = "Middle" layer_1/y_sort_enabled = true -layer_1/y_sort_origin = 7 +layer_1/navigation_enabled = false layer_1/tile_data = PackedInt32Array() layer_2/name = "Top" layer_2/modulate = Color(1, 1, 1, 0.784314) layer_2/z_index = 10 +layer_2/navigation_enabled = false layer_2/tile_data = PackedInt32Array() layer_3/name = "AisleFloor" layer_3/z_index = -10 +layer_3/navigation_enabled = false layer_3/tile_data = PackedInt32Array() -[node name="StaticSpriteRoot" type="Node2D" parent="."] +[node name="NavigationRoot" type="Node2D" parent="TileRoot"] z_index = -2 -[node name="NormalLayer" type="Node2D" parent="."] +[node name="StaticSpriteRoot" type="Node2D" parent="TileRoot"] +z_index = -2 + +[node name="NormalLayer" type="Node2D" parent="TileRoot"] z_index = -1 -[node name="YSortLayer" type="Node2D" parent="."] +[node name="YSortLayer" type="Node2D" parent="TileRoot"] y_sort_enabled = true -[node name="AffiliationAreaRoot" type="Node2D" parent="."] +[node name="AffiliationAreaRoot" type="Node2D" parent="TileRoot"] -[node name="FogMaskRoot" type="Node2D" parent="."] +[node name="FogMaskRoot" type="Node2D" parent="TileRoot"] diff --git a/DungeonShooting_Godot/scene/test/TestNewTerrain.tscn b/DungeonShooting_Godot/scene/test/TestNewTerrain.tscn index 7e3129a..0d74fb7 100644 --- a/DungeonShooting_Godot/scene/test/TestNewTerrain.tscn +++ b/DungeonShooting_Godot/scene/test/TestNewTerrain.tscn @@ -30,7 +30,7 @@ layer_1/name = "floor" layer_1/z_index = -10 layer_1/tile_data = PackedInt32Array(65541, 0, 4, 131077, 0, 4, 196613, 0, 4, 262149, 0, 4, 262150, 0, 4, 196614, 0, 4, 131078, 0, 4, 65542, 0, 4, 6, 0, 4, 5, 0, 4, 327685, 0, 4, 327686, 0, 4, 7, 0, 4, 65543, 0, 4, 131079, 0, 4, 196615, 0, 4, 262151, 0, 4, 327687, 0, 4, 327688, 0, 4, 262152, 0, 4, 196616, 0, 4, 8, 0, 4, 65544, 0, 4, 131080, 0, 4, 327689, 0, 4, 262153, 0, 4, 262154, 0, 4, 327690, 0, 4, 327691, 0, 4, 262155, 0, 4, 196619, 0, 4, 196618, 0, 4, 196617, 0, 4) -layer_2/name = "wall" +layer_2/name = "middle" layer_2/y_sort_enabled = true layer_2/tile_data = PackedInt32Array(-65531, 131072, 4, -65530, 131072, 4, -65529, 131072, 4, -65528, 131072, 4, 131081, 65536, 4, 131082, 131072, 4, 131083, 131072, 4, -131067, 589824, 3, -131066, 589824, 3, -131065, 589824, 3, -131064, 589824, 3, 65547, 589824, 3, 65546, 589824, 3, 65545, 524288, 3) layer_3/name = "top" diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs index 6f3bf7b..3e5cf96 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs @@ -57,19 +57,19 @@ FillRect(GameConfig.FloorMapLayer, config.Floor, roomInfo.Position + Vector2.One, roomInfo.Size - new Vector2(2, 2)); - FillRect(GameConfig.TopMapLayer, config.Wall_IN_LT, roomInfo.Position, Vector2.One); + FillRect(GameConfig.TopMapLayer, config.Wall_In_LT, roomInfo.Position, Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Left, roomInfo.Position + new Vector2(0, 1), new Vector2(1, roomInfo.Size.Y - 2)); - FillRect(GameConfig.TopMapLayer, config.Wall_IN_LB, roomInfo.Position + new Vector2(0, roomInfo.Size.Y - 1), + FillRect(GameConfig.TopMapLayer, config.Wall_In_LB, roomInfo.Position + new Vector2(0, roomInfo.Size.Y - 1), new Vector2(1, 1)); FillRect(GameConfig.TopMapLayer, config.Wall_Bottom, roomInfo.Position + new Vector2(1, roomInfo.Size.Y - 1), new Vector2(roomInfo.Size.X - 2, 1)); - FillRect(GameConfig.TopMapLayer, config.Wall_IN_RB, + FillRect(GameConfig.TopMapLayer, config.Wall_In_RB, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, roomInfo.Size.Y - 1), Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Right, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, 1), new Vector2(1, roomInfo.Size.Y - 2)); - FillRect(GameConfig.TopMapLayer, config.Wall_IN_RT, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, 0), + FillRect(GameConfig.TopMapLayer, config.Wall_In_RT, roomInfo.Position + new Vector2(roomInfo.Size.X - 1, 0), Vector2.One); FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, roomInfo.Position + Vector2.Right, new Vector2(roomInfo.Size.X - 2, 1)); @@ -274,8 +274,8 @@ else { FullVerticalAisle(config, rect); - FullVerticalAisleUp(config, rect, doorDir1 == DoorDirection.S ? doorInfo : null); - FullVerticalAisleDown(config, rect, doorDir1 == DoorDirection.N ? doorInfo : null); + FullVerticalAisleDown(config, rect, doorDir1 == DoorDirection.S ? doorInfo : null); + FullVerticalAisleUp(config, rect, doorDir1 == DoorDirection.N ? doorInfo : null); } if (dir2 == 0) @@ -287,8 +287,8 @@ else { FullVerticalAisle(config, rect2); - FullVerticalAisleUp(config, rect2, doorDir2 == DoorDirection.S ? doorInfo.ConnectDoor : null); - FullVerticalAisleDown(config, rect2, doorDir2 == DoorDirection.N ? doorInfo.ConnectDoor : null); + FullVerticalAisleDown(config, rect2, doorDir2 == DoorDirection.S ? doorInfo.ConnectDoor : null); + FullVerticalAisleUp(config, rect2, doorDir2 == DoorDirection.N ? doorInfo.ConnectDoor : null); } if ((doorDir1 == DoorDirection.N && doorDir2 == DoorDirection.E) || //↑→ @@ -297,7 +297,7 @@ FillRect(GameConfig.TopMapLayer, config.Wall_Out_RT, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), Vector2.One); - FillRect(GameConfig.TopMapLayer, config.Wall_IN_RT, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), + FillRect(GameConfig.TopMapLayer, config.Wall_In_RT, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), Vector2.One); FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, doorInfo.Cross, new Vector2(GameConfig.CorridorWidth - 1, 1)); FillRect(GameConfig.TopMapLayer, config.Wall_Right, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 1), @@ -306,22 +306,18 @@ else if ((doorDir1 == DoorDirection.E && doorDir2 == DoorDirection.S) || //→↓ (doorDir2 == DoorDirection.E && doorDir1 == DoorDirection.S)) { - FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_RB, doorInfo.Cross, Vector2.One); - FillRect(GameConfig.TopMapLayer, config.Wall_IN_RB, - doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, - GameConfig.CorridorWidth - 1), - Vector2.One); - FillRect(GameConfig.TopMapLayer, config.Wall_Right, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), - new Vector2(1, GameConfig.CorridorWidth - 1)); - FillRect(GameConfig.TopMapLayer, config.Wall_Bottom, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), - new Vector2(GameConfig.CorridorWidth - 1, 1)); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_RB, doorInfo.Cross + new Vector2I(0, -1), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Right, doorInfo.Cross, Vector2.One); + FillRect(GameConfig.TopMapLayer, config.Wall_In_RB, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, GameConfig.CorridorWidth - 1), Vector2.One); + FillRect(GameConfig.TopMapLayer, config.Wall_Right, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, -1), new Vector2(1, GameConfig.CorridorWidth)); + FillRect(GameConfig.TopMapLayer, config.Wall_Bottom, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), new Vector2(GameConfig.CorridorWidth - 1, 1)); } else if ((doorDir1 == DoorDirection.S && doorDir2 == DoorDirection.W) || //↓← (doorDir2 == DoorDirection.S && doorDir1 == DoorDirection.W)) { FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_LB, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, 0), Vector2.One); - FillRect(GameConfig.TopMapLayer, config.Wall_IN_LB, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), + FillRect(GameConfig.TopMapLayer, config.Wall_In_LB, doorInfo.Cross + new Vector2(0, GameConfig.CorridorWidth - 1), Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Left, doorInfo.Cross, new Vector2(1, GameConfig.CorridorWidth - 1)); FillRect(GameConfig.TopMapLayer, config.Wall_Bottom, doorInfo.Cross + new Vector2(1, GameConfig.CorridorWidth - 1), @@ -330,57 +326,53 @@ else if ((doorDir1 == DoorDirection.W && doorDir2 == DoorDirection.N) || //←↑ (doorDir2 == DoorDirection.W && doorDir1 == DoorDirection.N)) { - FillRect(GameConfig.TopMapLayer, config.Wall_Out_LT, - doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, - GameConfig.CorridorWidth - 1), - Vector2.One); - FillRect(GameConfig.TopMapLayer, config.Wall_IN_LT, doorInfo.Cross, Vector2.One); - FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, doorInfo.Cross + new Vector2(1, 0), - new Vector2(GameConfig.CorridorWidth - 1, 1)); - FillRect(GameConfig.TopMapLayer, config.Wall_Left, doorInfo.Cross + new Vector2(0, 1), - new Vector2(1, GameConfig.CorridorWidth - 1)); + FillRect(GameConfig.TopMapLayer, config.Wall_Out_LT, doorInfo.Cross + new Vector2(GameConfig.CorridorWidth - 1, GameConfig.CorridorWidth - 1), Vector2.One); + FillRect(GameConfig.TopMapLayer, config.Wall_In_LT, doorInfo.Cross + new Vector2I(0, -1), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Top, doorInfo.Cross + new Vector2(1, -1), new Vector2(GameConfig.CorridorWidth - 1, 1)); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Center, doorInfo.Cross + new Vector2(1, 0), new Vector2(GameConfig.CorridorWidth - 1, 1)); + FillRect(GameConfig.TopMapLayer, config.Wall_Left, doorInfo.Cross + new Vector2(0, 0), new Vector2(1, GameConfig.CorridorWidth)); } - //在房间墙上开洞 - switch (doorDir1) - { - case DoorDirection.E: //→ - ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(-1, 1), - new Vector2(1, rect.Size.Y - 2)); - break; - case DoorDirection.W: //← - ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(0, 1), - new Vector2(1, rect.Size.Y - 2)); - break; - case DoorDirection.S: //↓ - ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(1, -1), - new Vector2(rect.Size.X - 2, 1)); - break; - case DoorDirection.N: //↑ - ClearRect(GameConfig.MiddleMapLayer, doorInfo.OriginPosition + new Vector2(1, 2), - new Vector2(rect.Size.X - 2, 1)); - break; - } - - switch (doorDir2) - { - case DoorDirection.E: //→ - ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(-1, 1), - new Vector2(1, rect2.Size.Y - 2)); - break; - case DoorDirection.W: //← - ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(0, 1), - new Vector2(1, rect2.Size.Y - 2)); - break; - case DoorDirection.S: //↓ - ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, -1), - new Vector2(rect2.Size.X - 2, 1)); - break; - case DoorDirection.N: //↑ - ClearRect(GameConfig.MiddleMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, 0), - new Vector2(rect2.Size.X - 2, 1)); - break; - } + // //在房间墙上开洞 + // switch (doorDir1) + // { + // case DoorDirection.E: //→ + // ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(-1, 1), + // new Vector2(1, rect.Size.Y - 2)); + // break; + // case DoorDirection.W: //← + // ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(0, 1), + // new Vector2(1, rect.Size.Y - 2)); + // break; + // case DoorDirection.S: //↓ + // ClearRect(GameConfig.TopMapLayer, doorInfo.OriginPosition + new Vector2(1, -1), + // new Vector2(rect.Size.X - 2, 1)); + // break; + // case DoorDirection.N: //↑ + // ClearRect(GameConfig.MiddleMapLayer, doorInfo.OriginPosition + new Vector2(1, 2), + // new Vector2(rect.Size.X - 2, 1)); + // break; + // } + // + // switch (doorDir2) + // { + // case DoorDirection.E: //→ + // ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(-1, 1), + // new Vector2(1, rect2.Size.Y - 2)); + // break; + // case DoorDirection.W: //← + // ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(0, 1), + // new Vector2(1, rect2.Size.Y - 2)); + // break; + // case DoorDirection.S: //↓ + // ClearRect(GameConfig.TopMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, -1), + // new Vector2(rect2.Size.X - 2, 1)); + // break; + // case DoorDirection.N: //↑ + // ClearRect(GameConfig.MiddleMapLayer, doorInfo.ConnectDoor.OriginPosition + new Vector2(1, 0), + // new Vector2(rect2.Size.X - 2, 1)); + // break; + // } } //先计算范围 @@ -652,12 +644,16 @@ } else { - FillRect(GameConfig.TopMapLayer, config.Wall_Out_RT, rect.Position + new Vector2(0, -1), Vector2.One); - FillRect(GameConfig.TopMapLayer, config.Wall_Out_LT, rect.Position + new Vector2(3, -1), Vector2.One); + ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(1, rect.Size.Y - 2), new Vector2(2, 2)); + ClearRect(GameConfig.MiddleMapLayer, rect.Position + new Vector2(0, rect.Size.Y - 1), new Vector2(4, 2)); + + FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_RB, rect.Position + new Vector2(0, rect.Size.Y - 1), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Right, rect.Position + new Vector2(0, rect.Size.Y), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_LB, rect.Position + new Vector2(rect.Size.X - 1, rect.Size.Y - 1), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Left, rect.Position + new Vector2(rect.Size.X - 1, rect.Size.Y), Vector2.One); FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1)); - ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(1, rect.Size.Y - 2), new Vector2(2, 2)); - ClearRect(GameConfig.MiddleMapLayer, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(2, 1)); + //生成门的导航区域 var x = rect.Position.X * GameConfig.TileCellSize; @@ -688,13 +684,11 @@ } else { - FillRect(GameConfig.TopMapLayer, config.Wall_Out_RB, rect.Position + new Vector2(0, rect.Size.Y - 1), Vector2.One); - FillRect(GameConfig.TopMapLayer, config.Wall_Out_LB, rect.Position + new Vector2(3, rect.Size.Y - 1), Vector2.One); - FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Right, rect.Position + new Vector2(0, rect.Size.Y), Vector2.One); - FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Left, rect.Position + new Vector2(3, rect.Size.Y), Vector2.One); + ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(1, 0), new Vector2(2, 2)); + FillRect(GameConfig.TopMapLayer, config.Wall_Out_RT, rect.Position + new Vector2(0, -1), Vector2.One); + FillRect(GameConfig.TopMapLayer, config.Wall_Out_LT, rect.Position + new Vector2(3, -1), Vector2.One); FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1)); - ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(1, 0), new Vector2(2, 2)); //生成门的导航区域 var x = rect.Position.X * GameConfig.TileCellSize; var y = rect.Position.Y * GameConfig.TileCellSize; diff --git a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs index 21ad588..cbec0bd 100644 --- a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs +++ b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs @@ -70,8 +70,10 @@ //GameCamera.Main.Zoom = new Vector2(0.2f, 0.2f); // this.CallDelay(0.5f, () => // { - // var weapon = Create(Ids.Id_weapon0009); - // PickUpWeapon(weapon); + // PickUpWeapon(Create(Ids.Id_weapon0009)); + // PickUpWeapon(Create(Ids.Id_weapon0008)); + // PickUpWeapon(Create(Ids.Id_weapon0007)); + // PickUpWeapon(Create(Ids.Id_weapon0006)); // }); //注册状态机 diff --git a/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs b/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs index 5e815d6..1b0de91 100644 --- a/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs +++ b/DungeonShooting_Godot/src/game/room/AutoTileConfig.cs @@ -17,10 +17,10 @@ public TileCellData Wall_Out_LT; public TileCellData Wall_Out_RB; public TileCellData Wall_Out_RT; - public TileCellData Wall_IN_LT; - public TileCellData Wall_IN_LB; - public TileCellData Wall_IN_RT; - public TileCellData Wall_IN_RB; + public TileCellData Wall_In_LT; + public TileCellData Wall_In_LB; + public TileCellData Wall_In_RT; + public TileCellData Wall_In_RB; public TileCellData Wall_Vertical_Left = new TileCellData(0, new Vector2I(1, 4), TerrainPeering.None, GameConfig.MiddleMapLayer); public TileCellData Wall_Vertical_Center = new TileCellData(0, new Vector2I(2, 4), TerrainPeering.None, GameConfig.MiddleMapLayer); @@ -117,10 +117,10 @@ Wall_Out_RB = Auto_110_110_000; Wall_Out_RT = Auto_000_110_110; - Wall_IN_LT = Auto_111_111_110; - Wall_IN_LB = Auto_110_111_111; - Wall_IN_RT = Auto_111_111_011; - Wall_IN_RB = Auto_011_111_111; + Wall_In_LT = Auto_111_111_110; + Wall_In_LB = Auto_110_111_111; + Wall_In_RT = Auto_111_111_011; + Wall_In_RB = Auto_011_111_111; HandlerMapping(); HandlerOtherCellMapping(); diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index 1010d3b..513687a 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -217,7 +217,7 @@ BindAisleNavigation(StartRoomInfo, _dungeonTileMap.GetPolygonData()); yield return 0; //挂载过道导航区域 - _dungeonTileMap.MountNavigationPolygon(World.TileRoot); + _dungeonTileMap.MountNavigationPolygon(World.NavigationRoot); yield return 0; //初始化所有房间 yield return _dungeonGenerator.EachRoomCoroutine(InitRoom); @@ -380,7 +380,7 @@ var navigationPolygon = new NavigationRegion2D(); navigationPolygon.Name = "NavigationRegion" + (GetChildCount() + 1); navigationPolygon.NavigationPolygon = polygonData; - World.TileRoot.AddChild(navigationPolygon); + World.NavigationRoot.AddChild(navigationPolygon); } //创建门 diff --git a/DungeonShooting_Godot/src/game/room/World.cs b/DungeonShooting_Godot/src/game/room/World.cs index ee54989..29c4175 100644 --- a/DungeonShooting_Godot/src/game/room/World.cs +++ b/DungeonShooting_Godot/src/game/room/World.cs @@ -30,6 +30,7 @@ [Export] public Node2D StaticSpriteRoot; [Export] public Node2D AffiliationAreaRoot; [Export] public Node2D FogMaskRoot; + [Export] public Node2D NavigationRoot; /// /// 是否暂停 @@ -77,7 +78,7 @@ //var tileSetAtlasSource = (TileSetAtlasSource)tileSet.GetSource(0); //tileSetAtlasSource.Texture = ImageTexture.CreateFromImage(Image.LoadFromFile("resource/tileSprite/map1/16x16 dungeon ii wall reconfig v04 spritesheet.png")); TileRoot.TileSet = tileSet; - TileRoot.YSortEnabled = false; + //TileRoot.YSortEnabled = false; } public override void _Process(double delta)