コード例 #1
0
        private void CallEnter(AbstractParams p)
        {
            if (enterParams != null)
            {
                LogMgr.LogFormat("{0} enter params will refresh :{1} => {2}", this, enterParams, p);
                enterParams.Release();
            }

            enterParams = p;
            if (!HasEnter)
            {
                NextFrame(null);
            }
        }
コード例 #2
0
        protected void CloseAtIndex(GameUI gameui, int index, bool force = false, AbstractParams p = null)
        {
            if (!removeList.Contains(gameui))
            {
                //check children
                GameUI[] childrenUI = gameui.GetComponentsInChildren <GameUI>();
                for (int i = 0; i < childrenUI.Length; ++i)
                {
                    if (childrenUI[i] != gameui)
                    {
                        for (int j = 0; j < uicontainer.Count; ++j)
                        {
                            if (uicontainer[j] == childrenUI[i])
                            {
                                CloseAtIndex(uicontainer[j], j, force);
                            }
                        }
                    }
                }

                ScriptCommand cmd = ScriptCommand.Create((int)FrameWorkCmdDefine.UICallExit);
                if (p != null)
                {
                    cmd.CallParams = p;
                }
                cmd.target = ScriptTarget.Sharp;
                cmd.CallParams.InsertObject(0, gameui);
                cmd.Excute();

                if (p != null)
                {
                    p.Release();
                }

                CacheCommand.CanCelAllBy(gameui);

                if (force)
                {
                    gameui.DestorySelf();
                }
                else
                {
                    DestroyUI(gameui);
                }

                removeList.Add(gameui);
            }
        }