Esempio n. 1
0
        public override void _Ready()
        {
            sectors = new List <SectorScript>();
            biomes  = GetParent().GetChildren().OfType <Biomes>().FirstOrDefault();
            GD.Print(biomes.size);
            leftMostSector  = new SectorScript(null, null, SectorSize, biomes);
            rightMostSector = leftMostSector;
            GD.Print(leftMostSector.Size);
            sectors.Add(leftMostSector);
            AddSectorLeft();
            AddSectorRight();
            GD.Print("sectors : " + sectors.Count);
            var sector = leftMostSector;

            while (sector.RightSector != null)
            {
                GD.Print(sector.ToString());
                sector = sector.RightSector;
            }
            GD.Print(sector.ToString());
        }
Esempio n. 2
0
 public SectorScript(SectorScript leftSector, SectorScript rightSector, int size, Biomes biomes)
 {
     Size        = size;
     LeftSector  = leftSector;
     RightSector = rightSector;
     Biomes      = biomes;
     groundTiles = new GroundTileScript[Size];
     GenerateSector();
 }