Tip) implement popScene with Transition

In fact I have done this, my error was that my CCDirector had called PAUSE beforte the transition, what simply breaks it.

I also removed the replaceObjectAtIndex, since it was given an unknow error when compiling to Android, and in fact it doesn’t make any difference :wink:

template
        void popSceneWithTransition(float t) {
            CCAssert(m_pRunningScene != NULL, "running scene should not null");

            m_pobScenesStack->removeLastObject();
            unsigned int c = m_pobScenesStack->count();

            if (c == 0) {
                end();
            }
            else {
                m_bSendCleanupToScene = true;
                m_pNextScene = (CCScene*)m_pobScenesStack->objectAtIndex(c - 1);
                CCScene* trans = T::create(t, m_pNextScene);
                //m_pobScenesStack->replaceObjectAtIndex(c-1, (CCScene*)trans);
                m_pNextScene = trans;
            }
        }

Here is the code as I am using! Thank you for your help!