TileMap parser can now load spawn locations, added construction yard building, added particle emitters, added smoke sprite and svg.

This commit is contained in:
2019-11-20 12:51:24 -06:00
parent 7775ccb3a3
commit a9307733e3
10 changed files with 476 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
class IMICRTS
class Map
attr_reader :tile_size, :tiles, :ores, :width, :height
attr_reader :tile_size, :tiles, :ores, :spawnpoints, :width, :height
def initialize(map_file:)
@tiled_map = TiledMap.new(map_file)
@@ -9,6 +9,7 @@ class IMICRTS
@tiles = {}
@ores = {}
@spawnpoints = @tiled_map.spawnpoints.freeze
@tiled_map.layers.each do |layer|
layer.height.times do |y|