Ejemplo n.º 1
0
 public void LoadCSV()
 {
     list_AvatarModelData = AvatarModelData.LoadDatas();
     list_CameraAnimData  = CameraAnimData.LoadDatas();
     list_EffectData      = EffectData.LoadDatas();
     list_EquipData       = EquipData.LoadDatas();
     list_GameBaseData    = GameBaseData.LoadDatas();
     list_GameSceneData   = GameSceneData.LoadDatas();
     list_GoodsData       = GoodsData.LoadDatas();
     list_MonsterData     = MonsterData.LoadDatas();
     list_ResourceData    = ResourceData.LoadDatas();
     list_SkillAction     = SkillAction.LoadDatas();
     list_SkillData       = SkillData.LoadDatas();
 }
Ejemplo n.º 2
0
        public static List <CameraAnimData> LoadDatas()
        {
            CSVFile csvFile = new CSVFile();

            csvFile.Open(csvFilePath);
            dataList = new List <CameraAnimData>();
            dataMap  = new Dictionary <int, CameraAnimData>();
            string[]   strs;
            string[]   strsTwo;
            List <int> listChild;

            columnNameArray = new string[8];
            for (int i = 0; i < csvFile.mapData.Count; i++)
            {
                CameraAnimData data = new CameraAnimData();
                int.TryParse(csvFile.mapData[i].data[0], out data.id);
                columnNameArray [0] = "id";
                data.name           = csvFile.mapData[i].data[1];
                columnNameArray [1] = "name";
                int.TryParse(csvFile.mapData[i].data[2], out data.xRate);
                columnNameArray [2] = "xRate";
                float.TryParse(csvFile.mapData[i].data[3], out data.xSwing);
                columnNameArray [3] = "xSwing";
                int.TryParse(csvFile.mapData[i].data[4], out data.yRate);
                columnNameArray [4] = "yRate";
                float.TryParse(csvFile.mapData[i].data[5], out data.ySwing);
                columnNameArray [5] = "ySwing";
                int.TryParse(csvFile.mapData[i].data[6], out data.zRate);
                columnNameArray [6] = "zRate";
                float.TryParse(csvFile.mapData[i].data[7], out data.zSwing);
                columnNameArray [7] = "zSwing";
                dataList.Add(data);
                if (!dataMap.ContainsKey(data.id))
                {
                    dataMap.Add(data.id, data);
                }
            }
            return(dataList);
        }