Module flower.MapImage

Class that loads a tiled map of images (see MOAIGrid).

Extends:

See:

Info:

  • Release: V3.0.0
  • Author: Makoto

Functions

MapImage:init (texture, gridWidth, gridHeight, tileWidth, tileHeight, spacing, margin) Constructor.
MapImage:setMapSize (gridWidth, gridHeight, tileWidth, tileHeight, spacing, margin) Sets the size of the map grid.
MapImage:setRows (rows) Sets the map data by rows.
MapImage:setRow (...) Sets the map row data.
MapImage:setTile (x, y, value) Sets the map value.
MapImage:getTile (x, y) Returns the map value.
MapImage:setRepeat (repeatX, repeatY) Sets the repeat flag.


Functions

MapImage:init (texture, gridWidth, gridHeight, tileWidth, tileHeight, spacing, margin)
Constructor.

Parameters:

  • texture Texture path, or texture
  • gridWidth (option) The size of the grid
  • gridHeight (option) The size of the grid
  • tileWidth (option) The size of the tile
  • tileHeight (option) The size of the tile
  • spacing (option) The spacing of the tile
  • margin (option) The margin of the tile
MapImage:setMapSize (gridWidth, gridHeight, tileWidth, tileHeight, spacing, margin)
Sets the size of the map grid.

Parameters:

  • gridWidth The size of the grid
  • gridHeight The size of the grid
  • tileWidth The size of the tile
  • tileHeight The size of the tile
  • spacing (option) The spacing of the tile
  • margin (option) The margin of the tile
MapImage:setRows (rows)
Sets the map data by rows.

Parameters:

  • rows Multiple rows of data.
MapImage:setRow (...)
Sets the map row data.

Parameters:

  • ... rows of data.
MapImage:setTile (x, y, value)
Sets the map value.

Parameters:

  • x x position of the grid
  • y y position of the grid
  • value tile value.
MapImage:getTile (x, y)
Returns the map value.

Parameters:

  • x x position of the grid
  • y y position of the grid

Returns:

    tile value.
MapImage:setRepeat (repeatX, repeatY)
Sets the repeat flag.

Parameters:

  • repeatX
  • repeatY
generated by LDoc 1.3