Functions | |
MAP | map.new (IMAGE tileset, TABLE mapData, NUMBER TileX, NUMBER TileY) |
Cretes a map. More... | |
NIL | map.blit (MAP map, NUMBER x, NUMBER y) |
Blits a map. More... | |
NUMBER | map.sizex (MAP map) |
It returns a map width. More... | |
NUMBER | map.sizey (MAP map) |
It returns a map height. More... | |
NIL | map.set (MAP map, NUMBER tilex, NUMBER tiley, NUMBER value) |
Sets the desired tile in a specific position. More... | |
Uso de mapas.
MAP map.new | ( | IMAGE | tileset, |
TABLE | mapData, | ||
NUMBER | TileX, | ||
NUMBER | TileY | ||
) |
Cretes a map.
tileset | Path to a previously loaded tileset (png or jpg, max size = 512x512 pixels). |
mapData | Array containing map data. |
TileX | Tile width in pixels. |
TileY | Tile height in pixels. |
NIL map.blit | ( | MAP | map, |
NUMBER | x, | ||
NUMBER | y | ||
) |
Blits a map.
map | "map" type object. |
x | Horizontal map position. |
y | Vertical map position. |
NUMBER map.sizex | ( | MAP | map | ) |
It returns a map width.
map | A map type object. |
NUMBER map.sizey | ( | MAP | map | ) |
It returns a map height.
map | A map type object. |
NIL map.set | ( | MAP | map, |
NUMBER | tilex, | ||
NUMBER | tiley, | ||
NUMBER | value | ||
) |
Sets the desired tile in a specific position.
map | A map type object. |
tilex | Position of the tile x. |
tiley | Position of the tile y. |
value | number to be drawn at that position. |