diff --git a/DungeonShooting_Godot/project.godot b/DungeonShooting_Godot/project.godot index 2588b93..6d1d443 100644 --- a/DungeonShooting_Godot/project.godot +++ b/DungeonShooting_Godot/project.godot @@ -30,10 +30,6 @@ project/assembly_name="DungeonShooting" -[editor_plugins] - -enabled=PackedStringArray("res://addons/dungeonShooting_plugin/plugin.cfg") - [file_customization] folder_colors={ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json index d8cf525..fc14eb8 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/GroupConfig.json @@ -24,7 +24,12 @@ "Path": "resource/map/tileMaps/Test1/outlet/End1" } ], - "BossList": [], + "BossList": [ + { + "ErrorType": 0, + "Path": "resource/map/tileMaps/Test1/boss/Boss1" + } + ], "RewardList": [ { "ErrorType": 0, diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/Preinstall.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/Preinstall.json new file mode 100644 index 0000000..a9f951a --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/Preinstall.json @@ -0,0 +1 @@ +[{"Name":"Preinstall1","Weight":100,"Remark":"","AutoFill":true,"WaveList":[[]]}] \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/Preview.png new file mode 100644 index 0000000..7a6c9c2 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/Preview.png.import b/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/Preview.png.import new file mode 100644 index 0000000..b80c33b --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/Preview.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dp0vxdpgngsj8" +path="res://.godot/imported/Preview.png-46acff5fa2872af249169769a17dd53e.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/map/tileMaps/Test1/boss/Boss1/Preview.png" +dest_files=["res://.godot/imported/Preview.png-46acff5fa2872af249169769a17dd53e.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/Test1/boss/Boss1/RoomInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/RoomInfo.json new file mode 100644 index 0000000..adba4d9 --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/RoomInfo.json @@ -0,0 +1 @@ +{"Position":{"X":-7,"Y":-13},"Size":{"X":24,"Y":20},"DoorAreaInfos":[],"GroupName":"Test1","RoomType":3,"RoomName":"Boss1","Weight":100,"Remark":""} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/TileInfo.json new file mode 100644 index 0000000..59630cf --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/boss/Boss1/TileInfo.json @@ -0,0 +1 @@ +{"NavigationVertices":[{"X":198,"Y":-30},{"X":170,"Y":-30},{"X":22,"Y":-42},{"X":22,"Y":-78},{"X":234,"Y":-154},{"X":234,"Y":82},{"X":198,"Y":38},{"X":-74,"Y":82},{"X":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,11,-10,0,3,11,-9,0,3,11,-8,0,3,11,-7,0,3,11,-6,0,3,11,-5,0,3,11,-4,0,3,11,-3,0,3,11,2,0,3,11,3,0,3,12,-10,0,3,12,-9,0,3,12,-8,0,3,12,-7,0,3,12,-6,0,3,12,-5,0,3,12,-4,0,3,12,-3,0,3,12,-2,0,3,12,-1,0,3,12,0,0,3,12,1,0,3,12,2,0,3,12,3,0,3,13,-10,0,3,13,-9,0,3,13,-8,0,3,13,-7,0,3,13,-6,0,3,13,-5,0,3,13,-4,0,3,13,-3,0,3,13,-2,0,3,13,-1,0,3,13,0,0,3,13,1,0,3,13,2,0,3,13,3,0,3,7,0,0,3,7,1,0,3,-5,4,0,3,-4,4,0,3,-3,4,0,3,-2,4,0,3,-1,4,0,3,0,4,0,3,1,4,0,3,2,4,0,3,3,4,0,3,4,4,0,3,5,4,0,3,6,4,0,3,7,4,0,3,8,4,0,3,9,4,0,3,10,4,0,3,11,4,0,3,12,4,0,3,13,4,0,3,14,-10,0,3,14,-9,0,3,14,-8,0,3,14,-7,0,3,14,-6,0,3,14,-5,0,3,14,-4,0,3,14,-3,0,3,14,-2,0,3,14,-1,0,3,14,0,0,3,14,1,0,3,14,2,0,3,14,3,0,3,14,4,0,3,10,-2,0,3,10,-1,0,3,-1,-7,0,3,-1,-6,0,3,8,0,0,3,8,1,0,3],"Middle":[-5,-12,63,1,-5,-11,2,2,-4,-12,63,1,-4,-11,2,2,-3,-12,63,1,-3,-11,2,2,-2,-12,63,1,-2,-11,2,2,-2,-5,50,1,-2,-4,1,2,-1,-12,63,1,-1,-11,2,2,-1,-5,56,1,-1,-4,2,2,0,-12,63,1,0,-11,2,2,0,-5,24,1,0,-4,3,2,1,-12,63,1,1,-11,2,2,2,-12,63,1,2,-11,2,2,3,-12,63,1,3,-11,2,2,4,-12,63,1,4,-11,2,2,5,-12,63,1,5,-11,2,2,6,-12,63,1,6,-11,2,2,7,-12,63,1,7,-11,2,2,8,-12,63,1,8,-11,2,2,9,-12,63,1,9,-11,2,2,9,0,48,1,9,1,1,2,10,-12,63,1,10,-11,2,2,10,0,56,1,10,1,2,2,11,-12,63,1,11,-11,2,2,11,0,26,1,11,1,3,2,12,-12,63,1,12,-11,2,2,13,-12,63,1,13,-11,2,2,14,-12,63,1,14,-11,2,2],"Top":[-7,-13,511,1,-7,-12,511,1,-7,-11,511,1,-7,-10,511,1,-7,-9,511,1,-7,-8,511,1,-7,-7,511,1,-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,-7,6,511,1,-6,-13,511,1,-6,-12,255,1,-6,-11,219,1,-6,-10,219,1,-6,-9,219,1,-6,-8,219,1,-6,-7,219,1,-6,-6,219,1,-6,-5,219,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,219,1,-6,5,507,1,-6,6,511,1,-5,-13,511,1,-5,5,504,1,-5,6,511,1,-4,-13,511,1,-4,5,504,1,-4,6,511,1,-3,-13,511,1,-3,5,504,1,-3,6,511,1,-2,-13,511,1,-2,-7,144,1,-2,-6,146,1,-2,5,504,1,-2,6,511,1,-1,-13,511,1,-1,5,504,1,-1,6,511,1,0,-13,511,1,0,5,504,1,0,6,511,1,1,-13,511,1,1,5,504,1,1,6,511,1,2,-13,511,1,2,5,504,1,2,6,511,1,3,-13,511,1,3,5,504,1,3,6,511,1,4,-13,511,1,4,5,504,1,4,6,511,1,5,-13,511,1,5,5,504,1,5,6,511,1,6,-13,511,1,6,5,504,1,6,6,511,1,7,-13,511,1,7,5,504,1,7,6,511,1,8,-13,511,1,8,5,504,1,8,6,511,1,9,-13,511,1,9,5,504,1,9,6,511,1,10,-13,511,1,10,5,504,1,10,6,511,1,11,-13,511,1,11,-2,144,1,11,-1,146,1,11,5,504,1,11,6,511,1,12,-13,511,1,12,5,504,1,12,6,511,1,13,-13,511,1,13,5,504,1,13,6,511,1,14,-13,511,1,14,5,504,1,14,6,511,1,15,-13,511,1,15,-12,447,1,15,-11,438,1,15,-10,438,1,15,-9,438,1,15,-8,438,1,15,-7,438,1,15,-6,438,1,15,-5,438,1,15,-4,438,1,15,-3,438,1,15,-2,438,1,15,-1,438,1,15,0,438,1,15,1,438,1,15,2,438,1,15,3,438,1,15,4,438,1,15,5,510,1,15,6,511,1,16,-13,511,1,16,-12,511,1,16,-11,511,1,16,-10,511,1,16,-9,511,1,16,-8,511,1,16,-7,511,1,16,-6,511,1,16,-5,511,1,16,-4,511,1,16,-3,511,1,16,-2,511,1,16,-1,511,1,16,0,511,1,16,1,511,1,16,2,511,1,16,3,511,1,16,4,511,1,16,5,511,1,16,6,511,1],"CustomFloor1":[],"CustomFloor2":[],"CustomFloor3":[],"CustomMiddle1":[],"CustomMiddle2":[],"CustomTop":[]} \ No newline at end of file diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preview.png.import b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preview.png.import new file mode 100644 index 0000000..a0adc6b --- /dev/null +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/reward/Award1/Preview.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c08d7xo84ssqp" +path="res://.godot/imported/Preview.png-e48e389971aff40736b911be53ae62ea.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://resource/map/tileMaps/Test1/reward/Award1/Preview.png" +dest_files=["res://.godot/imported/Preview.png-e48e389971aff40736b911be53ae62ea.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/src/game/common/ui/EditorGridBg.cs b/DungeonShooting_Godot/src/game/common/ui/EditorGridBg.cs index 2bb7f0e..44aa66a 100644 --- a/DungeonShooting_Godot/src/game/common/ui/EditorGridBg.cs +++ b/DungeonShooting_Godot/src/game/common/ui/EditorGridBg.cs @@ -3,7 +3,7 @@ /// /// 通用Ui网格背景组件, 包含可拖拽的容器根节点 /// -public abstract partial class EditorGridBg : ColorRect, IUiNodeScript where T : IUiNode +public abstract partial class EditorGridBg : ColorRect, IUiNodeScript { /// /// 可拖拽容器根节点 @@ -16,7 +16,7 @@ /// /// 当前对象绑定的Ui节点 /// - public T UiNode { get; private set; } + public IUiNode UiNode { get; private set; } private ShaderMaterial _gridMaterial; private bool _dragMoveFlag = false; @@ -40,7 +40,7 @@ public virtual void SetUiNode(IUiNode uiNode) { - UiNode = (T)uiNode; + UiNode = uiNode; this.AddDragListener(DragButtonEnum.Middle, OnDrag); Resized += RefreshGridTrans; //打开Ui时刷新网格 diff --git a/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs b/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs index fea4640..42ed8cb 100644 --- a/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs +++ b/DungeonShooting_Godot/src/game/manager/MapProjectManager.cs @@ -177,6 +177,7 @@ preinstallInfo.Name = "Preinstall1"; preinstallInfo.Weight = 100; preinstallInfo.Remark = ""; + preinstallInfo.AutoFill = true; preinstallInfo.InitWaveList(); preinstallInfo.InitSpecialMark(roomSplit.RoomInfo.RoomType); roomSplit.Preinstall.Add(preinstallInfo); diff --git a/DungeonShooting_Godot/src/game/ui/editorTileImage/ImageBg.cs b/DungeonShooting_Godot/src/game/ui/editorTileImage/ImageBg.cs index 55bd620..0a8adf6 100644 --- a/DungeonShooting_Godot/src/game/ui/editorTileImage/ImageBg.cs +++ b/DungeonShooting_Godot/src/game/ui/editorTileImage/ImageBg.cs @@ -2,8 +2,10 @@ namespace UI.EditorTileImage; -public partial class ImageBg : EditorGridBg +public partial class ImageBg : EditorGridBg { + public new EditorTileImage.Bg UiNode => (EditorTileImage.Bg)base.UiNode; + public override void SetUiNode(IUiNode uiNode) { base.SetUiNode(uiNode); diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/FreeTileTab.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/FreeTileTab.cs index 1771702..8f5fe6b 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/FreeTileTab.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/FreeTileTab.cs @@ -6,8 +6,10 @@ /// /// 自由笔刷页签 /// -public partial class FreeTileTab : EditorGridBg +public partial class FreeTileTab : EditorGridBg { + public new MapEditorMapTile.Tab1 UiNode => (MapEditorMapTile.Tab1)base.UiNode; + private ImageTexture _texture; private Sprite2D _sprite; private Control _brush; diff --git a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs index 8c83f4f..3dda271 100644 --- a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs +++ b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftBottom/TileEditArea.cs @@ -3,8 +3,10 @@ namespace UI.TileSetEditorCombination; -public partial class TileEditArea : EditorGridBg +public partial class TileEditArea : EditorGridBg { + public new TileSetEditorCombination.LeftBottomBg UiNode => (TileSetEditorCombination.LeftBottomBg)base.UiNode; + private UiGrid _maskGrid; private readonly HashSet _useMask = new HashSet(); diff --git a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftTop/TileEditCombination.cs b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftTop/TileEditCombination.cs index 13c4d18..dc67131 100644 --- a/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftTop/TileEditCombination.cs +++ b/DungeonShooting_Godot/src/game/ui/tileSetEditorCombination/leftTop/TileEditCombination.cs @@ -5,8 +5,10 @@ namespace UI.TileSetEditorCombination; -public partial class TileEditCombination : EditorGridBg +public partial class TileEditCombination : EditorGridBg { + public new TileSetEditorCombination.LeftTopBg UiNode => (TileSetEditorCombination.LeftTopBg)base.UiNode; + // ------------------------------- 笔刷相关 ------------------------------- //笔刷数据, kay: 代表原图中的坐标, 单位: 格 private Dictionary _brushData = new Dictionary(); diff --git a/DungeonShooting_Godot/src/game/ui/tileSetEditorTerrain/down/TileEditArea.cs b/DungeonShooting_Godot/src/game/ui/tileSetEditorTerrain/down/TileEditArea.cs index 6f5cd7e..45c0023 100644 --- a/DungeonShooting_Godot/src/game/ui/tileSetEditorTerrain/down/TileEditArea.cs +++ b/DungeonShooting_Godot/src/game/ui/tileSetEditorTerrain/down/TileEditArea.cs @@ -2,8 +2,10 @@ namespace UI.TileSetEditorTerrain; -public partial class TileEditArea : EditorGridBg +public partial class TileEditArea : EditorGridBg { + public new TileSetEditorTerrain.BottomBg UiNode => (TileSetEditorTerrain.BottomBg)base.UiNode; + private bool _dragMoveFlag = false; private MaskCell _hoverCell = null; diff --git a/DungeonShooting_Godot/src/game/ui/tileSetEditorTerrain/up/TileEditTerrain.cs b/DungeonShooting_Godot/src/game/ui/tileSetEditorTerrain/up/TileEditTerrain.cs index ca1fc31..5a0b01a 100644 --- a/DungeonShooting_Godot/src/game/ui/tileSetEditorTerrain/up/TileEditTerrain.cs +++ b/DungeonShooting_Godot/src/game/ui/tileSetEditorTerrain/up/TileEditTerrain.cs @@ -2,8 +2,10 @@ namespace UI.TileSetEditorTerrain; -public partial class TileEditTerrain : EditorGridBg +public partial class TileEditTerrain : EditorGridBg { + public new TileSetEditorTerrain.TopBg UiNode => (TileSetEditorTerrain.TopBg)base.UiNode; + private bool _dragMoveFlag = false; private TerrainCell _hoverCell = null;