开发者

Problem regarding CCFollow and CCParallaxNode

I have a problem regarding CCFollow开发者_运维技巧. I am using CCFollow along with CCParallaxNode. I have added layers to parallax node and then apply runaction: on parallax node.

[pn runaction:[CCFollow actionWithTarget:sprite worldBoundary:CGRectMake(0, 0, 5600, 320)]];

but using this the sprite always runs at middle of screen. Is there any way to keep it at left of screen and also layers follow this sprite?

Thanx.


If you want your player to remain on the left side of the screen, then lock the players X position to a specific region that makes sense. You should also be moving the background and other elements of your game, not your player (with exceptions, to the players position visually on the screen).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜