Entities are now definable

This commit is contained in:
2019-10-11 20:01:35 -05:00
parent 44e9dcf7d7
commit 9ab515dce2
8 changed files with 129 additions and 11 deletions

View File

@@ -2,6 +2,7 @@ class IMICRTS
class Map
Tile = Struct.new(:position, :color, :image, :state, :type)
attr_reader :tiles, :ores
def initialize(map_file:)
@tiled_map = TiledMap.new(map_file)
@@ -19,6 +20,9 @@ class IMICRTS
end
end
end
@tiles.freeze
@ores.freeze
end
def add_terrain(x, y, tile_id)