Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local world = display.newGroup()
- group:insert(world)
- local movable = display.newGroup()
- group:insert(movable)
- for i=1, 8 do
- for j=1, 8 do
- local value = gameMap[i][j]
- if tileFactory[value] then
- local mobile
- gameMap[i][j], mobile = tileFactory[value](i, j)
- world:insert(gameMap[i][j])
- if mobile then
- movable:insert(mobile)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement