Hi, On Wed, May 23, 2018 at 10:56 AM, <[email protected]> wrote:
> so, how to do delay/wait in cocos? > In this code: my_layer.do(Delay(10) + CallFunc(my_func)), why it executes > my_func() at once instead of execute if after delaying 10s? > My purpose is, wait for a few seconds, and then kill the current layer。 > > - The syntax you show in the title should work; as can be seen in the example test\test_callfunc.py Are you sure is the same syntax you used in the failing code? By example, these two variants will call without delay my_layer.do(Delay(10)) + CallFunc(my_func) my_layer.do(Delay(10) + CallFunc(my_func()) -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/cocos-discuss. For more options, visit https://groups.google.com/d/optout.
