Method: Core::Layer#initialize

Defined in:
lib/layer.rb

#initialize(w, h, props, tiles, tileset = nil) ⇒ Layer

Returns a new instance of Layer.



6
7
8
9
10
11
12
13
14
# File 'lib/layer.rb', line 6

def initialize(w, h, props, tiles, tileset=nil)
  @properties = props
  @z = Core::MAP_Z
  @z += props[:z].to_i if props[:z]
  create_tilemap(w, h, tiles)
  if tileset
    fill_tilemap(tileset)
  end
end