public void LoadCSV() { list_CardData = CardData.LoadDatas(); list_GameBaseData = GameBaseData.LoadDatas(); list_GameSceneData = GameSceneData.LoadDatas(); list_GoodsData = GoodsData.LoadDatas(); list_JettonData = JettonData.LoadDatas(); list_ResourceData = ResourceData.LoadDatas(); }
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(); }
public static List <GoodsData> LoadDatas() { CSVFile csvFile = new CSVFile(); csvFile.Open(csvFilePath); dataList = new List <GoodsData>(); dataMap = new Dictionary <int, GoodsData>(); string[] strs; string[] strsTwo; List <int> listChild; columnNameArray = new string[12]; for (int i = 0; i < csvFile.mapData.Count; i++) { GoodsData data = new GoodsData(); int.TryParse(csvFile.mapData[i].data[0], out data.id); columnNameArray [0] = "id"; data.goodsName = csvFile.mapData[i].data[1]; columnNameArray [1] = "goodsName"; data.resourceName = csvFile.mapData[i].data[2]; columnNameArray [2] = "resourceName"; int.TryParse(csvFile.mapData[i].data[3], out data.goodsType); columnNameArray [3] = "goodsType"; int.TryParse(csvFile.mapData[i].data[4], out data.effectType); columnNameArray [4] = "effectType"; int.TryParse(csvFile.mapData[i].data[5], out data.effectValue); columnNameArray [5] = "effectValue"; data.info = csvFile.mapData[i].data[6]; columnNameArray [6] = "info"; float.TryParse(csvFile.mapData[i].data[7], out data.dis); columnNameArray [7] = "dis"; data.sound = csvFile.mapData[i].data[8]; columnNameArray [8] = "sound"; data.position = new Vector3(); strs = csvFile.mapData[i].data[9].Split(new char[1] { ',' }); data.position.x = (float.Parse(strs[0])); data.position.y = (float.Parse(strs[1])); data.position.z = (float.Parse(strs[2])); columnNameArray [9] = "position"; data.scale = new Vector3(); strs = csvFile.mapData[i].data[10].Split(new char[1] { ',' }); data.scale.x = (float.Parse(strs[0])); data.scale.y = (float.Parse(strs[1])); data.scale.z = (float.Parse(strs[2])); columnNameArray [10] = "scale"; data.rotion = new Vector3(); strs = csvFile.mapData[i].data[11].Split(new char[1] { ',' }); data.rotion.x = (float.Parse(strs[0])); data.rotion.y = (float.Parse(strs[1])); data.rotion.z = (float.Parse(strs[2])); columnNameArray [11] = "rotion"; dataList.Add(data); if (!dataMap.ContainsKey(data.id)) { dataMap.Add(data.id, data); } } return(dataList); }