summaryrefslogtreecommitdiffhomepage
path: root/deprecated/components/04_map.rb
blob: 7700e9fd930151a2511dce9d403488d4e1deb467 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Components
  # dragonruby label wrapper
  class Map < Helper::BaseComponent

    attr_accessor :json_name, :json, :x, :y, :tilewidth, :tileheight, :a, :r, :g, :b

    def set(json_name: @json_name, x: @x, y: @y, tilewidth: @tilewidth,
            tileheight: @tileheight, a: @a, r: @r, g: @g, b: @b)
      { json_name: @json_name = json_name,
        json: @json = Helper.get_json_tiles(json_name),
        x: @x = x,
        y: @y = y,
        tilewidth: @tilewidth = tilewidth,
        tileheight: @tileheight = tileheight,
        r: @r = r,
        g: @g = g,
        b: @b = b,
        a: @a = a }
    end
  end
end