Ejemplo n.º 1
0
        public override void OnExit()
        {
            base.OnExit();
            m_pOutScene.OnExit();

            // inScene should not receive the onExit callback
            // only the onEnterTransitionDidFinish
            m_pInScene.OnEnterTransitionDidFinish();
        }
Ejemplo n.º 2
0
        protected void PurgeDirector()
        {
            // cleanup scheduler
            Scheduler.UnscheduleAll();

            // don't release the event handlers
            // They are needed in case the director is run again
            m_pTouchDispatcher.RemoveAllDelegates();

            if (m_pRunningScene != null)
            {
                m_pRunningScene.OnExitTransitionDidStart();
                m_pRunningScene.OnExit();
                m_pRunningScene.Cleanup();
            }

            m_pRunningScene = null;
            m_pNextScene    = null;

            // remove all objects, but don't release it.
            // runWithScene might be executed after 'end'.
            m_pobScenesStack.Clear();

            StopAnimation();

            // purge bitmap cache
            CCLabelBMFont.PurgeCachedData();

            // purge all managed caches
            CCAnimationCache.PurgeSharedAnimationCache();
            CCSpriteFrameCache.PurgeSharedSpriteFrameCache();
            CCTextureCache.PurgeSharedTextureCache();
            // CCFileUtils.PurgeFileUtils();
            // CCConfiguration.purgeConfiguration();

            // cocos2d-x specific data structures
            CCUserDefault.PurgeSharedUserDefault();
            // CCNotificationCenter.purgeNotificationCenter();

            CCDrawManager.PurgeDrawManager();

            m_NeedsInit = true;
        }
Ejemplo n.º 3
0
        public override void OnExit()
        {
            base.OnExit();

            // enable events while transitions
            CCDirector.SharedDirector.TouchDispatcher.IsDispatchEvents = true;

            m_pOutScene.OnExit();

            // m_pInScene should not receive the onEnter callback
            // only the onEnterTransitionDidFinish
            m_pInScene.OnEnterTransitionDidFinish();
        }