diff --git a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json index aafbd9d..22fb78e 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json @@ -21,6 +21,10 @@ { "ErrorType": 0, "Path": "resource/map/tileMaps/TestGroup1/battle/Battle5" + }, + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/TestGroup1/battle/Battle6" } ], "InletList": [ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/Preinstall.json new file mode 100644 index 0000000..c483fbf --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/Preinstall.json @@ -0,0 +1 @@ +[{"Name":"Preinstall1","Weight":100,"Remark":"","WaveList":[[{"Position":{"X":114,"Y":34},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0002","Weight":100,"Attr":{"Face":"0","Weapon":null},"Altitude":0,"VerticalSpeed":0}]},{"Position":{"X":76,"Y":-35},"Size":{"X":16,"Y":16},"SpecialMarkType":0,"DelayTime":0,"MarkList":[{"Id":"enemy0001","Weight":100,"Attr":{"Face":"0","Weapon":"weapon0008","CurrAmmon":"10","ResidueAmmo":"10"},"Altitude":0,"VerticalSpeed":0}]}]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/Preview.png new file mode 100644 index 0000000..a396f2c --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/Preview.png.import b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/Preview.png.import new file mode 100644 index 0000000..7d40ed3 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/Preview.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://7rcbxc5erlk2" +path="res://.godot/imported/Preview.png-8acadee4f0f58814edc8b7c9c800f88c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/map/tileMaps/TestGroup1/battle/Battle6/Preview.png" +dest_files=["res://.godot/imported/Preview.png-8acadee4f0f58814edc8b7c9c800f88c.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/map/tileMaps/TestGroup1/battle/Battle6/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/RoomInfo.json new file mode 100644 index 0000000..6126ee9 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/RoomInfo.json @@ -0,0 +1 @@ +{"Position":{"X":-4,"Y":-6},"Size":{"X":23,"Y":18},"DoorAreaInfos":[],"GroupName":"TestGroup1","RoomType":0,"RoomName":"Battle6","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/TileInfo.json new file mode 100644 index 0000000..8c5cd7b --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/TestGroup1/battle/Battle6/TileInfo.json @@ -0,0 +1 @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0,1,3,11,4,0,1,3,11,11,0,2,2,12,-1,0,2,2,12,1,0,3,4,12,2,0,3,3,12,3,0,3,3,12,4,0,3,3,12,11,0,2,2,13,-1,0,2,2,13,11,0,2,2,14,-1,0,3,2,14,0,0,3,3,14,11,0,2,2,15,11,0,2,2,16,11,0,2,2,17,11,0,2,2,18,-6,0,1,4,18,-5,0,1,3,18,-4,0,1,3,18,-3,0,1,3,18,-2,0,1,3,18,-1,0,1,3,18,0,0,1,3,18,1,0,1,3,18,2,0,1,3,18,3,0,1,3,18,4,0,1,3,18,5,0,1,3,18,6,0,1,3,18,7,0,1,3,18,8,0,1,3,18,9,0,1,3,18,10,0,1,3,18,11,0,13,2]} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/framework/map/serialize/RoomPreinstallInfo.cs b/DungeonShooting_Godot/src/framework/map/serialize/RoomPreinstallInfo.cs index 73713c6..7f35576 100644 --- a/DungeonShooting_Godot/src/framework/map/serialize/RoomPreinstallInfo.cs +++ b/DungeonShooting_Godot/src/framework/map/serialize/RoomPreinstallInfo.cs @@ -41,4 +41,22 @@ new List() }; } + + /// + /// 初始化特殊标记 + /// + public void InitSpecialMark(DungeonRoomType roomType) + { + if (roomType == DungeonRoomType.Inlet) //初始房间 + { + var preloading = WaveList[0]; + //玩家标记 + var markInfo = new MarkInfo(); + markInfo.Position = new SerializeVector2(); + markInfo.Size = new SerializeVector2(); + markInfo.SpecialMarkType = SpecialMarkType.BirthPoint; + markInfo.MarkList = new List(); + preloading.Add(markInfo); + } + } } \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs b/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs index 1e020ef..40d59dd 100644 --- a/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs +++ b/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs @@ -144,6 +144,15 @@ { Directory.CreateDirectory(configPath); } + + //给房间添加默认预设 + var preinstallInfo = new RoomPreinstallInfo(); + preinstallInfo.Name = "Preinstall1"; + preinstallInfo.Weight = 100; + preinstallInfo.Remark = ""; + preinstallInfo.InitWaveList(); + preinstallInfo.InitSpecialMark(roomSplit.RoomInfo.RoomType); + roomSplit.Preinstall.Add(preinstallInfo); //将组数据保存为json var options = new JsonSerializerOptions(); diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstallPanel.cs b/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstallPanel.cs index 7730e2e..15ec1ca 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstallPanel.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorCreatePreinstall/MapEditorCreatePreinstallPanel.cs @@ -77,24 +77,9 @@ data.Weight = (int)S_WeightInput.Instance.Value; //预加载波 data.InitWaveList(); - CreateSpecialMark(data.WaveList); + //初始化特殊标记 + data.InitSpecialMark(_roomType); } return data; } - - //创建特殊标记 - private void CreateSpecialMark(List> dataWaveList) - { - if (_roomType == DungeonRoomType.Inlet) //初始房间 - { - var preloading = dataWaveList[0]; - //玩家标记 - var markInfo = new MarkInfo(); - markInfo.Position = new SerializeVector2(); - markInfo.Size = new SerializeVector2(); - markInfo.SpecialMarkType = SpecialMarkType.BirthPoint; - markInfo.MarkList = new List(); - preloading.Add(markInfo); - } - } }