示例#1
0
        void Update()
        {
            if (currLoading != null)
            {
                if (currLoading.consumed)
                {
                    currLoading = null;
                }
                else if (currLoading.shared)
                {
                    PopupBase p = instanceMap.Get(currLoading.key);
                    if (p != null && p.window.Status.IsShowing())
                    {
                        currLoading = null;
                    }
                }
            }
            if (loadList.Count > 0 && currLoading == null)
            {
                currLoading = loadList.Dequeue();
                PopupBase p = null;
                if (currLoading.shared)
                {
                    lruCache.Remove(currLoading.key);
                    lruCache.Add(currLoading.key);
                    p = instanceMap.Get(currLoading.key);
                }

                if (p != null)
                {
                    currLoading.Complete(p);
                }
                else
                {
                    StartCoroutine(LoadInstance(currLoading));
                }
            }
        }
        protected override void VerifyComponent(Component comp)
        {
            PopupBase p = comp as PopupBase;

            p.window.ui.SetActive(false);
        }