public MapGenerator(Point offset, int width, int height, ITexturePack texturePack) { this.Height = height; this.Width = width; this.Offset = offset; this.TexturePack = texturePack; this.Map = new Cell[width, height]; #region Corners this.Map[0, 0] = new Cell(CellType.CornerBottomRight); this.Map[width - 1, 0] = new Cell(CellType.CornerBottomLeft); this.Map[0, height - 1] = new Cell(CellType.CornerTopRight); this.Map[width - 1, height - 1] = new Cell(CellType.CornerTopLeft); #endregion #region Borders for (int i = 1; i < width - 1; i++) { this.Map[i, 0] = new Cell(CellType.WallHorizontal); this.Map[i, height - 1] = new Cell(CellType.WallHorizontal); } for (int i = 1; i < this.Height - 1; i++) { this.Map[0, i] = new Cell(CellType.WallVertical); this.Map[width - 1, i] = new Cell(CellType.WallVertical); } #endregion }
public StrategyGameTileSet(ITexturePack <TTile> textures, RenderType renderType) { Textures = textures; RenderType = renderType; Terrains = new Dictionary <string, TerrainGraphic>(); BlendLayer = 2; }
private void GenerateEnvironment(IEnvironment env, ITexturePack textures) { IEnvironmentBuilder dungeonBuilder = GetComponent <EnvironmentBuilder> (); dungeonBuilder.Generate(env, textures); }
private void GenerateEnvironment(IEnvironment env, ITexturePack textures) { IEnvironmentBuilder dungeonBuilder = GetComponent<EnvironmentBuilder> (); dungeonBuilder.Generate (env, textures); }