diff --git a/DungeonShooting_Godot/resource/map/RoomConfig.json b/DungeonShooting_Godot/resource/map/RoomConfig.json
index c2aca58..26250e4 100644
--- a/DungeonShooting_Godot/resource/map/RoomConfig.json
+++ b/DungeonShooting_Godot/resource/map/RoomConfig.json
@@ -13,16 +13,6 @@
},
"DoorAreaInfos": [
{
- "Direction": 3,
- "Start": 64,
- "End": 128
- },
- {
- "Direction": 2,
- "Start": 64,
- "End": 128
- },
- {
"Direction": 1,
"Start": 16,
"End": 144
diff --git a/DungeonShooting_Godot/resource/map/tiledata/Room3.json b/DungeonShooting_Godot/resource/map/tiledata/Room3.json
index 9878578..47e9dc1 100644
--- a/DungeonShooting_Godot/resource/map/tiledata/Room3.json
+++ b/DungeonShooting_Godot/resource/map/tiledata/Room3.json
@@ -9,16 +9,6 @@
},
"DoorAreaInfos": [
{
- "Direction": 3,
- "Start": 64,
- "End": 128
- },
- {
- "Direction": 2,
- "Start": 64,
- "End": 128
- },
- {
"Direction": 1,
"Start": 16,
"End": 144
diff --git a/DungeonShooting_Godot/src/framework/map/GenerateDungeon.cs b/DungeonShooting_Godot/src/framework/map/GenerateDungeon.cs
index ddc8a4a..54f60f9 100644
--- a/DungeonShooting_Godot/src/framework/map/GenerateDungeon.cs
+++ b/DungeonShooting_Godot/src/framework/map/GenerateDungeon.cs
@@ -31,7 +31,7 @@
///
/// 生成的房间数量
///
- private int _maxCount = 7;
+ private int _maxCount = 15;
//用于标记地图上的坐标是否被占用
private Grid _roomGrid { get; } = new Grid();
@@ -50,12 +50,12 @@
private int _roomMaxInterval = 10;
//房间横轴分散程度
- private float _roomHorizontalMinDispersion = 0f;
- private float _roomHorizontalMaxDispersion = 0f;
+ private float _roomHorizontalMinDispersion = 0.7f;
+ private float _roomHorizontalMaxDispersion = 1.1f;
//房间纵轴分散程度
- private float _roomVerticalMinDispersion = 0f;
- private float _roomVerticalMaxDispersion = 0f;
+ private float _roomVerticalMinDispersion = 0.7f;
+ private float _roomVerticalMaxDispersion = 1.1f;
//区域限制
private bool _enableLimitRange = true;
@@ -135,10 +135,6 @@
//房间大小
room.Size = new Vector2I((int)roomSplit.RoomInfo.Size.X, (int)roomSplit.RoomInfo.Size.Y);
- //随机生成房间 (老流程)
- // room.Size = new Vector2(Utils.RandRangeInt(_roomMinWidth, _roomMaxWidth),
- // Utils.RandRangeInt(_roomMinHeight, _roomMaxHeight));
-
if (prevRoomInfo != null) //表示这不是第一个房间, 就得判断当前位置下的房间是否被遮挡
{
//房间间隔
@@ -279,6 +275,8 @@
}
}
+ //这种情况下x和y轴都没有重叠, 那么就只能生成拐角通道了
+
var overlapX = Mathf.Min(room.Position.X + room.Size.X, nextRoom.Position.X + nextRoom.Size.X) -
Mathf.Max(room.Position.X, nextRoom.Position.X);
var overlapY = Mathf.Min(room.Position.Y + room.Size.Y, nextRoom.Position.Y + nextRoom.Size.Y) -
@@ -289,8 +287,7 @@
//焦点
Vector2 cross;
-
- //这种情况下x和y轴都没有重叠, 那么就只能生成拐角通道了
+
if (room.Position.X > nextRoom.Position.X)
{
if (room.Position.Y > nextRoom.Position.Y)
diff --git a/README.md b/README.md
index 0a8cd2a..b99f7ee 100644
--- a/README.md
+++ b/README.md
@@ -1,2 +1,2 @@
目前项目已经从Godot3x迁移至Godot4x
-当前Godot版本: 4.0rc2, 请使用指定的Godot版打本开项目
\ No newline at end of file
+当前Godot版本: 4.0rc3, 请使用指定的Godot版打本开项目
\ No newline at end of file