Class: Beefdump::Map::Tileset
- Inherits:
-
Object
- Object
- Beefdump::Map::Tileset
- Defined in:
- lib/beefdump/map/tileset.rb
Instance Attribute Summary collapse
-
#dimensions ⇒ Object
readonly
Returns the value of attribute dimensions.
-
#first_gid ⇒ Object
readonly
Returns the value of attribute first_gid.
-
#image_file ⇒ Object
readonly
Returns the value of attribute image_file.
-
#image_transparency_color ⇒ Object
readonly
Returns the value of attribute image_transparency_color.
-
#map ⇒ Object
readonly
Returns the value of attribute map.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#tile_height ⇒ Object
readonly
Returns the value of attribute tile_height.
-
#tile_width ⇒ Object
readonly
Returns the value of attribute tile_width.
-
#tiles_count ⇒ Object
readonly
Returns the value of attribute tiles_count.
Instance Method Summary collapse
-
#initialize(tileset_data, map) ⇒ Tileset
constructor
A new instance of Tileset.
Constructor Details
#initialize(tileset_data, map) ⇒ Tileset
Returns a new instance of Tileset.
6 7 8 9 10 11 |
# File 'lib/beefdump/map/tileset.rb', line 6 def initialize(tileset_data, map) @map = map load_tileset_attributes!(tileset_data) load_image!(tileset_data["image"].first) end |
Instance Attribute Details
#dimensions ⇒ Object (readonly)
Returns the value of attribute dimensions.
4 5 6 |
# File 'lib/beefdump/map/tileset.rb', line 4 def dimensions @dimensions end |
#first_gid ⇒ Object (readonly)
Returns the value of attribute first_gid.
4 5 6 |
# File 'lib/beefdump/map/tileset.rb', line 4 def first_gid @first_gid end |
#image_file ⇒ Object (readonly)
Returns the value of attribute image_file.
4 5 6 |
# File 'lib/beefdump/map/tileset.rb', line 4 def image_file @image_file end |
#image_transparency_color ⇒ Object (readonly)
Returns the value of attribute image_transparency_color.
4 5 6 |
# File 'lib/beefdump/map/tileset.rb', line 4 def image_transparency_color @image_transparency_color end |
#map ⇒ Object (readonly)
Returns the value of attribute map.
4 5 6 |
# File 'lib/beefdump/map/tileset.rb', line 4 def map @map end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/beefdump/map/tileset.rb', line 4 def name @name end |
#tile_height ⇒ Object (readonly)
Returns the value of attribute tile_height.
4 5 6 |
# File 'lib/beefdump/map/tileset.rb', line 4 def tile_height @tile_height end |
#tile_width ⇒ Object (readonly)
Returns the value of attribute tile_width.
4 5 6 |
# File 'lib/beefdump/map/tileset.rb', line 4 def tile_width @tile_width end |
#tiles_count ⇒ Object (readonly)
Returns the value of attribute tiles_count.
4 5 6 |
# File 'lib/beefdump/map/tileset.rb', line 4 def tiles_count @tiles_count end |