I want to know the difference between methods JumpTo and JumpBy of cocos2D? Wh开发者_如何学Pythonere can I use JumpTo and where JumpBy?
please Help.
JumpTo
will move the node to an exact point on the screen, but JumpBy
moves by an offset relative to the current position of the node.
For example, lets say I have a sprite at point 30,30
. If I use JumpTo
and specify 10,10
as the point the sprite will end up at 10,10
. If I use JumpBy
and specify 10,10
, the sprite will end up at 40,40
.
精彩评论