public MapRef(Position size) { this.size = size; tiles = new TileRef[size.x * size.y]; for (var i = 0; i < tiles.Length; i++) { tiles[i] = new TileRef { ter = Map.Terrain.UNKNOWN }; } }
public void set(Position pos, TileRef tile) { tiles[pos.y * size.x + pos.x] = tile; }