private static void PrintCarpet(MapGenerator generator, Tile tile, GeneratorCell cell) { tile.Replace(new FloorCarpet() { Connectivity = cell.Connectivity }); }
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()); } }
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); } }
private static void PrintFloorPlank(MapGenerator generator, Tile tile, GeneratorCell cell) { tile.Replace(new FloorPlank()); }
private static void PrintWallBrick(MapGenerator generator, Tile tile, GeneratorCell cell) { tile.Replace(new WallBrick()); }
public void AddConnection(GeneratorCell cell) { Connections.Add(cell); }
public RoomGroup(GeneratorCell origin) { Origin = origin; }
protected CollapseTile(GeneratorCell origin) { Origin = origin; }
private static void PrintObsidiorite(MapGenerator generator, Tile tile, GeneratorCell cell) { tile.Replace(new WallObsidiorite()); }
private static void PrintBog(MapGenerator generator, Tile tile, GeneratorCell cell) { tile.Replace(new Bog()); }
private static void PrintDarkLava(MapGenerator generator, Tile tile, GeneratorCell cell) { tile.Replace(new DarkLava()); }
private static void PrintWaterShallow(MapGenerator generator, Tile tile, GeneratorCell cell) { tile.Replace(new WaterShallow()); }
private static void PrintCoral(MapGenerator generator, Tile tile, GeneratorCell cell) { tile.Replace(new FloorCave()); tile.PlaceOn(new Coral()); }
private static void PrintBridge(MapGenerator generator, Tile tile, GeneratorCell cell) { tile.Replace(new FloorBridge()); }