Hello. I’m a newbie and now studying on how Action works. I just got stuck on a problem relating to CCJumpTo, CCJumpBy and CCRepeatForever.
I want my seeker to keep jumping again and again. First, I started by using CCJumpBy, and it worked fine.
jump = CCJumpBy::create(3, ccp(0, 0), 100, 1);
CCRepeatForever* repeatJump = CCRepeatForever::create(jump);
However, when I changed the code to CCJumpTo, it didn’t work as expected. The jump was done well for the first time, but after that it started jumping toward the right of the screen.
jump = CCJumpTo::create, 300, 1);
CCRepeatForever* repeatJump = CCRepeatForever::create;
Could anyone help clarify this problem for me? Did I implement anything wrong? or is it a cocos2dx bug? (I’ve searched on the internet and found some topic regarding this issue, but those were posted a year ago. So i dunno whether the bug still exists, or it is just a coding error.)