sslin

岁月匆匆,偶尔记录些做过的事情

导航

04 2013 档案

cocos2d-x jsb 的本地存储
摘要:之前在C++ Framework中使用的CCUserDefault的系列函数,在jsb绑定集中没有找到,查了最新的2.1.2 hotfix版本也没有,上github看了即将发布的2.1.3中也没有;之后在TestJavascript中的Sys Test中找到了LocalStorage的解决方案;和CCUserDefault一样使用键值对应的存储:var ls = sys.localStorage;ls.setItem("a",1);var r = ls.getItem("a");ls.removeItem("a");若键名不存在,则可 阅读全文

posted @ 2013-04-26 17:22 sslin 阅读(695) 评论(0) 推荐(0)

cocos2d-x 2.1.1 jsbinding 游戏帧数下降问题记录
摘要:游戏在主循环中增加了一个复杂的碰撞检查后,开始出现掉帧,怪物元素量大时,原本60的fps只剩20~30之间;引用cocos2d官方的一段话:Basically all the cocos2d-iphone, Chipmunk or CocosBuilder Reader APIs are going to perform almost at native speed. But you should pay attention to the following scenarios:The performance could be slow down while the garbage colle 阅读全文

posted @ 2013-04-03 17:20 sslin 阅读(638) 评论(0) 推荐(0)