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 78f313b..4346ab3 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 041adf8..7d098e1 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":-4,"Y":-6},"Size":{"X":16,"Y":11},"DoorAreaInfos":[],"GroupName":"TestGroup2","RoomType":0,"RoomName":"Battle1","Weight":100,"Remark":""} \ No newline at end of file +{"Position":{"X":-5,"Y":-7},"Size":{"X":18,"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 07568fb..8fc4912 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":150,"Y":54},{"X":170,"Y":66},{"X":-42,"Y":66},{"X":106,"Y":54},{"X":170,"Y":-58},{"X":150,"Y":2},{"X":-42,"Y":-58},{"X":106,"Y":2},{"X":22,"Y":-30},{"X":22,"Y":22},{"X":-22,"Y":-30},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,9,2,4,-7,0,9,2,4,-6,0,9,3,4,-5,0,2,4,4,4,0,10,0,4,5,0,9,2,5,-7,0,9,2,5,-6,0,9,3,5,-5,0,2,4,5,4,0,10,0,5,5,0,9,2,6,-7,0,9,2,6,-6,0,9,3,6,-5,0,2,4,6,4,0,10,0,6,5,0,9,2,7,-7,0,9,2,7,-6,0,9,3,7,-5,0,2,4,7,0,0,8,0,7,1,0,8,3,7,2,0,1,4,7,4,0,10,0,7,5,0,9,2,8,-7,0,9,2,8,-6,0,9,3,8,-5,0,2,4,8,0,0,11,0,8,1,0,11,3,8,2,0,3,4,8,4,0,10,0,8,5,0,9,2,9,-7,0,9,2,9,-6,0,9,3,9,-5,0,2,4,9,4,0,10,0,9,5,0,9,2,10,-7,0,9,2,10,-6,0,9,3,10,-5,0,2,4,10,4,0,10,0,10,5,0,9,2,11,-7,0,9,2,11,-6,0,5,2,11,-5,0,8,1,11,-4,0,8,1,11,-3,0,8,1,11,-2,0,8,1,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,5,1,11,5,0,9,2,12,-7,0,9,2,12,-6,0,9,2,12,-5,0,9,2,12,-4,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]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/Preview.png index d987c60..9ce38d3 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/Preview.png +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/RoomInfo.json index 54cd81b..e5b6e24 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/RoomInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/RoomInfo.json @@ -1 +1 @@ -{"Position":{"X":-3,"Y":-6},"Size":{"X":13,"Y":13},"DoorAreaInfos":[{"Direction":0,"Start":32,"End":112},{"Direction":2,"Start":0,"End":160},{"Direction":1,"Start":64,"End":176},{"Direction":3,"Start":32,"End":144}],"GroupName":"TestGroup2","RoomType":1,"RoomName":"Start1","Weight":100,"Remark":""} \ No newline at end of file +{"Position":{"X":-3,"Y":-6},"Size":{"X":14,"Y":13},"DoorAreaInfos":[],"GroupName":"TestGroup2","RoomType":1,"RoomName":"Start1","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/TileInfo.json index 3550281..d59c9dd 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/TileInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/inlet/Start1/TileInfo.json @@ -1 +1 @@ -{"NavigationVertices":[{"X":54,"Y":70},{"X":122,"Y":98},{"X":-26,"Y":98},{"X":-6,"Y":70},{"X":-26,"Y":-10},{"X":-6,"Y":18},{"X":138,"Y":-42},{"X":138,"Y":34},{"X":122,"Y":34},{"X":102,"Y":6},{"X":102,"Y":-30},{"X":106,"Y":-42},{"X":22,"Y":18},{"X":6,"Y":-10},{"X":58,"Y":6},{"X":54,"Y":34},{"X":22,"Y":34},{"X":6,"Y":-58},{"X":106,"Y":-58},{"X":58,"Y":-30}],"NavigationPolygon":[[0,1,2,3],[3,2,4,5],[6,7,8,9,10,11],[12,5,4,13,14],[9,8,1,0,15,14],[15,16,12,14],[13,17,18,19],[19,14,13],[10,19,18,11]],"Floor":[0,-2,0,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2,-1,-5,0,9,3,-1,-4,0,2,4,-1,5,0,10,0,-1,6,0,9,2,0,-6,0,9,2,0,-5,0,9,3,0,-4,0,2,4,0,5,0,10,0,0,6,0,9,2,1,-6,0,9,2,1,-5,0,9,3,1,-4,0,2,4,1,5,0,10,0,1,6,0,9,2,2,-6,0,9,2,2,-5,0,9,3,2,-4,0,2,4,2,5,0,10,0,2,6,0,9,2,3,-6,0,9,2,3,-5,0,9,3,3,-4,0,2,4,3,5,0,10,0,3,6,0,9,2,4,-6,0,9,2,4,-5,0,9,3,4,-4,0,2,4,4,5,0,10,0,4,6,0,9,2,5,-6,0,9,2,5,-5,0,9,3,5,-4,0,2,4,5,5,0,10,0,5,6,0,9,2,6,-6,0,9,2,6,-5,0,9,3,6,-4,0,2,4,6,5,0,10,0,6,6,0,9,2,7,-6,0,9,2,7,-5,0,9,3,7,-4,0,2,4,7,5,0,10,0,7,6,0,9,2,8,-6,0,9,2,8,-5,0,9,3,8,-4,0,2,4,8,5,0,10,0,8,6,0,9,2,9,-6,0,9,2,9,-5,0,5,2,9,-4,0,8,1,9,-3,0,8,1,9,-2,0,8,1,9,-1,0,8,1,9,0,0,8,1,9,1,0,8,1,9,2,0,8,1,9,3,0,8,1,9,4,0,8,1,9,5,0,5,1,9,6,0,9,2,10,-6,0,9,2,10,-5,0,9,2,10,-4,0,9,2,10,-3,0,9,2,10,-2,0,9,2,10,-1,0,9,2,10,0,0,9,2,10,1,0,9,2,10,2,0,9,2,10,3,0,9,2,10,4,0,9,2,10,5,0,9,2,10,6,0,9,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/Preview.png index f9e240c..1e809b4 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/Preview.png +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/RoomInfo.json index 995da13..82afec1 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/RoomInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/RoomInfo.json @@ -1 +1 @@ -{"Position":{"X":-1,"Y":-4},"Size":{"X":9,"Y":10},"DoorAreaInfos":[],"GroupName":"TestGroup2","RoomType":2,"RoomName":"End1","Weight":100,"Remark":""} \ No newline at end of file +{"Position":{"X":-2,"Y":-5},"Size":{"X":11,"Y":12},"DoorAreaInfos":[],"GroupName":"TestGroup2","RoomType":2,"RoomName":"End1","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/TileInfo.json index efd8c99..556a97f 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/TileInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup2/outlet/End1/TileInfo.json @@ -1 +1 @@ -{"NavigationVertices":[{"X":106,"Y":-26},{"X":106,"Y":82},{"X":86,"Y":54},{"X":86,"Y":18},{"X":6,"Y":82},{"X":26,"Y":54},{"X":6,"Y":-26},{"X":26,"Y":2},{"X":54,"Y":2},{"X":54,"Y":18}],"NavigationPolygon":[[0,1,2,3],[2,1,4,5],[5,4,6,7],[7,6,0,8],[8,0,3,9]],"Floor":[0,0,0,0,4,0,-1,0,0,4,0,-2,0,0,4,1,-2,0,0,4,2,-2,0,0,4,3,-2,0,0,4,4,-2,0,0,4,5,-2,0,0,4,6,-2,0,0,4,6,-1,0,0,4,6,0,0,0,4,6,1,0,0,4,6,2,0,0,4,6,3,0,0,4,6,4,0,0,4,5,4,0,0,4,4,4,0,0,4,3,4,0,0,4,2,4,0,0,4,1,4,0,0,4,0,4,0,0,4,0,3,0,0,4,0,2,0,0,4,0,1,0,0,4,1,1,0,0,4,1,0,0,0,4,1,-1,0,0,4,2,-1,0,0,4,3,-1,0,0,4,4,-1,0,0,4,5,-1,0,0,4,5,0,0,0,4,5,2,0,0,4,5,3,0,0,4,4,3,0,0,4,3,3,0,0,4,2,3,0,0,4,1,3,0,0,4,1,2,0,0,4,4,0,0,0,4,3,0,0,0,4,5,1,0,0,4],"Middle":[],"Top":[-1,-4,0,6,2,-1,-3,0,11,2,-1,-2,0,11,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,11,2,-1,5,0,6,1,0,-4,0,9,3,0,-3,0,2,4,0,5,0,10,0,1,-4,0,9,3,1,-3,0,2,4,1,5,0,10,0,2,-4,0,9,3,2,-3,0,2,4,2,0,0,0,0,2,1,0,1,2,2,2,0,1,4,2,5,0,10,0,3,-4,0,9,3,3,-3,0,2,4,3,1,0,2,3,3,2,0,2,4,3,5,0,10,0,4,-4,0,9,3,4,-3,0,2,4,4,1,0,3,3,4,2,0,3,4,4,5,0,10,0,5,-4,0,9,3,5,-3,0,2,4,5,5,0,10,0,6,-4,0,9,3,6,-3,0,2,4,6,5,0,10,0,7,-4,0,5,2,7,-3,0,8,1,7,-2,0,8,1,7,-1,0,8,1,7,0,0,8,1,7,1,0,8,1,7,2,0,8,1,7,3,0,8,1,7,4,0,8,1,7,5,0,5,1]} \ No newline at end of file +{"NavigationVertices":[{"X":106,"Y":-26},{"X":106,"Y":82},{"X":86,"Y":54},{"X":86,"Y":18},{"X":6,"Y":82},{"X":26,"Y":54},{"X":6,"Y":-26},{"X":26,"Y":2},{"X":54,"Y":2},{"X":54,"Y":18}],"NavigationPolygon":[[0,1,2,3],[2,1,4,5],[5,4,6,7],[7,6,0,8],[8,0,3,9]],"Floor":[0,0,0,0,4,0,-1,0,0,4,1,-2,0,0,4,2,-2,0,0,4,3,-2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0,9,3,5,-3,0,2,4,5,5,0,10,0,5,6,0,9,2,6,-5,0,9,2,6,-4,0,9,3,6,-3,0,2,4,6,5,0,10,0,6,6,0,9,2,7,-5,0,9,2,7,-4,0,5,2,7,-3,0,8,1,7,-2,0,8,1,7,-1,0,8,1,7,0,0,8,1,7,1,0,8,1,7,2,0,8,1,7,3,0,8,1,7,4,0,8,1,7,5,0,5,1,7,6,0,9,2,8,-5,0,9,2,8,-4,0,9,2,8,-3,0,9,2,8,-2,0,9,2,8,-1,0,9,2,8,0,0,9,2,8,1,0,9,2,8,2,0,9,2,8,3,0,9,2,8,4,0,9,2,8,5,0,9,2,8,6,0,9,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/scene/World.tscn b/DungeonShooting_Godot/scene/World.tscn index 6b5b0c7..eccc7be 100644 --- a/DungeonShooting_Godot/scene/World.tscn +++ b/DungeonShooting_Godot/scene/World.tscn @@ -29,6 +29,7 @@ layer_1/name = "Middle" layer_1/tile_data = PackedInt32Array() layer_2/name = "Top" +layer_2/modulate = Color(1, 1, 1, 0.196078) layer_2/z_index = 10 layer_2/tile_data = PackedInt32Array() layer_3/name = "AisleFloor" diff --git a/DungeonShooting_Godot/src/framework/map/DungeonConfig.cs b/DungeonShooting_Godot/src/framework/map/DungeonConfig.cs index 92e1b0d..f546877 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonConfig.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonConfig.cs @@ -14,7 +14,7 @@ /// /// 房间数量 /// - public int RoomCount = 20; + public int RoomCount = 3; /// /// 是否指定了房间 diff --git a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs index a8e5533..6094e54 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs @@ -51,13 +51,13 @@ //房间横轴分散程度 private float _roomHorizontalMinDispersion = 0f; - private float _roomHorizontalMaxDispersion = 0.5f; + private float _roomHorizontalMaxDispersion = 2.5f; // private float _roomHorizontalMinDispersion = 0f; // private float _roomHorizontalMaxDispersion = 2f; //房间纵轴分散程度 private float _roomVerticalMinDispersion = 0f; - private float _roomVerticalMaxDispersion = 0.5f; + private float _roomVerticalMaxDispersion = 2.5f; // private float _roomVerticalMinDispersion = 0f; // private float _roomVerticalMaxDispersion = 2f; @@ -618,15 +618,15 @@ { roomDoor.Direction = DoorDirection.S; nextRoomDoor.Direction = DoorDirection.N; - roomDoor.OriginPosition = new Vector2I(x, roomInfo.GetVerticalEnd()); - nextRoomDoor.OriginPosition = new Vector2I(x, nextRoomInfo.GetVerticalStart()); + roomDoor.OriginPosition = new Vector2I(x, roomInfo.GetVerticalDoorEnd()); + nextRoomDoor.OriginPosition = new Vector2I(x, nextRoomInfo.GetVerticalDoorStart()); } else //room在下, nextRoom在上 { roomDoor.Direction = DoorDirection.N; nextRoomDoor.Direction = DoorDirection.S; - roomDoor.OriginPosition = new Vector2I(x, roomInfo.GetVerticalStart()); - nextRoomDoor.OriginPosition = new Vector2I(x, nextRoomInfo.GetVerticalEnd()); + roomDoor.OriginPosition = new Vector2I(x, roomInfo.GetVerticalDoorStart()); + nextRoomDoor.OriginPosition = new Vector2I(x, nextRoomInfo.GetVerticalDoorEnd()); } //判断门之间的通道是否有物体碰到 @@ -670,15 +670,15 @@ { roomDoor.Direction = DoorDirection.E; nextRoomDoor.Direction = DoorDirection.W; - roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalEnd(), y); - nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalStart(), y); + roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalDoorEnd(), y); + nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalDoorStart(), y); } else //room在右, nextRoom在左 { roomDoor.Direction = DoorDirection.W; nextRoomDoor.Direction = DoorDirection.E; - roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalStart(), y); - nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalEnd(), y); + roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalDoorStart(), y); + nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalDoorEnd(), y); } //判断门之间的通道是否有物体碰到 @@ -947,9 +947,9 @@ return false; } - roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalStart() + offset1, roomInfo.GetVerticalStart()); - nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalEnd(), - nextRoomInfo.GetVerticalStart() + offset2); + roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalDoorStart() + offset1, roomInfo.GetVerticalDoorStart()); + nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalDoorEnd(), + nextRoomInfo.GetVerticalDoorStart() + offset2); cross = new Vector2I(roomDoor.OriginPosition.X, nextRoomDoor.OriginPosition.Y); return true; } @@ -967,8 +967,8 @@ return false; } - roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalStart(), roomInfo.GetVerticalStart() + offset1); - nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalStart() + offset2, nextRoomInfo.GetVerticalEnd()); + roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalDoorStart(), roomInfo.GetVerticalDoorStart() + offset1); + nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalDoorStart() + offset2, nextRoomInfo.GetVerticalDoorEnd()); cross = new Vector2I(nextRoomDoor.OriginPosition.X, roomDoor.OriginPosition.Y); return true; } @@ -985,9 +985,9 @@ return false; } - roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalStart() + offset1, roomInfo.GetVerticalEnd()); - nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalEnd(), - nextRoomInfo.GetVerticalStart() + offset2); + roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalDoorStart() + offset1, roomInfo.GetVerticalDoorEnd()); + nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalDoorEnd(), + nextRoomInfo.GetVerticalDoorStart() + offset2); cross = new Vector2I(roomDoor.OriginPosition.X, nextRoomDoor.OriginPosition.Y); return true; } @@ -1005,9 +1005,9 @@ } roomDoor.OriginPosition = - new Vector2I(roomInfo.GetHorizontalStart(), roomInfo.GetVerticalStart() + offset1); // - nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalStart() + offset2, - nextRoomInfo.GetVerticalStart()); + new Vector2I(roomInfo.GetHorizontalDoorStart(), roomInfo.GetVerticalDoorStart() + offset1); // + nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalDoorStart() + offset2, + nextRoomInfo.GetVerticalDoorStart()); cross = new Vector2I(nextRoomDoor.OriginPosition.X, roomDoor.OriginPosition.Y); return true; } @@ -1024,9 +1024,9 @@ return false; } - roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalEnd(), roomInfo.GetVerticalStart() + offset1); - nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalStart() + offset2, - nextRoomInfo.GetVerticalEnd()); + roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalDoorEnd(), roomInfo.GetVerticalDoorStart() + offset1); + nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalDoorStart() + offset2, + nextRoomInfo.GetVerticalDoorEnd()); cross = new Vector2I(nextRoomDoor.OriginPosition.X, roomDoor.OriginPosition.Y); return true; } @@ -1043,9 +1043,9 @@ return false; } - roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalStart() + offset1, roomInfo.GetVerticalStart()); - nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalStart(), - nextRoomInfo.GetVerticalStart() + offset2); + roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalDoorStart() + offset1, roomInfo.GetVerticalDoorStart()); + nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalDoorStart(), + nextRoomInfo.GetVerticalDoorStart() + offset2); cross = new Vector2I(roomDoor.OriginPosition.X, nextRoomDoor.OriginPosition.Y); return true; } @@ -1062,9 +1062,9 @@ return false; } - roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalEnd(), - roomInfo.GetVerticalStart() + offset1); - nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalStart() + offset2, nextRoomInfo.GetVerticalStart()); + roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalDoorEnd(), + roomInfo.GetVerticalDoorStart() + offset1); + nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalStart() + offset2, nextRoomInfo.GetVerticalDoorStart()); cross = new Vector2I(nextRoomDoor.OriginPosition.X, roomDoor.OriginPosition.Y); return true; } @@ -1081,9 +1081,9 @@ return false; } - roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalStart() + offset1, - roomInfo.GetVerticalEnd()); - nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalStart(), nextRoomInfo.GetVerticalStart() + offset2); + roomDoor.OriginPosition = new Vector2I(roomInfo.GetHorizontalDoorStart() + offset1, + roomInfo.GetVerticalDoorEnd()); + nextRoomDoor.OriginPosition = new Vector2I(nextRoomInfo.GetHorizontalDoorStart(), nextRoomInfo.GetVerticalDoorStart() + offset2); cross = new Vector2I(roomDoor.OriginPosition.X, nextRoomDoor.OriginPosition.Y); return true; } @@ -1205,11 +1205,15 @@ Vector2I collSize; if (point1.X == point2.X) //纵向加宽, 防止贴到其它墙 { + pos.Y += 1; + size.Y -= 3; collPos = new Vector2I(pos.X - GameConfig.RoomSpace, pos.Y); collSize = new Vector2I(size.X + GameConfig.RoomSpace * 2, size.Y); } else //横向加宽, 防止贴到其它墙 { + pos.X += 1; + size.X -= 2; collPos = new Vector2I(pos.X, pos.Y - GameConfig.RoomSpace); collSize = new Vector2I(size.X, size.Y + GameConfig.RoomSpace * 2); } @@ -1244,11 +1248,29 @@ Vector2I collSize1; if (point1.X == cross.X) //纵向加宽, 防止贴到其它墙 { + if (door1.Direction == DoorDirection.N) + { + size1.Y -= 2; + } + else + { + pos1.Y += 1; + size1.Y -= 1; + } collPos1 = new Vector2I(pos1.X - GameConfig.RoomSpace, pos1.Y); collSize1 = new Vector2I(size1.X + GameConfig.RoomSpace * 2, size1.Y); } else //横向加宽, 防止贴到其它墙 { + if (door1.Direction == DoorDirection.E) + { + pos1.X += 1; + size1.X -= 1; + } + else + { + size1.X -= 1; + } collPos1 = new Vector2I(pos1.X, pos1.Y - GameConfig.RoomSpace); collSize1 = new Vector2I(size1.X, size1.Y + GameConfig.RoomSpace * 2); } @@ -1262,11 +1284,29 @@ Vector2I collSize2; if (point2.X == cross.X) //纵向加宽, 防止贴到其它墙 { + if (door2.Direction == DoorDirection.N) + { + size2.Y -= 2; + } + else + { + pos2.Y += 1; + size2.Y -= 1; + } collPos2 = new Vector2I(pos2.X - GameConfig.RoomSpace, pos2.Y); collSize2 = new Vector2I(size2.X + GameConfig.RoomSpace * 2, size2.Y); } else //横向加宽, 防止贴到其它墙 { + if (door2.Direction == DoorDirection.E) + { + pos2.X += 1; + size2.X -= 1; + } + else + { + size2.X -= 1; + } collPos2 = new Vector2I(pos2.X, pos2.Y - GameConfig.RoomSpace); collSize2 = new Vector2I(size2.X, size2.Y + GameConfig.RoomSpace * 2); } diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs index 3ac2b44..c3979fd 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs @@ -54,7 +54,7 @@ //铺房间 if (roomInfo.RoomSplit == null) //自动填充的矩形房间, 现已经弃用 { - FillRect(GameConfig.FloorMapLayer, config.Floor, roomInfo.Position + Vector2.One, + FillRect(GameConfig.FloorMapLayer, config.Floor2, roomInfo.Position + Vector2.One, roomInfo.Size - new Vector2(2, 2)); FillRect(GameConfig.TopMapLayer, config.IN_LT, roomInfo.Position, Vector2.One); @@ -262,7 +262,7 @@ } //填充交叉点 - FillRect(GameConfig.AisleFloorMapLayer, config.Floor, aisleRect.Cross.Position, aisleRect.Cross.Size); + FillRect(GameConfig.AisleFloorMapLayer, config.Floor2, aisleRect.Cross.Position, aisleRect.Cross.Size); //墙壁, 0横向, 1纵向 if (dir1 == 0) @@ -529,7 +529,7 @@ //横向过道 private void FullHorizontalAisle(AutoTileConfig config, Rect2 rect) { - FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(0, 1), rect.Size - new Vector2(0, 2)); + FillRect(GameConfig.AisleFloorMapLayer, config.Floor2, rect.Position + new Vector2(0, 1), rect.Size - new Vector2(0, 2)); FillRect(GameConfig.MiddleMapLayer, config.T, rect.Position, new Vector2(rect.Size.X, 1)); FillRect(GameConfig.TopMapLayer, config.B, rect.Position + new Vector2(0, rect.Size.Y - 1), new Vector2(rect.Size.X, 1)); } @@ -537,7 +537,7 @@ //纵向过道 private void FullVerticalAisle(AutoTileConfig config, Rect2 rect) { - FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, 0), rect.Size - new Vector2(2, 0)); + FillRect(GameConfig.AisleFloorMapLayer, config.Floor2, rect.Position + new Vector2(1, 0), rect.Size - new Vector2(2, 0)); FillRect(GameConfig.TopMapLayer, config.L, rect.Position, new Vector2(1, rect.Size.Y)); FillRect(GameConfig.TopMapLayer, config.R, rect.Position + new Vector2(rect.Size.X - 1, 0), new Vector2(1, rect.Size.Y)); } @@ -549,7 +549,7 @@ ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(-1, 1), new Vector2(1, rect.Size.Y - 2)); if (doorInfo == null) { - FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(-1, 1), + FillRect(GameConfig.AisleFloorMapLayer, config.Floor2, rect.Position + new Vector2(-1, 1), new Vector2(1, rect.Size.Y - 2)); } else @@ -558,7 +558,7 @@ FillRect(GameConfig.MiddleMapLayer, config.OUT_LB, rect.Position + new Vector2(-1, 0), Vector2.One); FillRect(GameConfig.TopMapLayer, config.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)); + FillRect(GameConfig.FloorMapLayer, config.Floor2, rect.Position + new Vector2(-1, 1), new Vector2(1, rect.Size.Y - 2)); //生成门的导航区域 var x = rect.Position.X * GameConfig.TileCellSize; var y = rect.Position.Y * GameConfig.TileCellSize; @@ -584,7 +584,7 @@ ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2)); if (doorInfo == null) { - FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2)); + FillRect(GameConfig.AisleFloorMapLayer, config.Floor2, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2)); } else { @@ -592,7 +592,7 @@ FillRect(GameConfig.MiddleMapLayer, config.OUT_RB, rect.Position + new Vector2(rect.Size.X, 0), Vector2.One); FillRect(GameConfig.TopMapLayer, config.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)); + FillRect(GameConfig.FloorMapLayer, config.Floor2, rect.Position + new Vector2(rect.Size.X, 1), new Vector2(1, rect.Size.Y - 2)); //生成门的导航区域 var x = rect.Position.X * GameConfig.TileCellSize; var y = rect.Position.Y * GameConfig.TileCellSize; @@ -618,7 +618,7 @@ ClearRect(GameConfig.TopMapLayer, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1)); if (doorInfo == null) { - FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, -1), + FillRect(GameConfig.AisleFloorMapLayer, config.Floor2, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1)); } else @@ -626,7 +626,7 @@ FillRect(GameConfig.TopMapLayer, config.OUT_RT, rect.Position + new Vector2(0, -1), Vector2.One); FillRect(GameConfig.TopMapLayer, config.OUT_LT, rect.Position + new Vector2(3, -1), Vector2.One); - FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1)); + FillRect(GameConfig.FloorMapLayer, config.Floor2, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1)); //生成门的导航区域 var x = rect.Position.X * GameConfig.TileCellSize; var y = rect.Position.Y * GameConfig.TileCellSize; @@ -652,14 +652,14 @@ ClearRect(GameConfig.MiddleMapLayer, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1)); if (doorInfo == null) { - FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1)); + FillRect(GameConfig.AisleFloorMapLayer, config.Floor2, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1)); } else { FillRect(GameConfig.MiddleMapLayer, config.OUT_RB, rect.Position + new Vector2(0, rect.Size.Y), Vector2.One); FillRect(GameConfig.MiddleMapLayer, config.OUT_LB, rect.Position + new Vector2(3, rect.Size.Y), Vector2.One); - FillRect(GameConfig.FloorMapLayer, config.Floor, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1)); + FillRect(GameConfig.FloorMapLayer, config.Floor2, rect.Position + new Vector2(1, rect.Size.Y), new Vector2(rect.Size.X - 2, 1)); //生成门的导航区域 var x = rect.Position.X * GameConfig.TileCellSize; var y = rect.Position.Y * GameConfig.TileCellSize; @@ -794,8 +794,11 @@ private NavigationRegion2D CreateNavigationRegion(Node2D navigationRoot, NavigationPolygonData polygonData) { var polygon = new NavigationPolygon(); + polygon.CellSize = GameConfig.NavigationCellSize; polygon.AddOutline(polygonData.GetPoints()); polygon.MakePolygonsFromOutlines(); + //var param = new NavigationMeshSourceGeometryData2D(); + //NavigationServer2D.BakeFromSourceGeometryData(polygon, param); var navigationPolygon = new NavigationRegion2D(); navigationPolygon.Name = "NavigationRegion" + (navigationRoot.GetChildCount() + 1); navigationPolygon.NavigationPolygon = polygon; diff --git a/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs b/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs index f1269ca..7207dcb 100644 --- a/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/room/RoomInfo.cs @@ -302,6 +302,38 @@ { return Position.Y; } + + /// + /// 获取房间门横轴结束位置, 单位: 格 + /// + public int GetHorizontalDoorEnd() + { + return Position.X + Size.X - 1; + } + + /// + /// 获取房间门纵轴结束位置, 单位: 格 + /// + public int GetVerticalDoorEnd() + { + return Position.Y + Size.Y - 1; + } + + /// + /// 获取房间门横轴开始位置, 单位: 格 + /// + public int GetHorizontalDoorStart() + { + return Position.X + 1; + } + + /// + /// 获取房间门纵轴开始位置, 单位: 格 + /// + public int GetVerticalDoorStart() + { + return Position.Y + 2; + } /// /// 获取房间宽度, 单位: 像素 diff --git a/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomInfo.cs b/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomInfo.cs index 1a6dd9a..034fc7e 100644 --- a/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/serialize/DungeonRoomInfo.cs @@ -68,10 +68,10 @@ _completionDoorArea = new List(DoorAreaInfos); if (_completionDoorArea.Count == 0) { - _completionDoorArea.Add(new DoorAreaInfo(DoorDirection.N, GameConfig.TileCellSize, ((int)Size.X - 1) * GameConfig.TileCellSize)); - _completionDoorArea.Add(new DoorAreaInfo(DoorDirection.S, GameConfig.TileCellSize, ((int)Size.X - 1) * GameConfig.TileCellSize)); - _completionDoorArea.Add(new DoorAreaInfo(DoorDirection.W, GameConfig.TileCellSize, ((int)Size.Y - 1) * GameConfig.TileCellSize)); - _completionDoorArea.Add(new DoorAreaInfo(DoorDirection.E, GameConfig.TileCellSize, ((int)Size.Y - 1) * GameConfig.TileCellSize)); + _completionDoorArea.Add(new DoorAreaInfo(DoorDirection.N, GameConfig.TileCellSize * 2, ((int)Size.X - 4) * GameConfig.TileCellSize)); + _completionDoorArea.Add(new DoorAreaInfo(DoorDirection.S, GameConfig.TileCellSize * 2, ((int)Size.X - 4) * GameConfig.TileCellSize)); + _completionDoorArea.Add(new DoorAreaInfo(DoorDirection.W, GameConfig.TileCellSize * 2, ((int)Size.Y - 4) * GameConfig.TileCellSize)); + _completionDoorArea.Add(new DoorAreaInfo(DoorDirection.E, GameConfig.TileCellSize * 2, ((int)Size.Y - 4) * GameConfig.TileCellSize)); } } diff --git a/DungeonShooting_Godot/src/game/GameConfig.cs b/DungeonShooting_Godot/src/game/GameConfig.cs index e493dae..9db0ec4 100644 --- a/DungeonShooting_Godot/src/game/GameConfig.cs +++ b/DungeonShooting_Godot/src/game/GameConfig.cs @@ -92,4 +92,9 @@ /// 导航网格代理收缩半径 /// public const float NavigationAgentRadius = 6f; + + /// + /// 寻路导航单格步长 + /// + public const float NavigationCellSize = 4; } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs index fc93bb3..21ad588 100644 --- a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs +++ b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs @@ -61,12 +61,12 @@ ActivePropsPack.SetCapacity(1); // debug用 - // RoleState.Acceleration = 3000; - // RoleState.Friction = 3000; - // RoleState.MoveSpeed = 500; - // CollisionLayer = 0; - // CollisionMask = 0; - // GameCamera.Main.Zoom = new Vector2(0.5f, 0.5f); + RoleState.Acceleration = 3000; + RoleState.Friction = 3000; + RoleState.MoveSpeed = 500; + CollisionLayer = 0; + CollisionMask = 0; + //GameCamera.Main.Zoom = new Vector2(0.5f, 0.5f); //GameCamera.Main.Zoom = new Vector2(0.2f, 0.2f); // this.CallDelay(0.5f, () => // { diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index 46d6c53..b04ede1 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -199,7 +199,7 @@ World = GameApplication.Instance.CreateNewWorld(); yield return 0; //生成地牢房间 - var random = new SeedRandom(205371406); + var random = new SeedRandom(); _dungeonGenerator = new DungeonGenerator(CurrConfig, random); _dungeonGenerator.Generate(); yield return 0; @@ -370,6 +370,7 @@ var polygon = roomInfo.RoomSplit.TileInfo.NavigationPolygon; var vertices = roomInfo.RoomSplit.TileInfo.NavigationVertices; var polygonData = new NavigationPolygon(); + polygonData.CellSize = GameConfig.NavigationCellSize; //这里的位置需要加上房间位置 polygonData.Vertices = vertices.Select(v => v.AsVector2() + worldPosition).ToArray(); for (var i = 0; i < polygon.Count; i++) diff --git a/DungeonShooting_Godot/src/game/room/World.cs b/DungeonShooting_Godot/src/game/room/World.cs index 60d34d7..ee54989 100644 --- a/DungeonShooting_Godot/src/game/room/World.cs +++ b/DungeonShooting_Godot/src/game/room/World.cs @@ -69,7 +69,7 @@ public override void _Ready() { - Color = Colors.Black; + //Color = Colors.Black; //临时处理, 加载TileSet var tileSet = ResourceManager.Load(ResourcePath.resource_tileSet_map2_TileSet2_tres); diff --git a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs index 148f369..d7383f9 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs @@ -278,9 +278,13 @@ //绘制房间区域 if (CurrRoomSize.X != 0 && CurrRoomSize.Y != 0) { - var size = TileSet.TileSize; - canvasItem.DrawRect(new Rect2(CurrRoomPosition * size, CurrRoomSize * size), - Colors.Aqua, false, 5f / Scale.X); + canvasItem.DrawRect( + new Rect2( + (CurrRoomPosition + new Vector2I(1, 2)) * GameConfig.TileCellSize, + (CurrRoomSize - new Vector2I(2, 3)) * GameConfig.TileCellSize + ), + Colors.Aqua, false, 5f / Scale.X + ); } //绘制导航网格 @@ -1213,12 +1217,13 @@ } else //聚焦地图中心点 { - var tempPos = new Vector2(CurrRoomSize.X + 2, CurrRoomSize.Y + 2); + var tempPos = new Vector2(CurrRoomSize.X, CurrRoomSize.Y); + //var tempPos = new Vector2(CurrRoomSize.X + 2, CurrRoomSize.Y + 2); var mapSize = tempPos * TileSet.TileSize; var axis = Mathf.Max(mapSize.X, mapSize.Y); var targetScale = GameConfig.PreviewImageSize / axis; Scale = new Vector2(targetScale, targetScale); - Position = pos - (CurrRoomPosition + tempPos / 2f - Vector2.One) * TileSet.TileSize * targetScale; + Position = pos - (CurrRoomPosition + tempPos / 2f) * TileSet.TileSize * targetScale; } //隐藏工具栏 diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs index 50c278b..52f3689 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorTools/MapEditorToolsPanel.cs @@ -408,10 +408,10 @@ var ePos1 = S_E_HoverRoot.Instance.Position; var sPos1 = S_S_HoverRoot.Instance.Position; var wPos1 = S_W_HoverRoot.Instance.Position; - var nPos2 = position + GameConfig.TileCellSizeVector2I; - var ePos2 = new Vector2(position.X + size.X - GameConfig.TileCellSize, position.Y + GameConfig.TileCellSize); - var sPos2 = new Vector2(position.X + GameConfig.TileCellSize, position.Y + size.Y - GameConfig.TileCellSize); - var wPos2 = position + GameConfig.TileCellSizeVector2I; + var nPos2 = position + GameConfig.TileCellSizeVector2I * 3; + var ePos2 = new Vector2(position.X + size.X - GameConfig.TileCellSize * 2, position.Y + GameConfig.TileCellSize * 2); + var sPos2 = new Vector2(position.X + GameConfig.TileCellSize * 2, position.Y + size.Y - GameConfig.TileCellSize * 2); + var wPos2 = position + GameConfig.TileCellSizeVector2I * 2; var nSize2 = new Vector2(size.X - GameConfig.TileCellSize * 2, S_N_HoverArea.Instance.Size.Y); var eSize2 = new Vector2(size.Y - GameConfig.TileCellSize * 2, S_E_HoverArea.Instance.Size.Y);