2

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

please Help.

B K
  • 1,554
  • 3
  • 19
  • 40

1 Answers1

1

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
  • 5,449
  • 2
  • 27
  • 22