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