- 博客(8)
- 资源 (4)
- 问答 (1)
- 收藏
- 关注
转载 Cocos2d-JS 性能优化
缓存的创建和清除为了提供性能,Cocos2d-JS提供了几个缓存,分别应用与不同的情况。这些 缓存类有纹理缓存,精灵帧缓存,动画 缓存和着色器缓存。场景与资源不同的场景中资源的占用不同,而资源的占用决定了缓存创建和清除的时机。 缓存创建和清除时机 使用纹理和精灵帧缓存时,一个原则是:“尽可能将所有资源加载到缓存”。 事实上作为游戏开发人员,需要照顾那些配置比较低的设备。用户不可能采用“尽可能将
2016-10-25 11:29:22 2553
原创 cocos2d - JS project.json 属性
概述项目相关配置,由原来的cocos2d.js中转移到project.json中,该文件需要与index.html同级,一般建议放在根目录下。由原来的cocos2d.js改为project.json的好处如下:原来的cocos2d.js中参杂了一些逻辑代码,无法很好体现其就是作为项目的配置文件。用json格式作为配置文件会更友好。也可以使得cocos-console、cocos-utils,甚至是用
2016-10-25 10:09:42 1646
原创 cocos2d-JS 帧听断网、连网事件
cocos2d-JS 帧听断网、联网事件 : var EventUtil = { addHandler: function(element, type, handler) { if (element.addEventListener) { element.addEventListener(type, handler, false); }
2016-10-22 16:44:18 834
原创 JavaScript 中 Browser 对象 常用API
API汇总链接重新加载页面API :location.reload();获取当前页面地址API :location.href打开新页面API :window.open("http://www.baidu.com");
2016-10-22 16:31:34 559
原创 cocos2d-JS - H5游戏开发 实时更新数据
在 index.html 里 红色方框内调用main.js 在用户浏览器中会存在缓存 想实现实时更新代码又保证不是每次都重载main.js 解决办法 :1. 新建的load.js 2. index.html 里面调用新建的load.js 3. load.js 后面带 Time 获取当前时间, 每次用户进入网页时都会因为版本号不一样重新加载 load.js 4. load.js 体积非常小
2016-10-17 18:08:12 2532
原创 cocos2d-JS 进阶主题 - JS到JAVA反射
如何在android平台上使用js直接调用Java方法在cocos2d-js 3.0beta中加入了一个新特性,在android平台上我们可以通过反射直接在js中调用java的静态方法。它的使用方法很简单:var o = jsb.reflection.callStaticMethod(className, methodName, methodSignature, parameters…) 在cal
2016-10-17 10:16:39 2641
原创 cocos2d - JS 修改 APK 包名
cocos2d - JS 修改 APK 包名 :找到对应路径原项目名字为 - test , 修改 string.xml修改完以后导出的APK包名 - LittleGirl注意 : 不能使用记事本修改 . (记事本保存格式会出问题)
2016-10-10 15:18:35 1149
Editor Console Pro 3.94
2018-01-23
Unity3D - CameraPlay插件
2017-09-22
cocos2d-js 如何监听到手机锁屏
2016-09-07
TA创建的收藏夹 TA关注的收藏夹
TA关注的人