Code: Select all
return {
version = "1.1",
luaversion = "5.1",
tiledversion = "0.11.0",
orientation = "orthogonal",
width = 45,
height = 45,
tilewidth = 16,
tileheight = 16,
nextobjectid = 1,
properties = {},
tilesets = {
{
name = "Default",
firstgid = 1,
tilewidth = 16,
tileheight = 16,
spacing = 0,
margin = 0,
image = "../images/tileset.png",
imagewidth = 160,
imageheight = 160,
tileoffset = {
x = 0,
y = 0
},
properties = {},
terrains = {},
tiles = {
{
id = 0,
properties = {
["Solid"] = "Solid"
}
}
}
}
},
layers = {
{
type = "tilelayer",
name = "Background",
x = 0,
y = 0,
width = 45,
height = 45,
visible = true,
opacity = 1,
properties = {},
encoding = "lua",
data = {
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
}
}
}
}
Code: Select all
map.layers[1].data[1]
Code: Select all
map.layers[1].data[1][1]
Code: Select all
map.layers[1].data[1][1][1]