Example #1
0
        /// <summary>
        /// 终结助手
        /// </summary>
        public void OnTermination()
        {
            _defineUIAndEntitys.Clear();

            foreach (var ui in OverlayUIs)
            {
                UILogicBase uiLogic = ui.Value;

                if (!uiLogic.IsCreated)
                {
                    continue;
                }

                uiLogic.OnDestroy();
                Main.Kill(uiLogic.UIEntity);
                uiLogic.UIEntity = null;
            }
            OverlayUIs.Clear();

            foreach (var ui in CameraUIs)
            {
                UILogicBase uiLogic = ui.Value;

                if (!uiLogic.IsCreated)
                {
                    continue;
                }

                uiLogic.OnDestroy();
                Main.Kill(uiLogic.UIEntity);
                uiLogic.UIEntity = null;
            }
            CameraUIs.Clear();

            foreach (var ui in WorldUIs)
            {
                ui.Value.OnTermination();
            }
            WorldUIs.Clear();
        }
Example #2
0
        /// <summary>
        /// 终结助手
        /// </summary>
        public void OnTermination()
        {
            _defineUIAndEntitys.Clear();

            foreach (var ui in OverlayUIs)
            {
                DestroyUIEntity(ui.Value);
            }
            OverlayUIs.Clear();

            foreach (var ui in CameraUIs)
            {
                DestroyUIEntity(ui.Value);
            }
            CameraUIs.Clear();

            foreach (var ui in WorldUIs)
            {
                ui.Value.OnTermination();
            }
            WorldUIs.Clear();
        }