Change CCMoveTo's destination (with ease) without stopping
I have some sprites falling from the point A to B with ease. The code:
id move = [C开发者_开发百科CMoveTo actionWithDuration:time position:new_position];
id move_ease_in = [CCEaseIn actionWithAction:[[move copy] autorelease] rate:ratio];
[sprite runAction:move_ease_in];
When someone taps on the screen, the sprite has to keep falling to the point C, that is below B. The sprites have to keep falling without stopping and falling again. How can I do that? Thanks.
Try CCMoveBy, and add the amount of want them to move each time.
(Note that depending on the version of cocos2d that you're using, you may encounter a jerky behavior. If that is the case, check the cocos2d method definition for the move methods and comment out the flag there that has a comment "bug fix" preceding it. )
精彩评论