Class: Beefdump::Map::Layer

Inherits:
Object
  • Object
show all
Defined in:
lib/beefdump/map/layer.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(layer_data, map) ⇒ Layer

Returns a new instance of Layer.



9
10
11
12
13
14
15
# File 'lib/beefdump/map/layer.rb', line 9

def initialize(layer_data, map)
  @map = map

  load_layer_attributes!(layer_data)

  load_data!(layer_data["data"].first)
end

Instance Attribute Details

#fieldObject (readonly)

Returns the value of attribute field.



7
8
9
# File 'lib/beefdump/map/layer.rb', line 7

def field
  @field
end

#heightObject (readonly)

Returns the value of attribute height.



7
8
9
# File 'lib/beefdump/map/layer.rb', line 7

def height
  @height
end

#mapObject (readonly)

Returns the value of attribute map.



7
8
9
# File 'lib/beefdump/map/layer.rb', line 7

def map
  @map
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/beefdump/map/layer.rb', line 7

def name
  @name
end

#widthObject (readonly)

Returns the value of attribute width.



7
8
9
# File 'lib/beefdump/map/layer.rb', line 7

def width
  @width
end