摘要: let progressTimer= new cc.ProgressTimer(new cc.Sprite(fileName));this.addChild(progressTimer);progressTimer.setType(cc.ProgressTimer.TYPE_RADIAL);//圆形 阅读全文
posted @ 2019-11-20 16:02 流星曳尾 阅读(588) 评论(0) 推荐(0)
摘要: testSprite.runAction(cc.Sequence(cc.moveTo(x,y), cc.CallFunc(Func, this))); cc.CallFunc 调用回调函数 阅读全文
posted @ 2019-11-18 16:52 流星曳尾 阅读(164) 评论(0) 推荐(0)
摘要: MoveTo和MoveBy可以使精灵移动,区别在于MoveTo是移动到给定的坐标点;而MoveBy是从当前坐标点移动给定的坐标点这么多的距离。举个例子,假定精灵当前的坐标点是(x, y),分别给MoveTo和MoveBy指定一个坐标点(x1, y1),那么MoveTo和MoveBy最终的效果分别如下 阅读全文
posted @ 2019-11-18 16:48 流星曳尾 阅读(1075) 评论(0) 推荐(0)
摘要: let 声明变量用于块级作用域中 阅读全文
posted @ 2019-10-23 15:39 流星曳尾 阅读(88) 评论(0) 推荐(0)
摘要: #!/usr/bin/python# -*- coding:utf-8 -*- import osimport json file = open('a.txt','w')for root,dirs,files in os.walk('./'): file.write('root:' + root + 阅读全文
posted @ 2019-10-16 17:09 流星曳尾 阅读(117) 评论(0) 推荐(0)
摘要: https://www.runoob.com/python/python-json.html 阅读全文
posted @ 2019-10-16 16:33 流星曳尾 阅读(147) 评论(0) 推荐(0)
摘要: #!/usr/bin/python# -*- coding:utf-8 -*- import os os.system('cocos jscompile -s ./dir1 -d ./dir2') 阅读全文
posted @ 2019-10-16 13:45 流星曳尾 阅读(1861) 评论(0) 推荐(0)
摘要: #!/usr/bin/python# -*- coding:utf-8 -*- import shutil #shutil.copy(文件1,文件2)#将源内容复制到目标文件中。d.txt不存在则创建,存在则复制内容到d.txt 如不对文件重命名则文件2改为文件2的上级目录 例:shutil.cop 阅读全文
posted @ 2019-10-16 11:21 流星曳尾 阅读(1243) 评论(0) 推荐(0)
摘要: #!/usr/bin/python# -*- coding:utf-8 -*- import os import shutil os.remove(path) #删除文件shutil.rmtree(path) #删除文件夹及其子 可为'./dir' 也可'dir' 阅读全文
posted @ 2019-10-15 17:35 流星曳尾 阅读(1306) 评论(0) 推荐(0)
摘要: #!/usr/bin/python# -*- coding:utf-8 -*- import os fileName1 = 'a.txt'if os.path.exists(fileName1): file1 = open(fileName1,'w') file1.write('file1 exis 阅读全文
posted @ 2019-10-15 16:37 流星曳尾 阅读(205) 评论(0) 推荐(0)