Beispiel #1
0
        private static Dictionary <TKey, TData> GetDisposableDataDictionary <TKey, TData>(CONFIG_PATH path)
            where TKey : new()
            where TData : new()
        {
            ConfigTable configTable = config.getCfg(path);

            Dictionary <TKey, TData> dataDictionary = ConfigDataParser.ParseTable <TKey, TData>(configTable);

            config.releaseCfg(path);

            return(dataDictionary);
        }
Beispiel #2
0
        private static List <TData> GetDisposableDataList <TData>(CONFIG_PATH path) where TData : new()
        {
            ConfigTable configTable = config.getCfg(path);

            if (configTable == null)
            {
                // act.debug.PrintSystem.LogError("config is missing : " + path);
                UnityEngine.Debug.LogError("config is missing : " + path);
                return(null);
            }

            List <TData> dataList = ConfigDataParser.ParseTable <TData>(configTable);

            config.releaseCfg(path);

            return(dataList);
        }
Beispiel #3
0
        public static List <TData> GetDisposableDataList <TData>(string path) where TData : new()
        {
            ConfigTable configTable = new ConfigTable();

            if (!configTable.initByPath(path))
            {
                act.debug.PrintSystem.Log(string.Format("read config {0}  failed!", path));
            }

            if (configTable == null)
            {
                // act.debug.PrintSystem.LogError("config is missing : " + path);
                UnityEngine.Debug.LogError("config is missing : " + path);
                return(null);
            }

            List <TData> dataList = ConfigDataParser.ParseTable <TData>(configTable);

            return(dataList);
        }