public Map(int w, int h) { Width = w; Height = h; Entities = new List<Entity>(); Tiles = new Tile[Width * Height]; TilesToUpdate = new List<Tile>(); InitializeMap(); }
public void InitializeMap() { for (int y = 0; y < Height; y++) { for (int x = 0; x < Width; x++) { Tiles[x + y * Width] = new Tile() { Color = Color.Black * Util.NextFloat() }; } } GetTile(0, 0).Color = Color.Red; }