Beispiel #1
0
        public override void Init()
        {
            m_ShowingPanel = new Dictionary <UIID, UIPanelBase>();
            m_CachePanel   = new Dictionary <UIID, UIPanelBase>();

            UIDataTable.InitUIDataTable();
            UIRoot = Object.FindObjectOfType <UIRoot>();
            //Dotween初始化
            DOTween.Init(true, true, LogBehaviour.Verbose).SetCapacity(100, 100);
        }
Beispiel #2
0
        private void AddUI(UIID uiId, params object[] param)
        {
            UIData uiStaticData = UIDataTable.GetUIData(uiId);

            ResMgr.S.LoadAsset(uiStaticData.ResPath, typeof(GameObject),
                               (isSuccess, obj) =>
            {
                if (!m_ShowingPanel.ContainsKey(uiId))
                {
                    UIPanelBase newPanel = new UIPanelBase(uiStaticData, (GameObject)obj);
                    m_ShowingPanel.Add(uiId, newPanel);
                    newPanel.Open(param);
                }
            }
                               );
        }