Пример #1
0
        public override void Dispose()
        {
            if (this.IsDisposed)
            {
                return;
            }

            foreach (FGUIBase ui in this._DicAllUIForms.Values)
            {
                if (ui != null)
                {
                    if (ui.GObject != null)
                    {
                        ui.GObject.Dispose();
                    }

                    if (ui.Window != null)
                    {
                        ui.Window.Dispose();
                    }
                }
            }

            Instance = null;
            this._DicAllUIForms.Clear();
            this._DicCurrentShowUIForms.Clear();
            this._StaCurrentUIForms.Clear();

            base.Dispose();
        }
Пример #2
0
        /// <summary>
        /// 加载核心字段数据
        /// </summary>
        public void Awake()
        {
            Instance = this;

            UIPackage.AddPackage("FGUI/UI_CheckUpdate");

            //GRoot的参数初始化
            GRoot.inst.SetContentScaleFactor(1280, 720, UIContentScaler.ScreenMatchMode.MatchWidthOrHeight);
            UIConfig.buttonSound     = (NAudioClip)UIPackage.GetItemAssetByURL("ui://lb36ex7oav6g0");
            UIConfig.modalLayerColor = new Color(186f, 85f, 211f, 0.4f);
        }