CCLayer with background image

CCLayer with background image
0.0 0


I have a CCLayerColor with an background image.
I’m trying to FadeOut but nothing happens.
Do I have to inherit from another CCLayer Class maybe. Some that supports images?

This is in my init()

if ( CCLayerColor::initWithColor( ccc4(0,0,0,160)) )

        CCSprite * bg = CCSprite::create("Images/background.png");
        bg->setPosition(ccp(s.width * 0.5f, s.height * 0.5f));

How could I somehow Fade out so everything in my CCLayer gets faded out?


Run FadeOut one by one.

    CCSequence* seq = CCSequence::create(call1, delay1, call2, delay2, call3, NULL);


You should use CCLayerRGBA::setCascadeOpacityEnabled(true).