示例#1
0
    private void OnDestroy()
    {
        StopAllCoroutines();

        if (m_LoadingScreen != null)
        {
            Destroy(m_LoadingScreen);
            m_LoadingScreen = null;
        }
        if (m_Overlay != null)
        {
            Destroy(m_Overlay);
            m_Overlay = null;
        }

        m_Instance         = null;
        m_ActionController = null;
        m_OpenedViews.Clear();
        m_OpenedViews = null;
        m_ClosedViews.Clear();
        m_ClosedViews = null;
        m_OpeningView = null;
        m_ClosingViews.Clear();
        m_ClosingViews      = null;
        m_GainingFocusView  = null;
        m_LosingFocusView   = null;
        m_CurrentActionData = null;
        m_QueuedActions.Clear();
        m_QueuedActions = null;
    }
示例#2
0
    private void Awake()
    {
        if (m_Instance == null)
        {
            m_Instance = this;
        }

        if (m_ActionController == null)
        {
            m_ActionController = new FlowDataController();
        }

        if (m_LoadingScreen == null)
        {
            GameObject loadingScreenPrefab = Resources.Load(LOADING_PREFAB_PATH) as GameObject;
            if (loadingScreenPrefab != null)
            {
                m_LoadingScreen = GameObject.Instantiate(loadingScreenPrefab) as GameObject;
                m_LoadingScreen.transform.parent = transform;
                m_LoadingScreen.SetActive(false);
            }
        }

        if (m_Overlay == null)
        {
            GameObject overlayPrefab = Resources.Load(OVERLAY_PREFAB_PATH) as GameObject;
            if (overlayPrefab != null)
            {
                m_Overlay = GameObject.Instantiate(overlayPrefab) as GameObject;
                m_Overlay.transform.parent = transform;
                m_Overlay.SetActive(false);
            }
        }
    }
示例#3
0
    private void OnDestroy()
    {
        StopAllCoroutines();

        if (m_LoadingScreen != null)
        {
            Destroy(m_LoadingScreen);
            m_LoadingScreen = null;
        }
        if (m_Overlay != null)
        {
            Destroy(m_Overlay);
            m_Overlay = null;
        }

        m_Instance = null;
        m_ActionController = null;
        m_OpenedViews.Clear();
        m_OpenedViews = null;
        m_ClosedViews.Clear();
        m_ClosedViews = null;
        m_OpeningView = null;
        m_ClosingViews.Clear();
        m_ClosingViews = null;
        m_GainingFocusView = null;
        m_LosingFocusView = null;
        m_CurrentActionData = null;
        m_QueuedActions.Clear();
        m_QueuedActions = null;
    }
示例#4
0
    private void Awake()
    {
        if (m_Instance == null)
        {
            m_Instance = this;
        }

        if (m_ActionController == null)
        {
            m_ActionController = new FlowDataController();
        }

        if (m_LoadingScreen == null)
        {
            GameObject loadingScreenPrefab = Resources.Load(LOADING_PREFAB_PATH) as GameObject;
            if (loadingScreenPrefab != null)
            {
                m_LoadingScreen = GameObject.Instantiate(loadingScreenPrefab) as GameObject;
                m_LoadingScreen.transform.parent = transform;
                m_LoadingScreen.SetActive(false);
            }
        }

        if (m_Overlay == null)
        {
            GameObject overlayPrefab = Resources.Load(OVERLAY_PREFAB_PATH) as GameObject;
            if (overlayPrefab != null)
            {
                m_Overlay = GameObject.Instantiate(overlayPrefab) as GameObject;
                m_Overlay.transform.parent = transform;
                m_Overlay.SetActive(false);
            }
        }
    }