/// <summary> /// 初始化 /// </summary> public override void Initialize() { UICompositeViewMounts mounts = GetTransform().GetComponent <UICompositeViewMounts>(); if (mounts) { BackBox = mounts.BackBox; TitleBox = mounts.TitleBox; ListBox = mounts.ListBox; TipBox = mounts.TipBox; PageBox = mounts.PageBox; SortBox = mounts.SortBox; OtherBox = mounts.OtherBox; ModelBox = mounts.ModelBox; HotkeyBox = mounts.HotkeyBox; } Root = FindComponent <Transform>("Content"); AnimatorController = GetTransform().GetComponent <UIAnimationEvent>(); //初始化页面状态 CfgEternityProxy cfg = Facade.RetrieveProxy(ProxyName.CfgEternityProxy) as CfgEternityProxy; UiConfig? uiConfig = cfg.GetUIConfig((uint)Name); if (uiConfig.HasValue && !m_ViewStates.ContainsKey(Name)) { UIViewState state = new UIViewState(); state.UIConfig = uiConfig; state.Initialize(); m_ViewStates.Add(Name, state); } }
/// <summary> /// 获取所有挂点 /// </summary> /// <returns>挂点列表</returns> public List <Transform> GetOrderMountPoints() { UICompositeViewMounts mounts = GetTransform().GetComponent <UICompositeViewMounts>(); if (mounts) { return(mounts.GetOrderMountPoints()); } else { return(new List <Transform>()); } }