public Chunk GenerateChunk(long seed) { Chunk c = new Chunk(); Random r = new Random((int)seed); for (int x = 0; x < 4; x++) { for (int y = 0; y < 4; y++) { c[x, y] = new DungeonTile(TileDatabase[r.Next(TileDatabase.Count)]); } } return c; }
public Chunk GenerateChunk(long seed) { Chunk c = new Chunk(); Random r = new Random((int)seed); int templateIdx = r.Next(TEMPLATE_DB.GetLength(0)); for (int x = 0; x < 4; x++) { for (int y = 0; y < 4; y++) { c[x, y] = new DungeonTile(GetTileWithType(TEMPLATE_DB[templateIdx, x, y], r)); } } return c; }
public DungeonTile(DungeonTile copy) : base(copy) { this._extent = copy._extent; this._type = copy._type; }