重复Sprite Cocos2d 3.0

时间:2014-03-31 04:55:10

标签: cocos2d-iphone scroll

我试图在我的应用程序的背景中制作滚动效果

精灵从北向南移动

这是成功的但是如何重复精灵精灵来继续这样做?精灵向南移动并看到png文件的末尾,怎么能让它在这一点重复,所以精灵永远不会结束?谢谢!

- (void) Buildings
{

rightBuilding = [CCSprite spriteWithImageNamed:@"rightBuilding.png"];
rightBuilding.positionType = CCPositionTypeNormalized;
rightBuilding.position = ccp(0.9f, 0.5f);
[self addChild:rightBuilding];

}

- (void) scrollBuildings:(CCTime)dt
{

rightBuilding.position = ccp(rightBuilding.position.x, rightBuilding.position.y - .5);

} 

0 个答案:

没有答案