我正在尝试设置背景图层颜色而不是图像。二手CClayer。但它只显示右边的保证金。保证金可能是黑色或空白。如何全屏显示?
+(CCScene *) scene
{
CCScene *scene = [CCScene node];
HomeLayer *layer = [HomeLayer node];
[scene addChild: layer];
return scene;
}
-(id) init
{
if( (self=[super init])) {
CCLayerColor *colorLayer = [CCLayerColor layerWithColor:ccc4(100, 20, 200, 100) width:screenSize.width height:screenSize.height];
[self addChild:colorLayer z:1];
}
return self;
}