예제 #1
0
        public static void LoadNewItemDataFromLocalFile()
        {
            string newItemDataPath = "/Users/houlianghong/Desktop/MyGameData/物品设计.csv";

            string fullItemDataString = DataHandler.LoadDataString(newItemDataPath);

            NewItemDataLoader loader = new NewItemDataLoader();

            loader.LoadAllItemsWithFullDataString(fullItemDataString);

            for (int i = 0; i < loader.newItemModels.Count; i++)
            {
                ItemModel im = loader.newItemModels [i];

                Debug.Log(im);
            }

            string newItemModelsDataPath = CommonData.originDataPath + "/NewItemDatas.json";

            DataHandler.SaveInstanceListToFile <ItemModel> (loader.newItemModels, newItemModelsDataPath);
        }
예제 #2
0
        public static void GenerateNewEquipmentData()
        {
            /******************** 注意: *******************/
            // 1. 原始数据格式必须使用【装备原始数据表(01_equip_design)】导出的csv文件,原始表格尾部不能有空行
            // 2. 原始数据存放的地址根据实际地址进行修改
            string newItemDataSourcePath = "/Users/houlianghong/Desktop/MyGameData/装备原始数据.csv";
            /******************** 注意: *******************/



            string newItemDataString = DataHandler.LoadDataString(newItemDataSourcePath);

            NewItemDataLoader loader = new NewItemDataLoader();

            loader.LoadAllItemsWithFullDataString(newItemDataString);

            string newItemModelsDataPath = CommonData.originDataPath + "/GameItems/EquipmentDatas.json";

            DataHandler.SaveInstanceListToFile <EquipmentModel> (loader.newItemModels, newItemModelsDataPath);

            Debug.Log("装备数据完成");
        }