您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

22 行
627 B

  1. require("Editor.CompileFile")
  2. local function processAnimation(fileName)
  3. local animationClip = cc.AnimationClipFileCache:getInstance():load(fileName);
  4. print("载入AnimationClip:" , fileName);
  5. end
  6. -- 生成所有语言
  7. function generateAnimationClips(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.AnimationClipFileCache:getInstance():saveToFile(textureFile);
  18. end