Ejemplo n.º 1
0
        public static void InitJsonConf <T1, T2>() where T2 : AbsJsonConf, new()
        {
            Type type = typeof(T1);

            if (m_jsnPool.ContainsKey(type))
            {
                GameLog.Error(string.Format("Json {0} 已加载", type.Name));
                return;
            }

            T2 cfg = new T2();

            cfg.Init();
            m_jsnPool.Add(type, cfg.ConfData);

            cfg = null;
        }
Ejemplo n.º 2
0
        public static void InitTabConf <T1, T2>() where T2 : AbsTabConf, new()
        {
            Type type = typeof(T1);

            if (m_tabPools.ContainsKey(type))
            {
                GameLog.Error(string.Format("Tab {0} 已加载", type.Name));
                return;
            }

            T2 cfg = new T2();

            cfg.Init();
            m_tabPools.Add(type, cfg.ConfPool);

            cfg = null;
        }