diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preview.png b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preview.png index e63c0ae..e8e1216 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preview.png +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/Preview.png Binary files differ diff --git a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/TileInfo.json b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/TileInfo.json index 59f6360..3c04ddc 100644 --- a/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/TileInfo.json +++ b/DungeonShooting_Godot/resource/map/tileMaps/Test1/battle/Battle2/TileInfo.json @@ -1 +1 @@ -{"NavigationVertices":[{"X":250,"Y":146},{"X":-106,"Y":146},{"X":-106,"Y":-106},{"X":250,"Y":-106}],"NavigationPolygon":[[0,1,2,3]],"Floor":[-7,-7,0,3,-7,-6,0,3,-7,-5,0,3,-7,-4,0,3,-7,-3,0,3,-7,-2,0,3,-7,-1,0,3,-7,0,0,3,-7,1,0,3,-7,2,0,3,-7,3,0,3,-7,4,0,3,-7,5,0,3,-7,6,0,3,-7,7,0,3,-7,8,0,3,-6,7,0,3,-6,8,0,3,-5,7,0,3,-5,8,0,3,-4,7,0,3,-4,8,0,3,-3,7,0,3,-3,8,0,3,-2,7,0,3,-2,8,0,3,-1,7,0,3,-1,8,0,3,0,7,0,3,0,8,0,3,1,7,0,3,1,8,0,3,2,7,0,3,2,8,0,3,3,7,0,3,3,8,0,3,4,7,0,3,4,8,0,3,5,7,0,3,5,8,0,3,6,7,0,3,6,8,0,3,7,7,0,3,7,8,0,3,8,7,0,3,8,8,0,3,9,7,0,3,9,8,0,3,10,7,0,3,10,8,0,3,11,7,0,3,11,8,0,3,12,7,0,3,12,8,0,3,13,7,0,3,13,8,0,3,14,7,0,3,14,8,0,3,15,-7,0,3,15,-6,0,3,15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-8,2,2,13,-9,63,1,13,-8,2,2,14,-9,63,1,14,-8,2,2,15,-9,63,1,15,-8,2,2],"Top":[-9,-10,511,1,-9,-9,511,1,-9,-8,511,1,-9,-7,511,1,-9,-6,511,1,-9,-5,511,1,-9,-4,511,1,-9,-3,511,1,-9,-2,511,1,-9,-1,511,1,-9,0,511,1,-9,1,511,1,-9,2,511,1,-9,3,511,1,-9,4,511,1,-9,5,511,1,-9,6,511,1,-9,7,511,1,-9,8,511,1,-9,9,511,1,-9,10,511,1,-8,-10,511,1,-8,-9,255,1,-8,-8,219,1,-8,-7,219,1,-8,-6,219,1,-8,-5,219,1,-8,-4,219,1,-8,-3,219,1,-8,-2,219,1,-8,-1,219,1,-8,0,219,1,-8,1,219,1,-8,2,219,1,-8,3,219,1,-8,4,219,1,-8,5,219,1,-8,6,219,1,-8,7,219,1,-8,8,219,1,-8,9,507,1,-8,10,511,1,-7,-10,511,1,-7,9,504,1,-7,10,511,1,-6,-10,511,1,-6,9,504,1,-6,10,511,1,-5,-10,511,1,-5,9,504,1,-5,10,511,1,-4,-10,511,1,-4,9,504,1,-4,10,511,1,-3,-10,511,1,-3,9,504,1,-3,10,511,1,-2,-10,511,1,-2,9,504,1,-2,10,511,1,-1,-10,511,1,-1,9,504,1,-1,10,511,1,0,-10,511,1,0,9,504,1,0,10,511,1,1,-10,511,1,1,9,504,1,1,10,511,1,2,-10,511,1,2,9,504,1,2,10,511,1,3,-10,511,1,3,9,504,1,3,10,511,1,4,-10,511,1,4,9,504,1,4,10,511,1,5,-10,511,1,5,9,504,1,5,10,511,1,6,-10,511,1,6,9,504,1,6,10,511,1,7,-10,511,1,7,9,504,1,7,10,511,1,8,-10,511,1,8,9,504,1,8,10,511,1,9,-10,511,1,9,9,504,1,9,10,511,1,10,-10,511,1,10,9,504,1,10,10,511,1,11,-10,511,1,11,9,504,1,11,10,511,1,12,-10,511,1,12,9,504,1,12,10,511,1,13,-10,511,1,13,9,504,1,13,10,511,1,14,-10,511,1,14,9,504,1,14,10,511,1,15,-10,511,1,15,9,504,1,15,10,511,1,16,-10,511,1,16,-9,447,1,16,-8,438,1,16,-7,438,1,16,-6,438,1,16,-5,438,1,16,-4,438,1,16,-3,438,1,16,-2,438,1,16,-1,438,1,16,0,438,1,16,1,438,1,16,2,438,1,16,3,438,1,16,4,438,1,16,5,438,1,16,6,438,1,16,7,438,1,16,8,438,1,16,9,510,1,16,10,511,1,17,-10,511,1,17,-9,511,1,17,-8,511,1,17,-7,511,1,17,-6,511,1,17,-5,511,1,17,-4,511,1,17,-3,511,1,17,-2,511,1,17,-1,511,1,17,0,511,1,17,1,511,1,17,2,511,1,17,3,511,1,17,4,511,1,17,5,511,1,17,6,511,1,17,7,511,1,17,8,511,1,17,9,511,1,17,10,511,1],"CustomFloor1":[],"CustomFloor2":[],"CustomFloor3":[],"CustomMiddle1":[],"CustomMiddle2":[],"CustomTop":[]} \ No newline at end of file +{"NavigationVertices":[{"X":250,"Y":146},{"X":-106,"Y":146},{"X":-106,"Y":-106},{"X":250,"Y":-106}],"NavigationPolygon":[[0,1,2,3]],"Floor":[-7,-7,0,3,-7,-6,0,3,-7,-5,0,3,-7,-4,0,3,-7,-3,0,3,-7,-2,0,3,-7,-1,0,3,-7,0,0,3,-7,1,0,3,-7,2,0,3,-7,3,0,3,-7,4,0,3,-7,5,0,3,-7,6,0,3,-7,7,0,3,-7,8,0,3,-6,7,0,3,-6,8,0,3,-5,7,0,3,-5,8,0,3,-4,7,0,3,-4,8,0,3,-3,7,0,3,-3,8,0,3,-2,7,0,3,-2,8,0,3,-1,7,0,3,-1,8,0,3,0,7,0,3,0,8,0,3,1,7,0,3,1,8,0,3,2,7,0,3,2,8,0,3,3,7,0,3,3,8,0,3,4,7,0,3,4,8,0,3,5,7,0,3,5,8,0,3,6,7,0,3,6,8,0,3,7,7,0,3,7,8,0,3,8,7,0,3,8,8,0,3,9,7,0,3,9,8,0,3,10,7,0,3,10,8,0,3,11,7,0,3,11,8,0,3,12,7,0,3,12,8,0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-8,2,2,10,-9,63,1,10,-8,2,2,11,-9,63,1,11,-8,2,2,12,-9,63,1,12,-8,2,2,13,-9,63,1,13,-8,2,2,14,-9,63,1,14,-8,2,2,15,-9,63,1,15,-8,2,2],"Top":[-9,-10,511,1,-9,-9,511,1,-9,-8,511,1,-9,-7,511,1,-9,-6,511,1,-9,-5,511,1,-9,-4,511,1,-9,-3,511,1,-9,-2,511,1,-9,-1,511,1,-9,0,511,1,-9,1,511,1,-9,2,511,1,-9,3,511,1,-9,4,511,1,-9,5,511,1,-9,6,511,1,-9,7,511,1,-9,8,511,1,-9,9,511,1,-9,10,511,1,-8,-10,511,1,-8,-9,255,1,-8,-8,219,1,-8,-7,219,1,-8,-6,219,1,-8,-5,219,1,-8,-4,219,1,-8,-3,219,1,-8,-2,219,1,-8,-1,219,1,-8,0,219,1,-8,1,219,1,-8,2,219,1,-8,3,219,1,-8,4,219,1,-8,5,219,1,-8,6,219,1,-8,7,219,1,-8,8,219,1,-8,9,507,1,-8,10,511,1,-7,-10,511,1,-7,9,504,1,-7,10,511,1,-6,-10,511,1,-6,9,504,1,-6,10,511,1,-5,-10,511,1,-5,9,504,1,-5,10,511,1,-4,-10,511,1,-4,9,504,1,-4,10,511,1,-3,-10,511,1,-3,9,504,1,-3,10,511,1,-2,-10,511,1,-2,9,504,1,-2,10,511,1,-1,-10,511,1,-1,9,504,1,-1,10,511,1,0,-10,511,1,0,9,504,1,0,10,511,1,1,-10,511,1,1,9,504,1,1,10,511,1,2,-10,511,1,2,9,504,1,2,10,511,1,3,-10,511,1,3,9,504,1,3,10,511,1,4,-10,511,1,4,9,504,1,4,10,511,1,5,-10,511,1,5,9,504,1,5,10,511,1,6,-10,511,1,6,9,504,1,6,10,511,1,7,-10,511,1,7,9,504,1,7,10,511,1,8,-10,511,1,8,9,504,1,8,10,511,1,9,-10,511,1,9,9,504,1,9,10,511,1,10,-10,511,1,10,9,504,1,10,10,511,1,11,-10,511,1,11,9,504,1,11,10,511,1,12,-10,511,1,12,9,504,1,12,10,511,1,13,-10,511,1,13,9,504,1,13,10,511,1,14,-10,511,1,14,9,504,1,14,10,511,1,15,-10,511,1,15,9,504,1,15,10,511,1,16,-10,511,1,16,-9,447,1,16,-8,438,1,16,-7,438,1,16,-6,438,1,16,-5,438,1,16,-4,438,1,16,-3,438,1,16,-2,438,1,16,-1,438,1,16,0,438,1,16,1,438,1,16,2,438,1,16,3,438,1,16,4,438,1,16,5,438,1,16,6,438,1,16,7,438,1,16,8,438,1,16,9,510,1,16,10,511,1,17,-10,511,1,17,-9,511,1,17,-8,511,1,17,-7,511,1,17,-6,511,1,17,-5,511,1,17,-4,511,1,17,-3,511,1,17,-2,511,1,17,-1,511,1,17,0,511,1,17,1,511,1,17,2,511,1,17,3,511,1,17,4,511,1,17,5,511,1,17,6,511,1,17,7,511,1,17,8,511,1,17,9,511,1,17,10,511,1],"CustomFloor1":[-1,-4,2,2,8,-1,-5,2,2,6,0,-4,2,2,8,0,-5,2,2,6,1,-4,2,2,8,1,-5,2,2,6,2,-4,2,5,8,2,-5,2,2,6,2,-3,2,1,7,2,-2,2,5,9,3,-2,2,4,8,3,-3,2,2,7,3,-4,2,4,9,3,-5,2,3,6,4,-3,2,4,9,4,-4,2,3,6,5,-2,2,2,8,5,-3,2,2,6,6,-2,2,2,8,6,-3,2,2,6,4,-2,2,2,8,7,-2,2,2,8,7,-3,2,2,6,8,-2,2,2,8,8,-3,2,2,6,9,-2,2,3,8,9,-3,2,3,6,-2,-4,2,2,8,-2,-5,2,2,6,-3,-4,2,2,8,-3,-5,2,2,6,-4,-4,2,1,8,-4,-5,2,1,6,2,-1,2,5,8,1,-1,2,2,8,1,-2,2,2,6,0,-1,2,4,8,0,-2,2,2,6,-1,-1,2,5,9,-1,-2,2,1,6,3,-1,2,3,7,-1,0,2,2,8,-2,0,2,2,8,-2,-1,2,2,6,-3,0,2,1,8,-3,-1,2,1,6,0,0,2,3,8,2,0,2,1,7,3,2,2,1,8,4,2,2,2,8,4,1,2,4,9,5,2,2,5,8,5,1,2,2,6,5,3,2,1,8,6,3,2,2,8,6,2,2,4,9,7,3,2,2,8,7,2,2,2,6,8,3,2,5,8,8,2,2,2,6,9,4,2,2,8,9,3,2,4,9,10,4,2,3,8,10,3,2,3,6,8,4,2,1,8,9,2,2,3,6,6,1,2,3,6,2,1,2,1,8,3,1,2,5,8,3,0,2,4,9,4,0,2,3,6],"CustomFloor2":[],"CustomFloor3":[],"CustomMiddle1":[],"CustomMiddle2":[],"CustomTop":[]} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/data/TerrainData.cs b/DungeonShooting_Godot/src/game/data/TerrainData.cs new file mode 100644 index 0000000..0e9829e --- /dev/null +++ b/DungeonShooting_Godot/src/game/data/TerrainData.cs @@ -0,0 +1,24 @@ + + +public class TerrainData +{ + /// + /// TileSetTerrainInfo 的 index + /// + public int TerrainIndex; + /// + /// Terrain 数据 + /// + public TileSetTerrainInfo TerrainInfo; + /// + /// 对应在 Godot.TileSet 中的 TerrainSet Index + /// + public int TerrainSetIndex; + + public TerrainData(int terrainIndex, TileSetTerrainInfo terrainInfo, int terrainSetIndex) + { + TerrainIndex = terrainIndex; + TerrainInfo = terrainInfo; + TerrainSetIndex = terrainSetIndex; + } +} \ No newline at end of file diff --git a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs index 27364a0..fcc92f2 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditor/tileView/EditorTileMap.cs @@ -156,6 +156,11 @@ public System.Collections.Generic.Dictionary CurrBrush { get; } = new System.Collections.Generic.Dictionary(); /// + /// 当前地形 + /// + public TerrainData CurrTerrain { get; private set; } + + /// /// 当前笔刷使用的纹理 /// public Texture2D CurrBrushTexture { get; private set; } @@ -382,6 +387,10 @@ } } } + else if (CurrBrushType == TileMapDrawMode.Terrain) //绘制地形 + { + DrawCellOutline(canvasItem); + } } } } @@ -560,6 +569,15 @@ RunCheckHandler(); } } + + /// + /// 设置当前地形 + /// + public void SetCurrTerrain(TerrainData terrainData) + { + CurrBrushType = TileMapDrawMode.Terrain; + CurrTerrain = terrainData; + } //执行检测地形操作 private void RunCheckHandler() @@ -837,6 +855,28 @@ EventManager.EmitEvent(EventEnum.OnTileMapDirty); } } + else if (CurrBrushType == TileMapDrawMode.Terrain) //绘制地形 + { + if (!CurrTerrain.TerrainInfo.Ready) //存在错误就不绘制了 + { + return; + } + if (CurrTerrain.TerrainInfo.TerrainType == 0) //3x3地形 + { + + } + else if (CurrTerrain.TerrainInfo.TerrainType == 1) //2x2地形 + { + //这里需要判断周围8格是否是同terrainSet + + var arr = new Array() + { + position, + }; + //绘制自动图块 + SetCellsTerrainConnect(CurrLayer.Layer, arr, CurrTerrain.TerrainSetIndex, 0, false); + } + } } } diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/TerrainCell.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/TerrainCell.cs index 492a69b..2a62a4e 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/TerrainCell.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/TerrainCell.cs @@ -4,15 +4,10 @@ namespace UI.MapEditorMapTile; /// -/// 地形选项, Data 为 TileSetTerrainInfo 的 index +/// 地形选项 /// -public class TerrainCell : UiCell +public class TerrainCell : UiCell { - /// - /// 选中的地形配置数据 - /// - public TileSetTerrainInfo TileSetTerrainInfo; - private Image _image; private ImageTexture _texture; @@ -24,12 +19,10 @@ CellNode.L_ErrorIcon.Instance.Visible = false; } - public override void OnSetData(int data) + public override void OnSetData(TerrainData data) { - TileSetTerrainInfo = CellNode.UiPanel.TileSetSourceInfo.Terrain[data]; - //是否可以使用 - if (!TileSetTerrainInfo.Ready) + if (!data.TerrainInfo.Ready) { CellNode.L_ErrorIcon.Instance.Visible = true; CellNode.Instance.TooltipText = "该地形Bit配置未完成,请在TileSet编辑器中配置!"; @@ -51,9 +44,9 @@ 3 * GameConfig.TileCellSize, false, Image.Format.Rgba8 ); - if (TileSetTerrainInfo.TerrainType == 0) //3x3 + if (data.TerrainInfo.TerrainType == 0) //3x3 { - CellNode.L_TerrainName.Instance.Text = TileSetTerrainInfo.Name + "\n3x3"; + CellNode.L_TerrainName.Instance.Text = data.TerrainInfo.Name + "\n3x3"; var src = CellNode.UiPanel.TileSetSourceInfo.GetSourceImage(); SetImageSrc(src, Center | Right | Bottom | RightBottom, new Vector2I(0, 0)); @@ -70,7 +63,7 @@ } else //2x2 { - CellNode.L_TerrainName.Instance.Text = TileSetTerrainInfo.Name + "\n2x2"; + CellNode.L_TerrainName.Instance.Text = data.TerrainInfo.Name + "\n2x2"; var src = CellNode.UiPanel.TileSetSourceInfo.GetSourceImage(); SetImageSrc(src, Center | RightBottom, new Vector2I(0, 0)); @@ -91,9 +84,9 @@ private void SetImageSrc(Image src, uint bit, Vector2I dst) { - if (TileSetTerrainInfo.T.TryGetValue(bit, out var temp)) + if (Data.TerrainInfo.T.TryGetValue(bit, out var temp)) { - var pos = TileSetTerrainInfo.GetPosition(temp); + var pos = Data.TerrainInfo.GetPosition(temp); _image.BlitRect(src, new Rect2I(pos * GameConfig.TileCellSize, GameConfig.TileCellSizeVector2I), dst); } } @@ -116,6 +109,7 @@ public override void OnSelect() { CellNode.L_Select.Instance.Visible = true; + CellNode.UiPanel.EditorTileMap.SetCurrTerrain(Data); } public override void OnUnSelect() diff --git a/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/TerrainTileTab.cs b/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/TerrainTileTab.cs index 1bad5af..f9fca08 100644 --- a/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/TerrainTileTab.cs +++ b/DungeonShooting_Godot/src/game/ui/mapEditorMapTile/TerrainTileTab.cs @@ -9,12 +9,12 @@ { private MapEditorMapTile.Tab2 _uiNode; - private UiGrid _uiGrid; + private UiGrid _uiGrid; public void SetUiNode(IUiNode uiNode) { _uiNode = (MapEditorMapTile.Tab2)uiNode; - _uiGrid = _uiNode.UiPanel.CreateUiGrid(_uiNode.L_ScrollContainer.L_TerrainItem); + _uiGrid = _uiNode.UiPanel.CreateUiGrid(_uiNode.L_ScrollContainer.L_TerrainItem); _uiGrid.SetColumns(1); _uiGrid.SetCellOffset(new Vector2I(0, 8)); _uiGrid.SetHorizontalExpand(true); @@ -28,10 +28,19 @@ public void RefreshTerrain(TileSetSourceInfo sourceInfo) { _uiGrid.RemoveAll(); - var start = _uiNode.UiPanel.SourceIndex == 0 ? 1 : 0; //跳过 Main Source 中的 Main Terrain + + var startSetIndex = 0; + var panel = _uiNode.UiPanel; + for (var i = 0; i < panel.SourceIndex; i++) + { + var source = panel.TileSetSplit.TileSetInfo.Sources[i]; + startSetIndex += source.Terrain.Count; + } + + var start = panel.SourceIndex == 0 ? 1 : 0; //跳过 Main Source 中的 Main Terrain for (var i = start; i < sourceInfo.Terrain.Count; i++) { - _uiGrid.Add(i); + _uiGrid.Add(new TerrainData(i, sourceInfo.Terrain[i], startSetIndex + i)); } } } \ No newline at end of file