From aaa286bf77ce26e769036529824914fb48e0da72 Mon Sep 17 00:00:00 2001 From: Martin Felis Date: Fri, 27 Oct 2023 22:58:37 +0200 Subject: [PATCH] WorldView: make rendering of hex tile borders optional. --- scenes/WorldView.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scenes/WorldView.cs b/scenes/WorldView.cs index 4902b03..bf40a33 100644 --- a/scenes/WorldView.cs +++ b/scenes/WorldView.cs @@ -13,6 +13,7 @@ public class WorldView : Spatial // exports [Export] public NodePath World; [Export] public Vector2 ViewCenterPlaneCoord; + [Export] public bool ShowHexTiles = false; // signals [Signal] @@ -147,6 +148,16 @@ public class WorldView : Spatial } sceneTileChunk.ChunkIndex = chunkIndex; + + if (ShowHexTiles) + { + foreach (HexTile3D tile3D in sceneTileChunk.TileNodes) + { + tile3D.Transform = new Transform(Basis.Identity.Scaled(Vector3.One * 0.95f), + tile3D.Transform.origin); + } + } + _sceneTileChunks.Add(sceneTileChunk); }