cocos2d wait for action to finish in Python -


here code.

self.wolf.do(moveto((x, y + 10)))  sprites = (self.farmer, self.boat,self.wolf) n in sprites:     n.do(moveby((-350, 0), 1)) 

i want wait finish wolf's action, before run on loop.what can do?

if want call function after "moveto" action finished can use sequence "+" operator callfunc :

self.wolf.do(moveto((x, y + 10)) + callfunc(self.on_move_completed)) 

Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -