readded tilemap allCells[] wich got missing
This commit is contained in:
@@ -1,29 +1,25 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
public class tilemap_foreground : TileMap
|
||||
{
|
||||
[Export]
|
||||
bool ReplaceStaticTilesWithNodes = true;
|
||||
public override void _Process(float delta)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
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]);
|
||||
// }
|
||||
Vector2[] allCells = GetUsedCellsById(CellID).OfType<Vector2>().ToArray();
|
||||
for(int i = 0; i < allCells.Length; i++)
|
||||
{
|
||||
GD.Print(allCells[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user