Class: Tmxed::TileSet
- Inherits:
-
Object
- Object
- Tmxed::TileSet
- Defined in:
- lib/tmxed_ext/tile_set.rb
Instance Attribute Summary collapse
-
#window ⇒ Object
Returns the value of attribute window.
Instance Method Summary collapse
- #crop_bounds ⇒ Object
- #full_height ⇒ Object
- #full_width ⇒ Object
- #image_path ⇒ Object
- #images ⇒ Object
Instance Attribute Details
#window ⇒ Object
Returns the value of attribute window.
3 4 5 |
# File 'lib/tmxed_ext/tile_set.rb', line 3 def window @window end |
Instance Method Details
#crop_bounds ⇒ Object
13 14 15 |
# File 'lib/tmxed_ext/tile_set.rb', line 13 def crop_bounds [ margin, margin, tilewidth - spacing, tileheight - spacing ] end |
#full_height ⇒ Object
9 10 11 |
# File 'lib/tmxed_ext/tile_set.rb', line 9 def full_height tileheight + spacing end |
#full_width ⇒ Object
5 6 7 |
# File 'lib/tmxed_ext/tile_set.rb', line 5 def full_width tilewidth + spacing end |
#image_path ⇒ Object
17 18 19 |
# File 'lib/tmxed_ext/tile_set.rb', line 17 def image_path Metro::AssetPath.with(image).filepath end |
#images ⇒ Object
21 22 23 24 25 26 |
# File 'lib/tmxed_ext/tile_set.rb', line 21 def images @images ||= begin original_images = Gosu::Image.load_tiles window, image_path, full_width,full_height, true crop_images original_images end end |