学习creator 源码
_OvO_
这个作者很懒,什么都没留下…
展开
-
Typescript get 和 set 的重写
cocos creator 调试,set,get 属性的重写原创 2022-11-21 12:09:47 · 1036 阅读 · 1 评论 -
cocos creator 小技巧 - 代码混淆之后,类名消失的问题
问题:编译之后,继承与component的类,可以通过cc.js.getClassName获取类名,但是自定义类的类名是没法获取的分析:1.查看源码,能通过cc.js.getClassName调用函数名,必须要经过js.setClassName 函数定义;//文件地址:engine/cocos2d/platform/js.js /** * Register the class by specified name manually * @method setC.原创 2021-03-29 15:48:20 · 1545 阅读 · 0 评论 -
读源码,学技术 -- 快速删除数组元素
读源码,学技术 -- 1快速删除数组元素(在不考虑数组顺序的时候)/** * Removes the array item at the specified index. * It's faster but the order of the array will be changed. * @method fastRemoveAt * @param {any[]} array * @param {Number} index */function fastRemoveAt (ar.原创 2021-01-30 18:40:50 · 102 阅读 · 0 评论