Game Development Reference
In-Depth Information
static GameLayer* _instance = nullptr;
We can check, then, if the one instance of
GameLayer
is currently in memory
and instantiate it if necessary.
4. The scene transition to
GameLayer
will look, on the surface, to be exactly like
the regular kind of transition. So, in
LevelSelectLayer
, we have the follow-
ing:
auto newScene = TransitionMoveInR::create(0.2f,
GameLayer::scene(_firstIndex + i, _levelsCompleted));
Director::sharedDirector()->replaceScene(newScene);