I’m trying to fade between 2 scenes using CCTransitionCrossFade with the idea that it fades out of the current scene and fades into the next scene. My first question is that is this the right method to do so?
My seconds issue is that after implementing this, I get no transition at all. The current scene is replaced with a solid black quad which is then replaced by the new scene with no fading at all. After checking the warning log i noticed that this message is spammed.
“Cocos2d: cocos2d: removeChildByTag: child not found!”
the code I’m using to switch scenes are here:
CCScene *s = MainMenuScreen::scene();
CCTransitionScene *transition = CCTransitionCrossFade::create(0.5f, s);
Does anyone know why this is happening?
I should also mention I’m using cocos2d-x and C++.
Also I have tried a couple of other transitions (tiles out and page turn) and both work fine. They just don’t suit the game so was really wanting to use the crossfade. I know I write something similar myself without much difficulty, but why reinvent the wheel right?