public void PopScene(float t, CCTransitionScene s) { Debug.Assert(RunningScene != null, "m_pRunningScene cannot be null"); if (scenesStack.Count > 0) { // CCScene s = m_pobScenesStack[m_pobScenesStack.Count - 1]; scenesStack.RemoveAt(scenesStack.Count - 1); } int c = scenesStack.Count; if (c == 0) { End(); // This should not happen here b/c we need to capture the current state and just deactivate the game (for Android). } else { IsSendCleanupToScene = true; NextScene = scenesStack[c - 1]; if (s != null) { NextScene.Visible = true; s.Reset(t, NextScene); scenesStack.Add(s); NextScene = s; } } }