Ejemplo n.º 1
0
 /// <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);
     }
 }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
 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);
 }
Ejemplo n.º 4
0
        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);
        }