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 9acad60..c42d159 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 7fafbc7..4ca8060 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":-2,"Y":-4},"Size":{"X":8,"Y":9},"DoorAreaInfos":[],"GroupName":"TestGroup2","RoomType":1,"RoomName":"Start1","Weight":100,"Remark":""} \ No newline at end of file +{"Position":{"X":-2,"Y":-4},"Size":{"X":10,"Y":11},"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 7ec737c..5e6e779 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":58,"Y":50},{"X":6,"Y":50},{"X":6,"Y":-10},{"X":58,"Y":-10}],"NavigationPolygon":[[0,1,2,3]],"Floor":[0,0,0,0,4,1,0,0,0,4,2,0,0,0,4,2,1,0,0,4,1,1,0,0,4,0,1,0,0,4,0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_Godot/src/framework/map/DungeonGenerator.cs index 370ec30..f3f045a 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs @@ -51,11 +51,11 @@ //房间横轴分散程度 private float _roomHorizontalMinDispersion = 0f; - private float _roomHorizontalMaxDispersion = 0.5f; + private float _roomHorizontalMaxDispersion = 3f; //房间纵轴分散程度 private float _roomVerticalMinDispersion = 0f; - private float _roomVerticalMaxDispersion = 0.5f; + private float _roomVerticalMaxDispersion = 3f; //区域限制 private bool _enableLimitRange = true; @@ -584,25 +584,25 @@ nextRoomDoor.ConnectRoom = roomInfo; nextRoomDoor.ConnectDoor = roomDoor; - //先寻找直通门 - if (_random.RandomBoolean()) - { - //直行通道, 优先横轴 - if (TryConnectHorizontalDoor(roomInfo, roomDoor, nextRoomInfo, nextRoomDoor) - || TryConnectVerticalDoor(roomInfo, roomDoor, nextRoomInfo, nextRoomDoor)) - { - return true; - } - } - else - { - //直行通道, 优先纵轴 - if (TryConnectVerticalDoor(roomInfo, roomDoor, nextRoomInfo, nextRoomDoor) - || TryConnectHorizontalDoor(roomInfo, roomDoor, nextRoomInfo, nextRoomDoor)) - { - return true; - } - } + // //先寻找直通门 + // if (_random.RandomBoolean()) + // { + // //直行通道, 优先横轴 + // if (TryConnectHorizontalDoor(roomInfo, roomDoor, nextRoomInfo, nextRoomDoor) + // || TryConnectVerticalDoor(roomInfo, roomDoor, nextRoomInfo, nextRoomDoor)) + // { + // return true; + // } + // } + // else + // { + // //直行通道, 优先纵轴 + // if (TryConnectVerticalDoor(roomInfo, roomDoor, nextRoomInfo, nextRoomDoor) + // || TryConnectHorizontalDoor(roomInfo, roomDoor, nextRoomInfo, nextRoomDoor)) + // { + // return true; + // } + // } //包含拐角的通道 return TryConnectCrossDoor(roomInfo, roomDoor, nextRoomInfo, nextRoomDoor); diff --git a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs index af65d5d..d3eb128 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonTileMap.cs @@ -226,42 +226,13 @@ else //带交叉点 { //方向, 0横向, 1纵向 - var dir1 = 0; - var dir2 = 0; + var dir1 = (doorDir1 == DoorDirection.S || doorDir1 == DoorDirection.N) ? 1 : 0; + var dir2 = (doorDir2 == DoorDirection.S || doorDir2 == DoorDirection.N) ? 1 : 0; var aisleRect = doorInfo.GetCrossAisleRect(); var rect = aisleRect.Rect1; var rect2 = aisleRect.Rect2; - //计算范围 - switch (doorDir1) - { - case DoorDirection.E: //→ - break; - case DoorDirection.W: //← - break; - case DoorDirection.S: //↓ - dir1 = 1; - break; - case DoorDirection.N: //↑ - dir1 = 1; - break; - } - - switch (doorDir2) - { - case DoorDirection.E: //→ - break; - case DoorDirection.W: //← - break; - case DoorDirection.S: //↓ - dir2 = 1; - break; - case DoorDirection.N: //↑ - dir2 = 1; - break; - } - //填充交叉点 FillRect(GameConfig.AisleFloorMapLayer, config.Floor, aisleRect.Cross.Position, aisleRect.Cross.Size); @@ -275,10 +246,11 @@ else { FullVerticalAisle(config, rect); - FullVerticalAisleDown(config, rect, doorDir1 == DoorDirection.S ? doorInfo : null); - FullVerticalAisleUp(config, rect, doorDir1 == DoorDirection.N ? doorInfo : null); + FullVerticalAisleUp(config, rect, doorDir1 == DoorDirection.S ? doorInfo : null); + FullVerticalAisleDown(config, rect, doorDir1 == DoorDirection.N ? doorInfo : null); } + //墙壁, 0横向, 1纵向 if (dir2 == 0) { FullHorizontalAisle(config, rect2); @@ -288,8 +260,8 @@ else { FullVerticalAisle(config, rect2); - FullVerticalAisleDown(config, rect2, doorDir2 == DoorDirection.S ? doorInfo.ConnectDoor : null); - FullVerticalAisleUp(config, rect2, doorDir2 == DoorDirection.N ? doorInfo.ConnectDoor : null); + FullVerticalAisleUp(config, rect2, doorDir2 == DoorDirection.S ? doorInfo.ConnectDoor : null); + FullVerticalAisleDown(config, rect2, doorDir2 == DoorDirection.N ? doorInfo.ConnectDoor : null); } if ((doorDir1 == DoorDirection.N && doorDir2 == DoorDirection.E) || //↑→ @@ -357,11 +329,13 @@ }); //创建image, 这里留两个像素宽高用于描边 var image = Image.Create(x2 - x + 3, y2 - y + 3, false, Image.Format.Rgba8); + //image.Fill(new Color(0, 1, 0, 0.2f)); //填充像素点 _tempAisleFloorGrid.ForEach((gx, gy, data) => { var posX = gx - x + 1; var posY = gy - y + 1; + //image.SetPixel(posX, posY, new Color(1, 0, 0, 0.5882353F)); image.SetPixel(posX, posY, new Color(0, 0, 0, 0.5882353F)); return true; }); @@ -463,7 +437,7 @@ { _tempAisleFloorGrid.Set(p, true); } - _tileRoot.SetCell(layer, p, 0, data.AutoTileCoords); + _tileRoot.SetCell(layer, p, data.SourceId, data.AutoTileCoords); } } } @@ -584,22 +558,16 @@ 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), - new Vector2(rect.Size.X - 2, 1)); + FillRect(GameConfig.AisleFloorMapLayer, config.Floor, rect.Position + new Vector2(1, -1), new Vector2(rect.Size.X - 2, 1)); } else { - 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); + 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, -1), new Vector2(rect.Size.X - 2, 1)); - - //生成门的导航区域 var x = rect.Position.X * GameConfig.TileCellSize; var y = rect.Position.Y * GameConfig.TileCellSize; @@ -629,9 +597,13 @@ } else { - 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); + 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, rect.Size.Y), new Vector2(rect.Size.X - 2, 1)); //生成门的导航区域 diff --git a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs index 482be7a..aff1ef2 100644 --- a/DungeonShooting_Godot/src/game/activity/role/player/Player.cs +++ b/DungeonShooting_Godot/src/game/activity/role/player/Player.cs @@ -61,9 +61,9 @@ ActivePropsPack.SetCapacity(1); // debug用 - // RoleState.Acceleration = 3000; - // RoleState.Friction = 3000; - // RoleState.MoveSpeed = 500; + RoleState.Acceleration = 3000; + RoleState.Friction = 3000; + RoleState.MoveSpeed = 500; // CollisionLayer = 0; // CollisionMask = 0; // GameCamera.Main.Zoom = new Vector2(0.5f, 0.5f); diff --git a/DungeonShooting_Godot/src/game/room/DungeonManager.cs b/DungeonShooting_Godot/src/game/room/DungeonManager.cs index c297a4b..3d53ee1 100644 --- a/DungeonShooting_Godot/src/game/room/DungeonManager.cs +++ b/DungeonShooting_Godot/src/game/room/DungeonManager.cs @@ -526,40 +526,54 @@ calcRect = aisleRect.CalcAisleRect(); fogAreaRect = calcRect; - switch (roomDoorInfo.Direction) + if (roomDoorInfo.Direction == DoorDirection.E) { - case DoorDirection.E: + if (roomDoorInfo.ConnectDoor.Direction == DoorDirection.N) //→↑ + { calcRect.Position += new Vector2I(2, 0); - calcRect.Size -= new Vector2I(2, 0); - break; - case DoorDirection.W: - calcRect.Size -= new Vector2I(2, 0); - break; - case DoorDirection.S: - calcRect.Position += new Vector2I(0, 2); - calcRect.Size -= new Vector2I(0, 2); - break; - case DoorDirection.N: - calcRect.Size -= new Vector2I(0, 2); - break; + calcRect.Size -= new Vector2I(2, 3); + } + else //→↓ + { + calcRect.Position += new Vector2I(2, 3); + calcRect.Size -= new Vector2I(2, 3); + } } - - switch (roomDoorInfo.ConnectDoor.Direction) + else if (roomDoorInfo.Direction == DoorDirection.W) { - case DoorDirection.E: - calcRect.Position += new Vector2I(2, 0); - calcRect.Size -= new Vector2I(2, 0); - break; - case DoorDirection.W: - calcRect.Size -= new Vector2I(2, 0); - break; - case DoorDirection.S: + if (roomDoorInfo.ConnectDoor.Direction == DoorDirection.N) //←↑ + { + calcRect.Size -= new Vector2I(2, 3); + } + else //←↓ + { + + } + } + else if (roomDoorInfo.Direction == DoorDirection.N) + { + if (roomDoorInfo.ConnectDoor.Direction == DoorDirection.E) //↑→ + { + + } + else //↑← + { + calcRect.Position += new Vector2I(0, -1); + calcRect.Size -= new Vector2I(2, 1); + } + } + else if (roomDoorInfo.Direction == DoorDirection.S) + { + if (roomDoorInfo.ConnectDoor.Direction == DoorDirection.E) //↓→ + { + calcRect.Position += new Vector2I(2, 2); + calcRect.Size -= new Vector2I(2, 1); + } + else //↓← + { calcRect.Position += new Vector2I(0, 2); - calcRect.Size -= new Vector2I(0, 2); - break; - case DoorDirection.N: - calcRect.Size -= new Vector2I(0, 2); - break; + calcRect.Size -= new Vector2I(2, 1); + } } } @@ -616,7 +630,7 @@ var sprite = new TextureRect(); //sprite.Centered = false; sprite.Texture = roomInfo.PreviewTexture; - sprite.Position = roomInfo.Position; + sprite.Position = roomInfo.Position + new Vector2I(1, 3); var material = ResourceManager.Load(ResourcePath.resource_material_Outline2_tres, false); material.SetShaderParameter("outline_color", new Color(1, 1, 1, 0.9f)); material.SetShaderParameter("scale", 0.5f); @@ -639,19 +653,19 @@ { if (doorInfo.Direction == DoorDirection.N) { - aisleSprite.Position = doorInfo.OriginPosition - new Vector2I(0, doorInfo.AislePreviewTexture.GetHeight() - 1); + aisleSprite.Position = doorInfo.OriginPosition - new Vector2I(0, doorInfo.AislePreviewTexture.GetHeight() - 2); } else if (doorInfo.Direction == DoorDirection.S) { - aisleSprite.Position = doorInfo.OriginPosition - new Vector2I(0, 1); + aisleSprite.Position = doorInfo.OriginPosition; } else if (doorInfo.Direction == DoorDirection.E) { - aisleSprite.Position = doorInfo.OriginPosition - new Vector2I(1, 0); + aisleSprite.Position = doorInfo.OriginPosition - new Vector2I(1, -1); } else if (doorInfo.Direction == DoorDirection.W) { - aisleSprite.Position = doorInfo.OriginPosition - new Vector2I(doorInfo.AislePreviewTexture.GetWidth() - 1, 0); + aisleSprite.Position = doorInfo.OriginPosition - new Vector2I(doorInfo.AislePreviewTexture.GetWidth() - 1, -1); } } else //包含交叉点 @@ -708,6 +722,8 @@ aisleSprite.Position = doorInfo.OriginPosition; } } + + aisleSprite.Position += new Vector2(0, 1); } var aisleSpriteMaterial = ResourceManager.Load(ResourcePath.resource_material_Outline2_tres, false); diff --git a/DungeonShooting_Godot/src/game/ui/roomMap/RoomMapPanel.cs b/DungeonShooting_Godot/src/game/ui/roomMap/RoomMapPanel.cs index 3839c26..6d50aab 100644 --- a/DungeonShooting_Godot/src/game/ui/roomMap/RoomMapPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/roomMap/RoomMapPanel.cs @@ -121,7 +121,7 @@ sprite = _enemySpriteList[i]; } //更新标记位置 - sprite.Position = enemy.Position / 16; + sprite.Position = enemy.GetCenterPosition() / 16; } } @@ -148,13 +148,14 @@ } //更新地图中心点位置 + var playPosition = Player.Current.GetCenterPosition(); if (!_isMagnifyMap) { - S_Root.Instance.Position = CalcRootPosition(Player.Current.Position); + S_Root.Instance.Position = CalcRootPosition(playPosition); } else { - S_Root.Instance.Position = CalcRootPosition(Player.Current.Position) + _mapOffset; + S_Root.Instance.Position = CalcRootPosition(playPosition) + _mapOffset; S_Mark.Instance.Position = S_DrawContainer.Instance.Size / 2 + _mapOffset; } @@ -332,24 +333,24 @@ if (!flag2) //偏向过道 { if (roomDoorInfo.Direction == DoorDirection.N) - pos += new Vector2I(0, -2); + pos += new Vector2I(0, -1); else if (roomDoorInfo.Direction == DoorDirection.S) - pos += new Vector2I(0, 2); + pos += new Vector2I(0, 3); else if (roomDoorInfo.Direction == DoorDirection.E) - pos += new Vector2I(2, 0); + pos += new Vector2I(2, 1); else if (roomDoorInfo.Direction == DoorDirection.W) - pos += new Vector2I(-2, 0); + pos += new Vector2I(-2, 1); } else //偏向房间 { if (roomDoorInfo.Direction == DoorDirection.N) - pos -= new Vector2I(0, -2); + pos -= new Vector2I(0, -4); else if (roomDoorInfo.Direction == DoorDirection.S) - pos -= new Vector2I(0, 2); + pos -= new Vector2I(0, 1); else if (roomDoorInfo.Direction == DoorDirection.E) - pos -= new Vector2I(2, 0); + pos -= new Vector2I(3, -1); else if (roomDoorInfo.Direction == DoorDirection.W) - pos -= new Vector2I(-2, 0); + pos -= new Vector2I(-3, -1); } unknownSprite.Position = pos; }