protected virtual bool InitWithDuration(float t, CCScene scene) { Debug.Assert(scene != null, "Argument scene must be non-nil"); if (base.Init()) { m_fDuration = t; // retain m_pInScene = scene; m_pOutScene = CCDirector.SharedDirector.RunningScene; if (m_pOutScene == null) { // Creating an empty scene. m_pOutScene = new CCScene(); m_pOutScene.Init(); } Debug.Assert(m_pInScene != m_pOutScene, "Incoming scene must be different from the outgoing scene"); // disable events while transitions CCDirector pDirector = CCDirector.SharedDirector; pDirector.TouchDispatcher.IsDispatchEvents = false; SceneOrder(); return true; } return false; }