diff --git a/src/tilemap_foreground.cs b/src/tilemap_foreground.cs index c762468..b26916e 100644 --- a/src/tilemap_foreground.cs +++ b/src/tilemap_foreground.cs @@ -1,10 +1,9 @@ using Godot; using System; +using System.Linq; public class tilemap_foreground : TileMap { - [Export] - bool ReplaceStaticTilesWithNodes = true; public override void _Process(float delta) { @@ -12,18 +11,15 @@ public class tilemap_foreground : TileMap public override void _Ready() { - if (ReplaceStaticTilesWithNodes) - { - ReplaceStaticTiles(1); - } + 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]); - // } + Vector2[] allCells = GetUsedCellsById(CellID).OfType().ToArray(); + for(int i = 0; i < allCells.Length; i++) + { + GD.Print(allCells[i]); + } } }