示例#1
0
    IEnumerator FadeoutAndDestroy(GameObject destroyRoot)
    {
        m_DestroyRequested = true;
        VM vm = VM.Instance;

/*		if( vm != null && Application.isPlaying ){
 *                      vm.EnableUpdate( false );
 *              }
 * //*/
//		SystemUtility.ShowSystemUI( false );

        ViNoSceneManager sm = ViNoSceneManager.Instance;

        sm.PreFadeoutAndDestroy(destroyRoot);          //sm.theSavedPanel );

        yield return(new WaitForSeconds(fadeoutAndDestroyWaitTime));

        sm.OnFadeoutAndDestroy(destroyRoot);          //sm.theSavedPanel );

//		Debug.Log("Now , Destroy Scene");
        // Destroy Under ME.
        ViNoGOExtensions.DestroyChildren(destroyRoot);          //Instance.name );

        if (vm != null && Application.isPlaying)
        {
            vm.EnableUpdate(true);
        }

//		SystemUtility.ShowSystemUI( true );
        m_DestroyRequested = false;
    }
示例#2
0
    static public void DestroySceneImmediate(GameObject advSceneRoot)
    {
        // Destroy Created Materials to avoid Leaking .
//		Debug.Log( "Destroy Root:" + advSceneRoot.name );

        ViNoSceneManager sm = GameObject.FindObjectOfType(typeof(ViNoSceneManager)) as ViNoSceneManager;

        sm.OnFadeoutAndDestroy(advSceneRoot);

        // Destroy Under ME.
        ViNoGOExtensions.DestroyImmediateChildren(advSceneRoot.name);
    }