Class: Beefdump::Map::Tileset

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dimensionsObject (readonly)

Returns the value of attribute dimensions.



4
5
6
# File 'lib/beefdump/map/tileset.rb', line 4

def dimensions
  @dimensions
end

#first_gidObject (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_fileObject (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_colorObject (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

#mapObject (readonly)

Returns the value of attribute map.



4
5
6
# File 'lib/beefdump/map/tileset.rb', line 4

def map
  @map
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/beefdump/map/tileset.rb', line 4

def name
  @name
end

#tile_heightObject (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_widthObject (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_countObject (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