From a81ccc71820db71087d84a06e03c00e2447f738b Mon Sep 17 00:00:00 2001 From: vaporvee Date: Mon, 14 Nov 2022 22:25:42 +0100 Subject: [PATCH] godot needs a special array :( --- src/TilemapForeground.cs | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/TilemapForeground.cs b/src/TilemapForeground.cs index fbe1caa..7ca32a8 100644 --- a/src/TilemapForeground.cs +++ b/src/TilemapForeground.cs @@ -7,13 +7,23 @@ public class TilemapForeground : TileMap bool ReplaceStaticTilesWithNodes = true; public override void _Process(float delta) { - if(ReplaceStaticTilesWithNodes){ - ReplaceStaticTiles(); - } + } - public void ReplaceStaticTiles() + public override void _Ready() { + if (ReplaceStaticTilesWithNodes) + { + ReplaceStaticTiles(1); + } + } + public void ReplaceStaticTiles(int CellID) + { + //Vector2[] AllCells = GetUsedCellsById(CellID); //why isnt it just a normal array wtf + // for(int i = 0; i == AllCells.Length; i++) + // { + // GD.Print(AllCells[i]); + // } } }