示例#1
0
 private static void PrintCarpet(MapGenerator generator, Tile tile, GeneratorCell cell)
 {
     tile.Replace(new FloorCarpet()
     {
         Connectivity = cell.Connectivity
     });
 }
示例#2
0
 private static void PrintWater(MapGenerator generator, Tile tile, GeneratorCell cell)
 {
     tile.Replace(new Water());
     if (generator.Random.NextDouble() < 0.3)
     {
         tile.Parent.SetUnder(new Coral());
     }
 }
示例#3
0
 public MapGenerator(int width, int height, int seed, GroupSet groupGenerator, IEnumerable <AppliedBonus> bonuses)
 {
     Random = new Random(seed);
     Cells  = new GeneratorCell[width, height];
     for (int x = 0; x < width; x++)
     {
         for (int y = 0; y < height; y++)
         {
             Cells[x, y]        = new GeneratorCell(this, x, y, GeneratorTile.Empty);
             Cells[x, y].Weight = Random.NextDouble();
         }
     }
     GroupGenerator = groupGenerator;
     Bonuses.AddRange(bonuses);
     foreach (var bonus in Bonuses)
     {
         bonus.Bonus.Apply(this);
     }
 }
示例#4
0
 private static void PrintFloorPlank(MapGenerator generator, Tile tile, GeneratorCell cell)
 {
     tile.Replace(new FloorPlank());
 }
示例#5
0
 private static void PrintWallBrick(MapGenerator generator, Tile tile, GeneratorCell cell)
 {
     tile.Replace(new WallBrick());
 }
示例#6
0
 public void AddConnection(GeneratorCell cell)
 {
     Connections.Add(cell);
 }
示例#7
0
 public RoomGroup(GeneratorCell origin)
 {
     Origin = origin;
 }
示例#8
0
 protected CollapseTile(GeneratorCell origin)
 {
     Origin = origin;
 }
示例#9
0
 private static void PrintObsidiorite(MapGenerator generator, Tile tile, GeneratorCell cell)
 {
     tile.Replace(new WallObsidiorite());
 }
示例#10
0
 private static void PrintBog(MapGenerator generator, Tile tile, GeneratorCell cell)
 {
     tile.Replace(new Bog());
 }
示例#11
0
 private static void PrintDarkLava(MapGenerator generator, Tile tile, GeneratorCell cell)
 {
     tile.Replace(new DarkLava());
 }
示例#12
0
 private static void PrintWaterShallow(MapGenerator generator, Tile tile, GeneratorCell cell)
 {
     tile.Replace(new WaterShallow());
 }
示例#13
0
 private static void PrintCoral(MapGenerator generator, Tile tile, GeneratorCell cell)
 {
     tile.Replace(new FloorCave());
     tile.PlaceOn(new Coral());
 }
示例#14
0
 private static void PrintBridge(MapGenerator generator, Tile tile, GeneratorCell cell)
 {
     tile.Replace(new FloorBridge());
 }