Esempio n. 1
0
        public static void LoadAllConfig(Action completeFunc)
        {
            reader("soldier_property_define.csv", (content) =>
            {
                var lines = ReadTextToLines(content);
                SoldierPropertyDefine.LoadFromLines(lines);

                if (completeFunc != null)
                {
                    completeFunc();
                }
            });
        }
Esempio n. 2
0
        public static void LoadFromLines(List <string> lines)
        {
            var list = new SoldierPropertyDefine[lines.Count];

            for (int i = 0; i < lines.Count; i++)
            {
                string line = lines[i];
                var    row  = line.Split(',');
                var    obj  = new SoldierPropertyDefine();
                obj.ParseFromRow(row);
                list[i] = obj;
            }
            Data = list;
        }