WorldView: make rendering of hex tile borders optional.

WorldChunkRefactoring
Martin Felis 2023-10-27 22:58:37 +02:00
parent c808739b78
commit aaa286bf77
1 changed files with 11 additions and 0 deletions

View File

@ -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);
}