Why doesn't MoveBy work in this example?

Posted by ufo on Game Development See other posts from Game Development or by ufo
Published on 2012-10-16T08:55:14Z Indexed on 2012/10/17 23:22 UTC
Read the original article Hit count: 171

Filed under:

I'd like to run an action on a sprite using the MoveBy action. After lots of attempts, I can't achieve the goal... I have issues with the MoveBy in 2 different projects, so maybe I'm missing something in the setup... But I can't figure what!

The instruction is like this:

this.platform1Sprite.runAction(cc.MoveBy.create(1, cc.p(200, 0)));

I don't get any error, simply it doesn't work. platform1Sprite is a Sprite. But even with a LabelTTF it doesn't work:

var MoveToAction = cc.MoveTo.create(2.5, cc.p(size.width / 2, size.height / 2));
this.creditLabel.runAction(MoveToAction);

For this last snippet, you can view my complete code here: http://pastebin.com/fGbW4LLH

© Game Development or respective owner

Related posts about cocos2d-x