1. C++中 userdefault 数据用 localstorage 存
2. C++中dictionary用{}存,并用 cc._plistLoader.load(res.static_data_plist)解析plist数据注意异步同步问题;
3. C++中有些构造函数参数位置不同
4. C++中SimpleAudio用cc.audioengine换
5. C++中gl用cc._renderContext换
6. C++中继承Object的改为继承cc.Class.extend({})
7. jsb中有html5没有的api不能用会报错
8. array 如果初始化容量,使用push默认增加容量
9. 使用spritecache初始化sprite
var background = cc.Sprite.create("#background.png");
10.加入spritecache
cc.spriteFrameCache.addSpriteFrames(res.fishingjoy_resource_plist);
11. Animate 是 action, Animation 继承class,后者作为前者初始化的参数
var fishAnimation = cc.animationCache.getAnimation(animationName);
var fishAnimate = cc.Animate.create(fishAnimation);
fishAnimate.setTag(FishAction.k_Action_Animate);
12.别忘了初始化node
cc.Node.prototype.init.call(this)
13 .MenuItemSprite初始化只有4个参数时,控制台显示重复添加sprite信息 (若只有4个参数)
var start = cc.MenuItemSprite.create(cc.Sprite.create("#start_normal.png"),cc.Sprite.create("#start_selected.png"),cc.Sprite.create("#start_selected.png"),this.transition,this);
14 数组foreach 加this 上下文,否则中间使用this 为 undefined
15 事件用event.getCurrentTarget()获取加入监听的对象
16. parseInt, Math.floor() 处理整数
17.var callFunc = cc.CallFunc.create(this.getParent().end, this.getParent()); 第二个参数决定前面调用方法所用的上下文(this)