1
CCParallaxNode
を使用して、同じスプライトからいくつかのスプライトと2つの背景を移動しています。 すべてのスプライトは大丈夫ですが、バックグラウンドの間に黒い線があります。私はこの問題について読んだ。黒線/ CCParallaxNode背景のギャップとcocos2d?
[backgroundNode addChild:back z:0 parallaxRatio:bgSpeed positionOffset:ccp(160,240)];
[backgroundNode addChild:back2 z:0 parallaxRatio:bgSpeed positionOffset:ccp(160,720)];
と私はそれらを更新:私はCCParallaxに子として追加
back=[CCSprite spriteWithFile:@"mainBack.png"];
back2=[CCSprite spriteWithFile:@"mainBack.png"];
:
私はこれを持って
- (void)update:(ccTime)dt {
CGPoint backgroundScrollVel = ccp(0, -1000);
backgroundNode.position = ccpAdd(backgroundNode.position, ccpMult(backgroundScrollVel, dt));
私はtried
固定を持っていますccConfig
のファイルのconst 1、それは助けませんでした。
私もtried
の変化719から720、または719.5、何も...
まだそれらの間に黒い隙間があります。
どのような提案ですか? ありがとうございました。