您不能選擇超過 %s 個話題 話題必須以字母或數字為開頭,可包含連接號 ('-') 且最長為 35 個字

22 行
602 B

  1. require("Editor.CompileFile")
  2. local function processAnimation(fileName)
  3. local Material = cc.MaterialFileCache:getInstance():load(fileName);
  4. print("载入Material:" , fileName);
  5. end
  6. -- 生成所有语言
  7. function generateMaterials(textureFile)
  8. local function saveui(fileName)
  9. -- 返回pathName , baseName , ext
  10. local pathName , baseName , ext = string.splitFilename(fileName);
  11. print(pathName , baseName , ext);
  12. if string.lower(ext) == "animation" then
  13. processAnimation(fileName);
  14. end
  15. end
  16. visitPath("res" , saveui);
  17. cc.MaterialFileCache:getInstance():saveToFile(textureFile);
  18. end