diff --git a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json index 669cb82..d8cf525 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json @@ -25,7 +25,12 @@ } ], "BossList": [], - "RewardList": [], + "RewardList": [ + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/Test1/reward/Award1" + } + ], "ShopList": [], "EventList": [], "Remark": "" diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preinstall.json new file mode 100644 index 0000000..d5ca4fa --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preinstall.json @@ -0,0 +1 @@ +[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":false,"WaveList":[[]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preview.png new file mode 100644 index 0000000..ca7df8c --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/RoomInfo.json new file mode 100644 index 0000000..1c2618c --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/RoomInfo.json @@ -0,0 +1 @@ +{"Position":{"X":-7,"Y":-6},"Size":{"X":11,"Y":12},"DoorAreaInfos":[{"Direction":3,"Start":0,"End":112},{"Direction":0,"Start":0,"End":112},{"Direction":2,"Start":0,"End":112},{"Direction":1,"Start":0,"End":112}],"GroupName":"Test1","RoomType":4,"RoomName":"Award1","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/TileInfo.json new file mode 100644 index 0000000..1feed79 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/TileInfo.json @@ -0,0 +1 @@ +{"NavigationVertices":[{"X":26,"Y":66},{"X":-74,"Y":66},{"X":-74,"Y":-42},{"X":26,"Y":-42}],"NavigationPolygon":[[0,1,2,3]],"Floor":[-5,-3,0,3,-5,-2,0,3,-5,-1,0,3,-5,0,0,3,-5,1,0,3,-5,2,0,3,-4,-3,0,3,-4,-2,0,3,-4,-1,0,3,-4,0,0,3,-4,1,0,3,-4,2,0,3,-3,-3,0,3,-3,-2,0,3,-3,-1,0,3,-3,0,0,3,-3,1,0,3,-3,2,0,3,-2,-3,0,3,-2,-2,0,3,-2,-1,0,3,-2,0,0,3,-2,1,0,3,-2,2,0,3,-1,-3,0,3,-1,-2,0,3,-1,-1,0,3,-1,0,0,3,-1,1,0,3,-1,2,0,3,0,-3,0,3,0,-2,0,3,0,-1,0,3,0,0,0,3,0,1,0,3,0,2,0,3,1,-3,0,3,1,-2,0,3,1,-1,0,3,1,0,0,3,1,1,0,3,1,2,0,3,-5,3,0,3,-4,3,0,3,-3,3,0,3,-2,3,0,3,-1,3,0,3,0,3,0,3,1,3,0,3],"Middle":[-5,-5,63,1,-5,-4,2,2,-4,-5,63,1,-4,-4,2,2,-3,-5,63,1,-3,-4,2,2,-2,-5,63,1,-2,-4,2,2,-1,-5,63,1,-1,-4,2,2,0,-5,63,1,0,-4,2,2,1,-5,63,1,1,-4,2,2],"Top":[-7,-6,511,1,-7,-5,511,1,-7,-4,511,1,-7,-3,511,1,-7,-2,511,1,-7,-1,511,1,-7,0,511,1,-7,1,511,1,-7,2,511,1,-7,3,511,1,-7,4,511,1,-7,5,511,1,-6,-6,511,1,-6,-5,255,1,-6,-4,219,1,-6,-3,219,1,-6,-2,219,1,-6,-1,219,1,-6,0,219,1,-6,1,219,1,-6,2,219,1,-6,3,219,1,-6,4,507,1,-6,5,511,1,-5,-6,511,1,-5,4,504,1,-5,5,511,1,-4,-6,511,1,-4,4,504,1,-4,5,511,1,-3,-6,511,1,-3,4,504,1,-3,5,511,1,-2,-6,511,1,-2,4,504,1,-2,5,511,1,-1,-6,511,1,-1,4,504,1,-1,5,511,1,0,-6,511,1,0,4,504,1,0,5,511,1,1,-6,511,1,1,4,504,1,1,5,511,1,2,-6,511,1,2,-5,447,1,2,-4,438,1,2,-3,438,1,2,-2,438,1,2,-1,438,1,2,0,438,1,2,1,438,1,2,2,438,1,2,3,438,1,2,4,510,1,2,5,511,1,3,-6,511,1,3,-5,511,1,3,-4,511,1,3,-3,511,1,3,-2,511,1,3,-1,511,1,3,0,511,1,3,1,511,1,3,2,511,1,3,3,511,1,3,4,511,1,3,5,511,1],"CustomFloor1":[-3,-1,1,18,8,-3,0,1,18,8,-3,1,1,18,8,-2,-1,1,18,8,-2,0,1,18,8,-2,1,1,18,8,-1,-1,1,18,8,-1,0,1,18,8,-1,1,1,18,8,-4,-2,2,4,8,-4,-3,2,2,6,-1,-2,2,2,8,-1,-3,2,2,6,-2,-2,2,2,8,-2,-3,2,2,6,-3,-2,2,2,8,-3,-3,2,2,6,0,-3,2,2,6,0,-2,2,5,8,1,-3,2,3,6,1,-2,2,3,7,1,-1,2,3,7,0,-1,2,1,7,1,0,2,3,7,0,0,2,1,7,1,1,2,3,7,0,1,2,1,7,1,2,2,3,7,0,2,2,5,9,1,3,2,3,8,0,3,2,2,8,-1,3,2,2,8,-1,2,2,2,6,-2,3,2,2,8,-2,2,2,2,6,-3,3,2,2,8,-3,2,2,2,6,-4,3,2,2,8,-4,2,2,4,9,-5,3,2,1,8,-5,2,2,1,7,-4,1,2,3,7,-5,1,2,1,7,-4,0,2,3,7,-5,0,2,1,7,-4,-1,2,3,7,-5,-1,2,1,7,-5,-2,2,1,7,-5,-3,2,1,6],"CustomFloor2":[-4,-2,1,13,5,0,-2,1,13,5,-4,2,1,13,6,0,2,1,13,6],"CustomFloor3":[],"CustomMiddle1":[],"CustomMiddle2":[],"CustomTop":[]} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs index b43adce..b516aad 100644 --- a/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs +++ b/DungeonShooting_Godot/src/framework/map/DungeonGenerator.cs @@ -192,6 +192,10 @@ { tempPrevRoomInfo = prevRoomInfo; } + else if (nextRoomType == DungeonRoomType.Reward) + { + tempPrevRoomInfo = prevRoomInfo; + } else if (nextRoomType == DungeonRoomType.Battle) { if (chainTryCount < chainMaxTryCount) @@ -460,7 +464,7 @@ //判断房间是否参与计数 private bool IsParticipateCounting(RoomInfo roomInfo) { - return roomInfo.RoomType == DungeonRoomType.Battle || roomInfo.RoomType == DungeonRoomType.Boss; + return roomInfo.RoomType == DungeonRoomType.Battle || roomInfo.RoomType == DungeonRoomType.Boss || roomInfo.RoomType == DungeonRoomType.Reward; } //计算下一个房间类型 @@ -470,6 +474,10 @@ { _nextRoomType = DungeonRoomType.Inlet; } + else if (_count == 1) //奖励房间 + { + _nextRoomType = DungeonRoomType.Reward; + } else if (_count == _config.RoomCount - 1) //最后一个房间是boss房间 { _nextRoomType = DungeonRoomType.Boss; diff --git a/DungeonShooting_Godot/src/game/camera/GameCamera.cs b/DungeonShooting_Godot/src/game/camera/GameCamera.cs index 35ec43d..fed8fd1 100644 --- a/DungeonShooting_Godot/src/game/camera/GameCamera.cs +++ b/DungeonShooting_Godot/src/game/camera/GameCamera.cs @@ -228,10 +228,10 @@ foreach (var keyValuePair in _shakeMap) { var shakeData = keyValuePair.Value; - var tempLenght = shakeData.Value.LengthSquared(); - if (tempLenght > length) + var tempLength = shakeData.Value.LengthSquared(); + if (tempLength > length) { - length = tempLenght; + length = tempLength; temp = shakeData.Value; if (shakeData.Decline) {