【发布时间】:2013-04-19 03:42:49
【问题描述】:
目前我正在通过以下方法添加我的背景。如何修改背景,使其与瓷砖地图一起自动滚动。
- (void)setupParallax {
NSString *backgroundName = [self.tilemap propertyNamed:@"BackgroundImage"];
CCSprite *background = [CCSprite spriteWithFile:[AssetHelper
getDeviceSpecificFileNameFor:[NSString stringWithFormat:@"background-%@.png",backgroundName]]];
background.anchorPoint = ccp(0,0);
background.position = CGPointMake(0, 0);
[self addChild:background z:0];
}
【问题讨论】:
标签: xcode cocos2d-iphone parallax