示例#1
0
文件: Activity.cs 项目: dudu502/AiFa
        void LoadAssets()
        {
            LoadAssetProcess Process = new LoadAssetProcess();

            Debug.Log("Load");
            Process.FullName      = GetActivityFullName();
            Process.Layer         = GetLayer();
            Process.FinishHandler = (asset) =>
            {
                m_Asset = asset as GameObject;
                Init();
            };
            Send(UIRoot.NotificationType.EnqueueAProcess, Process);
        }
示例#2
0
文件: UIRoot.cs 项目: dudu502/AiFa
        IEnumerator _LoadElements()
        {
            while (true)
            {
                if (m_QueueProcess.Count > 0)
                {
                    LoadAssetProcess process = m_QueueProcess.Peek();
                    if (!process.IsStart)
                    {
                        yield return(process.Start());

                        AddLayer(process.Asset as GameObject, process.Layer);

                        m_QueueProcess.Dequeue();
                    }
                }
                yield return(m_WaitNextFrame);
            }
        }