Method: MiniGL::Map#get_absolute_size
- Defined in:
- lib/minigl/map.rb
#get_absolute_size ⇒ Object
Returns a Vector with the total size of the map, in pixels (x for the width and y for the height).
59 60 61 62 63 |
# File 'lib/minigl/map.rb', line 59 def get_absolute_size return Vector.new(@tile_size.x * @size.x, @tile_size.y * @size.y) unless @isometric avg = (@size.x + @size.y) * 0.5 Vector.new (avg * @tile_size.x).to_i, (avg * @tile_size.y).to_i end |