I want to show/hide a CCLayer with fade in/out effects when i try with the method below nothing happens. (cocos2d-x version 2.2.2)
void MainScene::setMenuVisibility(bool value)
{
if(value)
{
CCFadeIn* fadeIn = CCFadeIn::create(5);
mainMenuLayer->runAction(fadeIn);
}
else
{
CCFadeOut* fadeOut = CCFadeOut::create(5);
mainMenuLayer->runAction(fadeOut);
}
}