views:

38

answers:

1

Hi,

I want to know the difference between methods JumpTo and JumpBy of cocos2D? Where can I use JumpTo and where JumpBy?

please Help.

A: 

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.

Colin Gislason
thanks buddy for kind replay. will ask if further help is needed. thanks once again.
BK