I try to add a layer whose all purpose is to fill the entire scene with the white color.
I try doing it as follows :
// Inside a cass which extends CCScene
- (id)init {
if (self = [super init]) {
// Create the flash layer on level restart
_flashLayer = [[CCLayerColor alloc] init];
[_flashLayer setColor:ccc3(255, 255, 255)];
[self addChild:_flashLayer z:0];
[_flashLayer release];
}
return self;
}
Problem is that I get a black screen no matter how I set the color of the layer.
Another thing, if I try to create the layer as follows :
_flashLayer = [[CCLayerColor alloc] initWithColor:ccc4(255, 255, 255, 255)];
I get the following error :
Incompatible type for argument 1 of 'initWithColor:'
I looked in the source and everything seems to be as expected.
Can anyone shed some light on this issue ?
Thanks.
You have two choices:
or