Class: Metro::UI::TileLayer
- Defined in:
- lib/metro/models/ui/tmx/tile_layer.rb
Constant Summary
Constants included from Metro::Units
Instance Attribute Summary collapse
-
#layer ⇒ Object
Returns the value of attribute layer.
-
#map ⇒ Object
Returns the value of attribute map.
-
#tilesets ⇒ Object
Returns the value of attribute tilesets.
-
#viewport ⇒ Object
Returns the value of attribute viewport.
Attributes inherited from Model
Instance Method Summary collapse
Methods inherited from Model
#_load, #_save, #after_initialize, #bounds, #create, #draw_completed?, hierarchy, inherited, #initialize, metro_name, #model, model_name, models, #name, #notification, #saveable_to_view, #show, #to_hash, #update, #update_completed?
Methods included from HasEvents
Methods included from KeyValueCoding
Methods included from PropertyOwner
Constructor Details
This class inherits a constructor from Metro::Model
Instance Attribute Details
#layer ⇒ Object
Returns the value of attribute layer.
7 8 9 |
# File 'lib/metro/models/ui/tmx/tile_layer.rb', line 7 def layer @layer end |
#map ⇒ Object
Returns the value of attribute map.
6 7 8 |
# File 'lib/metro/models/ui/tmx/tile_layer.rb', line 6 def map @map end |
#tilesets ⇒ Object
Returns the value of attribute tilesets.
8 9 10 |
# File 'lib/metro/models/ui/tmx/tile_layer.rb', line 8 def tilesets @tilesets end |
#viewport ⇒ Object
Returns the value of attribute viewport.
9 10 11 |
# File 'lib/metro/models/ui/tmx/tile_layer.rb', line 9 def @viewport end |
Instance Method Details
#data ⇒ Object
11 12 13 |
# File 'lib/metro/models/ui/tmx/tile_layer.rb', line 11 def data layer.data end |
#draw ⇒ Object
27 28 29 30 31 |
# File 'lib/metro/models/ui/tmx/tile_layer.rb', line 27 def draw .each do |bounds,image| image.draw_rot(bounds.left - x,bounds.top - y,z_order,rotation) end end |
#x ⇒ Object
15 16 17 |
# File 'lib/metro/models/ui/tmx/tile_layer.rb', line 15 def x .left end |
#y ⇒ Object
19 20 21 |
# File 'lib/metro/models/ui/tmx/tile_layer.rb', line 19 def y .top end |
#z_order ⇒ Object
23 24 25 |
# File 'lib/metro/models/ui/tmx/tile_layer.rb', line 23 def z_order -1 end |