开发者

Difference between JumpTo and JumpBy?

开发者 https://www.devze.com 2023-01-02 12:12 出处:网络
I want to know the difference between methods JumpTo and JumpBy of cocos2D? Wh开发者_如何学Pythonere can I use JumpTo and where JumpBy?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消