|
|
@ -25,19 +25,16 @@ namespace SemiColinGames { |
|
|
|
public Camera Camera { get; } |
|
|
|
|
|
|
|
// Size of World in pixels.
|
|
|
|
public int Width { |
|
|
|
get { return gridWidth * TileSize; } |
|
|
|
} |
|
|
|
|
|
|
|
public int Height { |
|
|
|
get { return gridHeight * TileSize; } |
|
|
|
} |
|
|
|
public readonly int Width; |
|
|
|
public readonly int Height; |
|
|
|
|
|
|
|
public World(GraphicsDevice graphics, string json) { |
|
|
|
Camera = new Camera(); |
|
|
|
LinesOfSight = new LinesOfSight(graphics); |
|
|
|
|
|
|
|
JObject root = JObject.Parse(json); |
|
|
|
Width = root.SelectToken("width").Value<int>(); |
|
|
|
Height = root.SelectToken("height").Value<int>(); |
|
|
|
|
|
|
|
List<Tile> hazardTiles = new List<Tile>(); |
|
|
|
List<Tile> obstacleTiles = new List<Tile>(); |
|
|
|