readded tilemap allCells[] wich got missing

This commit is contained in:
2022-11-15 18:25:54 +01:00
parent f00b24274d
commit 9138545028

View File

@@ -1,29 +1,25 @@
using Godot; using Godot;
using System; using System;
using System.Linq;
public class tilemap_foreground : TileMap public class tilemap_foreground : TileMap
{ {
[Export]
bool ReplaceStaticTilesWithNodes = true;
public override void _Process(float delta) public override void _Process(float delta)
{ {
} }
public override void _Ready() public override void _Ready()
{
if (ReplaceStaticTilesWithNodes)
{ {
ReplaceStaticTiles(1); ReplaceStaticTiles(1);
} }
}
public void ReplaceStaticTiles(int CellID) public void ReplaceStaticTiles(int CellID)
{ {
//Vector2[] AllCells = GetUsedCellsById(CellID); //why isnt it just a normal array wtf Vector2[] allCells = GetUsedCellsById(CellID).OfType<Vector2>().ToArray();
// for(int i = 0; i == AllCells.Length; i++) for(int i = 0; i < allCells.Length; i++)
// { {
// GD.Print(AllCells[i]); GD.Print(allCells[i]);
// } }
} }
} }