local function yourFunction()
print("This will get called 5seconds after block[old] transition...")
end
local function transitionFinished()
print("Transition of block[old] is completed...")
timer.performWithDelay(5000,yourFunction,1) --[[ If you want, you can use this
line to call 'yourFunction'
after desired time(here 5seconds)
--]]
end
transition.to(block[old], {time=tranTime, x=block[new].x, y=block[new].y, onComplete=transitionFinished})
transition.to(block[new], {time=tranTime, x=block[old].x, y=block[old].y})
或者,如果你想暂停所有的转换,有很多自定义类,你可以使用 DevfaR 所说的类似的东西。
或者,如果您想在延迟后执行转换,您还可以使用:
transition.to(block[old], {delay=1000,time=tranTime, x=block[new].x, y=block[new].y})
-- this will get called after a delay of 1000ms --
继续编码............ :)