문제

I have a tween animation, and I need to launch a function with parameters after it completes.

I was unable to find any sleep command in Lua without loading the CPU, but then the animation freezes. I tried onComplete, but it doesn't wait for the animation to end and it executes that function right after the delay timer is over (just when the animation starts).

I have been looking for a solution for 3 hours straight, but I was unable to find anything. Please help.

도움이 되었습니까?

해결책

Marmalade quick includes luasocket, which has a sleep function.

Update

Another options could be setting up a timer and let the timer fire your function after the delay you need.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top