一、MarkDown的使用
signout: function (msg, data) {
this.signOutClear();
var ask = new hope.AskDialog(msg.promptTips, this._doRelogin, this);
ask.setIsBgShow(true)
ask.setOKInfo("重新连接");
ask.setTitle("提示")
ask.hideCancel();
},
var Hero = cc.Sprite.extend({
_hp:null,
_mp:null,
ctor: function(hp,mp){
this._super(“res/box.png”);
this.initData(hp,mp);
},
initData: function(hp,mp){
this._hp = hp;
this._mp = mp;
},
unuse: function(){
this._hp = 0; //属性清空
this._mp = 0;
this.retain(); //保存 防止被回收
this.removeFromParent();
},
reuse: function(hp,mp){
this.initData(hp,mp);
}
});