public override void onExit() { base.onExit(); m_pOutScene.onExit(); // inScene should not receive the onExit callback // only the onEnterTransitionDidFinish m_pInScene.onEnterTransitionDidFinish(); }
protected void setNextScene() { // If it is not a transition, call onExit/cleanup /*if (! newIsTransition)*/ if (!(m_pNextScene is CCTransitionScene)) { if (m_pRunningScene != null) { m_pRunningScene.onExit(); } // issue #709. the root node (scene) should receive the cleanup message too // otherwise it might be leaked. if (m_bSendCleanupToScene && m_pRunningScene != null) { m_pRunningScene.cleanup(); } } m_pRunningScene = m_pNextScene; // m_pNextScene.retain(); m_pNextScene = null; if (m_pRunningScene != null) { m_pRunningScene.onEnter(); m_pRunningScene.onEnterTransitionDidFinish(); } }