public static bool IsTerrain(int x, int y, Constants.Terrain type) { if (x < 0 || y < 0 && x >= Constants.MapWidth || y >= Constants.MapHeight) { return(true); } return(Rogue.GameWorld.Map.Tiles[x, y].Terrain == type); }
private static void SetTerrain(Constants.Terrain wall, Constants.Terrain floor) { for (int x = 0; x < Constants.MapWidth - 1; x++) { for (int y = 0; y < Constants.MapHeight - 1; y++) { if (Rogue.GameWorld.Map.Tiles[x, y].Blocked && Rogue.GameWorld.Map.Tiles[x, y].BlocksSight) { Rogue.GameWorld.Map.Tiles[x, y].Terrain = wall; } else { Rogue.GameWorld.Map.Tiles[x, y].Terrain = floor; } } } }