Esempio n. 1
0
        public override void _Ready()
        {
            var biomes = GetChildren();

            Array[] tilesTemp = new Array[biomes.Count];
            int     index     = 0;
            int     count     = 0;

            foreach (var b in biomes.OfType <Node2D>())
            {
                tilesTemp[index] = b.GetChildren();
                count           += tilesTemp[index].Count;
                index++;
            }
            tiles = new GroundTileScript[count];
            index = 0;
            foreach (var gts in tilesTemp.OfType <GroundTileScript>())
            {
                tiles[index] = gts;
            }
            size = tiles.Count();
            GD.Print(size);
        }