diff --git a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json index a8f488f..a4c35ea 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json @@ -81,12 +81,7 @@ "Path": "resource/map/tileMaps/TestGroup2/outlet/End1" } ], - "BossList": [ - { - "ErrorType": 0, - "Path": "resource/map/tileMaps/TestGroup2/boss/Boss1" - } - ], + "BossList": [], "RewardList": [], "ShopList": [], "EventList": [], diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/Preinstall.json index 638cd69..171a5ec 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/Preinstall.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/Preinstall.json @@ -1 +1 @@ -[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[]]}] \ No newline at end of file +[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":71,"Y":63},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/Preview.png index 9acad60..1c3c4aa 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/Preview.png +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/RoomInfo.json index 2609977..1f945c7 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/RoomInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/RoomInfo.json @@ -1 +1 @@ -{"Position":{"X":-2,"Y":-3},"Size":{"X":8,"Y":9},"DoorAreaInfos":[],"GroupName":"TestGroup2","RoomType":0,"RoomName":"Battle1","Weight":100,"Remark":""} \ No newline at end of file +{"Position":{"X":-2,"Y":-3},"Size":{"X":15,"Y":13},"DoorAreaInfos":[],"GroupName":"TestGroup2","RoomType":0,"RoomName":"Battle1","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/TileInfo.json index 6e8eb17..4905000 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/TileInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/battle/Battle1/TileInfo.json @@ -1 +1 @@ -{"NavigationVertices":[{"X":58,"Y":66},{"X":6,"Y":66},{"X":6,"Y":6},{"X":58,"Y":6}],"NavigationPolygon":[[0,1,2,3]],"Floor":[0,0,0,0,4,0,1,0,0,4,0,2,0,0,4,1,0,0,0,4,1,1,0,0,4,1,2,0,0,4,2,0,0,0,4,2,1,0,0,4,2,2,0,0,4,3,0,0,0,4,3,1,0,0,4,3,2,0,0,4,0,3,0,0,4,1,3,0,0,4,2,3,0,0,4,3,3,0,0,4],"Middle":[0,-2,0,9,3,0,-1,0,2,4,1,-2,0,9,3,1,-1,0,2,4,2,-2,0,9,3,2,-1,0,2,4,3,-2,0,9,3,3,-1,0,2,4],"Top":[-2,-3,0,9,2,-2,-2,0,9,2,-2,-1,0,9,2,-2,0,0,9,2,-2,1,0,9,2,-2,2,0,9,2,-2,3,0,9,2,-2,4,0,9,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9,2,3,8,0,10,0,3,9,0,9,2,4,-3,0,9,2,4,8,0,10,0,4,9,0,9,2,5,-3,0,9,2,5,8,0,10,0,5,9,0,9,2,6,-3,0,9,2,6,8,0,10,0,6,9,0,9,2,7,-3,0,9,2,7,8,0,10,0,7,9,0,9,2,8,-3,0,9,2,8,8,0,10,0,8,9,0,9,2,9,-3,0,9,2,9,8,0,10,0,9,9,0,9,2,10,-3,0,9,2,10,8,0,10,0,10,9,0,9,2,11,-3,0,9,2,11,-2,0,5,2,11,-1,0,8,1,11,0,0,8,1,11,1,0,8,1,11,2,0,8,1,11,3,0,8,1,11,4,0,8,1,11,5,0,8,1,11,6,0,8,1,11,7,0,8,1,11,8,0,5,1,11,9,0,9,2,12,-3,0,9,2,12,-2,0,9,2,12,-1,0,9,2,12,0,0,9,2,12,1,0,9,2,12,2,0,9,2,12,3,0,9,2,12,4,0,9,2,12,5,0,9,2,12,6,0,9,2,12,7,0,9,2,12,8,0,9,2,12,9,0,9,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/Preinstall.json deleted file mode 100644 index 638cd69..0000000 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/Preinstall.json +++ /dev/null @@ -1 +0,0 @@ -[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/Preview.png deleted file mode 100644 index 546cf92..0000000 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/Preview.png +++ /dev/null Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/RoomInfo.json deleted file mode 100644 index ef2d5ee..0000000 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/RoomInfo.json +++ /dev/null @@ -1 +0,0 @@ -{"Position":{"X":-2,"Y":-3},"Size":{"X":8,"Y":9},"DoorAreaInfos":[],"GroupName":"TestGroup2","RoomType":3,"RoomName":"Boss1","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/TileInfo.json deleted file mode 100644 index eaf7ab4..0000000 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/boss/Boss1/TileInfo.json +++ /dev/null @@ -1 +0,0 @@ -{"NavigationVertices":[{"X":38,"Y":54},{"X":58,"Y":66},{"X":6,"Y":66},{"X":10,"Y":54},{"X":6,"Y":6},{"X":10,"Y":18},{"X":58,"Y":6},{"X":38,"Y":18}],"NavigationPolygon":[[0,1,2,3],[3,2,4,5],[6,1,0,7],[4,6,7,5]],"Floor":[0,0,0,0,4,0,1,0,0,4,0,2,0,0,4,1,0,0,0,4,2,0,0,0,4,3,0,0,0,4,3,1,0,0,4,2,1,0,0,4,2,2,0,0,4,2,3,0,0,4,1,3,0,0,4,0,3,0,0,4,3,3,0,0,4,3,2,0,0,4],"Middle":[0,-2,0,9,3,0,-1,0,2,4,1,-2,0,9,3,1,-1,0,2,4,1,1,0,0,3,1,2,0,4,4,2,-2,0,9,3,2,-1,0,2,4,3,-2,0,9,3,3,-1,0,2,4],"Top":[-2,-3,0,9,2,-2,-2,0,9,2,-2,-1,0,9,2,-2,0,0,9,2,-2,1,0,9,2,-2,2,0,9,2,-2,3,0,9,2,-2,4,0,9,2,-2,5,0,9,2,-1,-3,0,9,2,-1,-2,0,6,2,-1,-1,0,11,2,-1,0,0,11,2,-1,1,0,11,2,-1,2,0,11,2,-1,3,0,11,2,-1,4,0,6,1,-1,5,0,9,2,0,-3,0,9,2,0,4,0,10,0,0,5,0,9,2,1,-3,0,9,2,1,4,0,10,0,1,5,0,9,2,2,-3,0,9,2,2,4,0,10,0,2,5,0,9,2,3,-3,0,9,2,3,4,0,10,0,3,5,0,9,2,4,-3,0,9,2,4,-2,0,5,2,4,-1,0,8,1,4,0,0,8,1,4,1,0,8,1,4,2,0,8,1,4,3,0,8,1,4,4,0,5,1,4,5,0,9,2,5,-3,0,9,2,5,-2,0,9,2,5,-1,0,9,2,5,0,0,9,2,5,1,0,9,2,5,2,0,9,2,5,3,0,9,2,5,4,0,9,2,5,5,0,9,2]} \ No newline at end of file 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 f0b7d50..65cf45e 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":29,"Y":13},"Size":{"X":21,"Y":14},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]}]]}] \ No newline at end of file +[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":29,"Y":13},"Size":{"X":21,"Y":14},"SpecialMarkType":1,"DelayTime":0,"MarkList":[]},{"Position":{"X":33,"Y":33},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"weapon0002","Weight":100,"Attr":{"CurrAmmon":"7","ResidueAmmo":"70"},"Altitude":8,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/sprite/map/PreviewTransition3.png b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition3.png new file mode 100644 index 0000000..1980ba0 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition3.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/PreviewTransition3.png.import b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition3.png.import new file mode 100644 index 0000000..ef25f32 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition3.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://darrof8dpbr1t" +path="res://.godot/imported/PreviewTransition3.png-fe787d7afcb36d01d034087e48b4cabb.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/map/PreviewTransition3.png" +dest_files=["res://.godot/imported/PreviewTransition3.png-fe787d7afcb36d01d034087e48b4cabb.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/map/PreviewTransition4.png b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition4.png new file mode 100644 index 0000000..d225841 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition4.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/PreviewTransition4.png.import b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition4.png.import new file mode 100644 index 0000000..7895003 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition4.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dfhuexwjihrmj" +path="res://.godot/imported/PreviewTransition4.png-a16e3d1cadcfa369e074f4745e39ff47.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/map/PreviewTransition4.png" +dest_files=["res://.godot/imported/PreviewTransition4.png-a16e3d1cadcfa369e074f4745e39ff47.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/resource/sprite/map/PreviewTransition5.png b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition5.png new file mode 100644 index 0000000..1732b21 --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition5.png Binary files differ diff --git a/DungeonShooting_Godot/resource/sprite/map/PreviewTransition5.png.import b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition5.png.import new file mode 100644 index 0000000..65c399b --- /dev/null +++ b/DungeonShooting_Godot/resource/sprite/map/PreviewTransition5.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bf5fcyfevur3x" +path="res://.godot/imported/PreviewTransition5.png-62bb59bbb2e2175f34891c69492a6e8a.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/sprite/map/PreviewTransition5.png" +dest_files=["res://.godot/imported/PreviewTransition5.png-62bb59bbb2e2175f34891c69492a6e8a.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs index 3a8ab4d..370ec30 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs @@ -46,8 +46,8 @@ private DungeonRoomType _nextRoomType = DungeonRoomType.Battle; //间隔 - private int _roomMinInterval = 1; - private int _roomMaxInterval = 3; + private int _roomMinInterval = 2; + private int _roomMaxInterval = 5; //房间横轴分散程度 private float _roomHorizontalMinDispersion = 0f; @@ -404,7 +404,7 @@ } //是否碰到其他房间或者过道 - if (_roomGrid.RectCollision(room.Position, room.Size)) + if (_roomGrid.RectCollision(room.Position - Vector2I.One, room.Size + new Vector2I(2, 2))) { //碰到其他墙壁, 再一次尝试 continue; @@ -417,7 +417,7 @@ if (!ConnectDoor(prevRoomInfo, room)) { _roomGrid.RemoveRect(room.Position, room.Size); - Debug.Log("链接通道失败"); + //Debug.Log("链接通道失败"); //房间过道没有连接上, 再一次尝试 continue; //return GenerateRoomErrorCode.NoProperDoor; diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs index 672f197..af65d5d 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs @@ -520,7 +520,7 @@ { ClearRect(GameConfig.TopMapLayer, rect.Position - new Vector2(1, 1), new Vector2(2, 4)); FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Left, rect.Position - new Vector2(1, 0), Vector2.One); - FillRect(GameConfig.TopMapLayer, config.Wall_Out_LB, rect.Position - new Vector2(1, 1), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_LB, rect.Position - new Vector2(1, 1), Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Out_LT, rect.Position + new Vector2(-1, 3), Vector2.One); FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(-1, 1), new Vector2(1, rect.Size.Y - 2)); @@ -555,7 +555,7 @@ { ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(rect.Size.X - 1, -1), new Vector2(2, 4)); FillRect(GameConfig.MiddleMapLayer, config.Wall_Vertical_Right, rect.Position + new Vector2(rect.Size.X, 0), Vector2.One); - FillRect(GameConfig.TopMapLayer, config.Wall_Out_RB, rect.Position + new Vector2(rect.Size.X, -1), Vector2.One); + FillRect(GameConfig.MiddleMapLayer, config.Wall_Out_RB, rect.Position + new Vector2(rect.Size.X, -1), Vector2.One); FillRect(GameConfig.TopMapLayer, config.Wall_Out_RT, rect.Position + new Vector2(rect.Size.X, 3), Vector2.One); FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2)); diff --git a/DungeonShooting_Godot/src/framework/map/fog/PreviewFogMask.cs b/DungeonShooting_Godot/src/framework/map/fog/PreviewFogMask.cs index 104fd66..2c154a3 100644 --- a/DungeonShooting_Godot/src/framework/map/fog/PreviewFogMask.cs +++ b/DungeonShooting_Godot/src/framework/map/fog/PreviewFogMask.cs @@ -16,7 +16,10 @@ private static bool _initTexture; private static Texture2D _previewAisle; + private static Texture2D _previewAisle_ew; private static Texture2D _previewRoom; + private static Texture2D _previewRoom_n; + private static Texture2D _previewRoom_ew; /// /// 房间门 @@ -44,6 +47,9 @@ _initTexture = true; _previewAisle = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_map_PreviewTransition_png); _previewRoom = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_map_PreviewTransition2_png); + _previewRoom_n = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_map_PreviewTransition3_png); + _previewRoom_ew = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_map_PreviewTransition4_png); + _previewAisle_ew = ResourceManager.LoadTexture2D(ResourcePath.resource_sprite_map_PreviewTransition5_png); } /// @@ -60,14 +66,14 @@ { if (fogType == PreviewFogType.Aisle) { - Texture = _previewAisle; - Position = globalPosition + new Vector2(GameConfig.TileCellSize, 0); + Texture = _previewAisle_ew; + Position = globalPosition + new Vector2(GameConfig.TileCellSize, -GameConfig.TileCellSize * 0.5f); RotationDegrees = 90; } else { - Texture = _previewRoom; - Position = globalPosition + new Vector2(-GameConfig.TileCellSize, 0); + Texture = _previewRoom_ew; + Position = globalPosition + new Vector2(-GameConfig.TileCellSize, -GameConfig.TileCellSize * 0.5f); RotationDegrees = 270; } } @@ -75,14 +81,14 @@ { if (fogType == PreviewFogType.Aisle) { - Texture = _previewAisle; - Position = globalPosition + new Vector2(-GameConfig.TileCellSize, 0); + Texture = _previewAisle_ew; + Position = globalPosition + new Vector2(-GameConfig.TileCellSize, -GameConfig.TileCellSize * 0.5f); RotationDegrees = 270; } else { - Texture = _previewRoom; - Position = globalPosition + new Vector2(GameConfig.TileCellSize, 0); + Texture = _previewRoom_ew; + Position = globalPosition + new Vector2(GameConfig.TileCellSize, -GameConfig.TileCellSize * 0.5f); RotationDegrees = 90; } } @@ -91,13 +97,13 @@ if (fogType == PreviewFogType.Aisle) { Texture = _previewAisle; - Position = globalPosition + new Vector2(0, -GameConfig.TileCellSize); + Position = globalPosition + new Vector2(0, -GameConfig.TileCellSize * 2); RotationDegrees = 0; } else { - Texture = _previewRoom; - Position = globalPosition + new Vector2(0, GameConfig.TileCellSize); + Texture = _previewRoom_n; + Position = globalPosition + new Vector2(0, GameConfig.TileCellSize * 0.5f); RotationDegrees = 180; } } diff --git a/DungeonShooting_Godot/src/game/GameApplication.cs b/DungeonShooting_Godot/src/game/GameApplication.cs index 088b7d2..9449bc1 100644 --- a/DungeonShooting_Godot/src/game/GameApplication.cs +++ b/DungeonShooting_Godot/src/game/GameApplication.cs @@ -98,7 +98,7 @@ DungeonConfig = new DungeonConfig(); DungeonConfig.GroupName = "TestGroup2"; - DungeonConfig.RoomCount = 10; + DungeonConfig.RoomCount = 15; } public override void _EnterTree() diff --git a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs index 3d3700a..86441bd 100644 --- a/DungeonShooting_Godot/src/game/manager/ResourcePath.cs +++ b/DungeonShooting_Godot/src/game/manager/ResourcePath.cs @@ -220,6 +220,9 @@ public const string resource_sprite_map_PreviewMapShadow_png = "res://resource/sprite/map/PreviewMapShadow.png"; public const string resource_sprite_map_PreviewTransition_png = "res://resource/sprite/map/PreviewTransition.png"; public const string resource_sprite_map_PreviewTransition2_png = "res://resource/sprite/map/PreviewTransition2.png"; + public const string resource_sprite_map_PreviewTransition3_png = "res://resource/sprite/map/PreviewTransition3.png"; + public const string resource_sprite_map_PreviewTransition4_png = "res://resource/sprite/map/PreviewTransition4.png"; + public const string resource_sprite_map_PreviewTransition5_png = "res://resource/sprite/map/PreviewTransition5.png"; public const string resource_sprite_map_WallTransition1_png = "res://resource/sprite/map/WallTransition1.png"; public const string resource_sprite_map_WallTransition2_png = "res://resource/sprite/map/WallTransition2.png"; public const string resource_sprite_map_WallTransition3_png = "res://resource/sprite/map/WallTransition3.png"; diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index b16af12..c297a4b 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -448,8 +448,8 @@ var affiliation = new AffiliationArea(); affiliation.Name = "AffiliationArea" + roomInfo.Id; affiliation.Init(roomInfo, new Rect2I( - roomInfo.GetWorldPosition() + GameConfig.TileCellSizeVector2I, - (roomInfo.Size - new Vector2I(2, 2)) * GameConfig.TileCellSize)); + roomInfo.GetWorldPosition() + new Vector2I(GameConfig.TileCellSize * 2, GameConfig.TileCellSize * 3), + (roomInfo.Size - new Vector2I(4, 5)) * GameConfig.TileCellSize)); roomInfo.AffiliationArea = affiliation; World.AffiliationAreaRoot.AddChild(affiliation); @@ -492,7 +492,7 @@ { var roomFog = new FogMask(); roomFog.Name = "FogMask" + roomFog.IsDestroyed; - roomFog.InitFog(roomInfo.Position, roomInfo.Size); + roomFog.InitFog(roomInfo.Position + new Vector2I(1, 1), roomInfo.Size - new Vector2I(2, 2)); World.FogMaskRoot.AddChild(roomFog); roomInfo.RoomFogMask = roomFog; @@ -565,7 +565,19 @@ //过道迷雾遮罩 var aisleFog = new FogMask(); - aisleFog.InitFog(calcRect.Position, calcRect.Size); + var calcRectSize = calcRect.Size; + var calcRectPosition = calcRect.Position; + if (roomDoorInfo.Direction == DoorDirection.N || roomDoorInfo.Direction == DoorDirection.S) + { + calcRectSize.Y -= 1; + } + else + { + calcRectPosition.Y -= 1; + calcRectSize.Y += 1; + } + + aisleFog.InitFog(calcRectPosition, calcRectSize); World.FogMaskRoot.AddChild(aisleFog); roomDoorInfo.AisleFogMask = aisleFog; roomDoorInfo.ConnectDoor.AisleFogMask = aisleFog;