Esempio n. 1
0
        public LinkerMod CreateUI()
        {
            T         ui  = new T();
            LinkerMod mod = new LinkerMod();

            mod.main = ModelManagerUI.LoadToGame(model, ui);
            mod.UI   = ui;
            return(mod);
        }
        public LinkerMod CreateUI()
        {
            T            ui  = new T();
            LinkerMod    mod = new LinkerMod();
            ModelElement me  = new ModelElement();

            me.Load(model.ModData);
            mod.main = me;
            mod.UI   = ui;
            return(mod);
        }
Esempio n. 3
0
        public LinkerMod CreateUI()
        {
            LinkerMod mod = new LinkerMod();

            mod.main = ModelManagerUI.LoadToGame(model, null);
            if (ItemCreate != null)
            {
                ItemCreate(this, mod);
            }
            return(mod);
        }
        public LinkerMod CreateUI()
        {
            LinkerMod    mod = new LinkerMod();
            ModelElement me  = new ModelElement();

            me.Load(model.ModData);
            mod.main = me;
            if (ItemCreate != null)
            {
                ItemCreate(this, mod);
            }
            return(mod);
        }
        public override LinkerMod CreateUI()
        {
            for (int i = 0; i < buffer.Count; i++)
            {
                if (buffer[i].index < 0)
                {
                    var item = buffer[i];
                    buffer.RemoveAt(i);
                    return(item);
                }
            }
            LinkerMod    mod = new LinkerMod();
            ModelElement me  = new ModelElement();

            me.Load(model.ModData);
            mod.main = me;
            mod.UI   = me.ComponentReflection <T>();
            return(mod);
        }
Esempio n. 6
0
        /// <summary>
        /// 创建UI项目连接器
        /// </summary>
        /// <returns></returns>
        public override LinkerMod CreateUI()
        {
            for (int i = 0; i < buffer.Count; i++)
            {
                if (buffer[i].index < 0)
                {
                    var item = buffer[i];
                    buffer.RemoveAt(i);
                    return(item);
                }
            }
            LinkerMod mod = new LinkerMod();

            if (ItemCreate != null)
            {
                ItemCreate(this, mod);
            }
            return(mod);
        }
Esempio n. 7
0
        /// <summary>
        /// 创建项目连接器
        /// </summary>
        /// <returns></returns>
        public override LinkerMod CreateUI()
        {
            for (int i = 0; i < buffer.Count; i++)
            {
                if (buffer[i].index < 0)
                {
                    var item = buffer[i];
                    buffer.RemoveAt(i);
                    return(item);
                }
            }
            LinkerMod mod = new LinkerMod();
            T         t   = new T();

            if (initializer == null)
            {
                initializer = new UIInitializer(TempReflection.ObjectFields(typeof(T)));
            }
            initializer.Reset(t);
            mod.main = HGUIManager.Clone(model, initializer);
            mod.UI   = t;
            return(mod);
        }
 public void RecycleItem(LinkerMod mod)
 {
     buffer.Add(mod);
     mod.main.activeSelf = false;
 }
Esempio n. 9
0
 /// <summary>
 /// 回收项目连接器
 /// </summary>
 /// <param name="mod"></param>
 public void RecycleItem(LinkerMod mod)
 {
     buffer.Add(mod);
     mod.main.SetActive(false);
 }