File hp/display/MapSprite.lua

Functions

M:copyParams (params) Set the parameter setter function.
M:init (params) The constructor.
M:setMapSheets (tileWidth, tileHeight, tileX, tileY, spacing, margin) Sets the data to generate a sheet of tile form.
M:setMapSize (mapWidth, mapHeight, tileWidth, tileHeight) Set the map size.
M:setRow (...) Set the map data.
M:setRows (rows) Set the map data.
M:setSheets (sheets) Sets the data sheet.

Tables

MapSprite This class draws the grid.


Functions

M:copyParams (params)
Set the parameter setter function.

Parameters

  • params: Parameter is set to Object.
M:init (params)
The constructor.

Parameters

  • params: (option)Parameter is set to Object.
M:setMapSheets (tileWidth, tileHeight, tileX, tileY, spacing, margin)
Sets the data to generate a sheet of tile form.

Parameters

  • tileWidth: Width of the tile.
  • tileHeight: Height of the tile.
  • tileX: number of tiles in the x-direction.
  • tileY: number of tiles in the y-direction.
  • spacing: (option)Space size of each tile.
  • margin: (option)Margin of tile.
M:setMapSize (mapWidth, mapHeight, tileWidth, tileHeight)
Set the map size.

Parameters

  • mapWidth: Height of the map.
  • mapHeight: Height of the map.
  • tileWidth: Width of the tile.
  • tileHeight: Height of the tile.
M:setRow (...)
Set the map data.

Parameters

  • ...:
M:setRows (rows)
Set the map data.

Parameters

  • rows:
M:setSheets (sheets)
Sets the data sheet.

Parameters

  • sheets: Data sheet.

Tables

MapSprite
This class draws the grid.
Without the use of MOAITileDeck, use the MOAIGfxQuadDeck2D.
Corresponding to the format can be flexibility.

Valid XHTML 1.0!