Advertisement
alestane

Linking box sprites (extra field)

Jan 2nd, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.34 KB | None | 0 0
  1. local function tileWithBox(i,j)
  2.  
  3.     local tile = gameTile(i,j)
  4.     tile.isBox = true
  5.     tile.isWalkable = false
  6.  
  7.     local tileWithBox
  8.  
  9.     trackID = trackID + 1
  10.     tile.box = display.newImage("crate.png")
  11.     tile.box.i = i
  12.     tile.box.j = j
  13.     tile.box.x = 240-((8 * 17) +17) +(i*34)
  14.     tile.box.y =  (j * 34)
  15.     tile.box.myID = trackID
  16.  
  17.     return tile
  18. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement