[lua]local path = pather:getPath(startx,starty, endx,endy)
if path then
compPath = display.newGroup();
for node, count in path:nodes() do
--timer.performWithDelay( 1000, function (event)
print((‘Step: %d - x: %d - y: %d’):format(count, node:getX(), node:getY()))
local tile = display.newRect((node:getX() * 50) - 25, (node:getY() * 50) - 25, 48, 48)
colorCell(tile, 0, 0, 255)
tile.alpha = 0
usleep(500);
transition.fadeIn( tile, { time=1500 } )
compPath:insert(tile)
--end
--)
end
end[/lua]
I have this path that I am trying to animate as it appears but it seems to all show at once even with a delay or if I put it in a timer to go in spurts. Do I have to be displaying it using framerate at every second instead?
What am I missing?