alestane icon

Linking box sprites (extra field)

alestane | PRO | 01/02/14 04:21:26 PM UTC | 0 ⭐ | 328 👁️ | Never ⏰ | []
Lua |

340 B

|

None

|

0 👍

/

0 👎

local function tileWithBox(i,j)
 
    local tile = gameTile(i,j)
    tile.isBox = true
    tile.isWalkable = false
 
    local tileWithBox
 
    trackID = trackID + 1
    tile.box = display.newImage("crate.png")
    tile.box.i = i
    tile.box.j = j
    tile.box.x = 240-((8 * 17) +17) +(i*34)
    tile.box.y =  (j * 34)
    tile.box.myID = trackID
 
    return tile
end

Comments