/// <summary> /// UI显示回调,处理全屏UI /// </summary> /// <param name="onShowUILogic"></param> private void ShowUIFinish(UILogicBase onShowUILogic) { if (onShowUILogic.UIFrameDisplayMode == FrameDisplayMode.FULLSCREEN) { EngineCoreEvents.CameraEvents.EnableMainCamera(false); this.m_showingfullScreenUISet.Add(onShowUILogic.UIFrame.ResName); } }
/// <summary> /// 对应的GUIFrame创建逻辑对象 /// </summary> /// <param name="guiFrame"></param> public static void MakeUILogic(GUIFrame guiFrame) { UILogicBase logicHandler = CreateUILogic(guiFrame.ResName); if (logicHandler == null) { throw new Exception("no logic :" + guiFrame.ResName); } guiFrame.LogicHandler = logicHandler; guiFrame.LogicHandler.Init(guiFrame); }
public static void Make(GameUIComponent com, string id, GameObject root, UILogicBase logic, GameUIComponent parent) { if (parent != null) { parent.children.Add(com); } if (logic != null) { com.LogicHandler = logic; logic.AddComponent(com); } com.Init(id, root); }
public static T Make <T>(string id, GameObject root, UILogicBase logic, GameUIComponent parent = null) where T : GameUIComponent, new() { T com = new T(); if (parent != null) { parent.Children.Add(com); } if (logic != null) { com.LogicHandler = logic; logic.AddComponent(com); } com.Init(id, root); if (com.gameObject == null) { return(null); } return(com); }