0
它在這裏回調函數在JavaScript
var CMenu = cc.Sprite.extend({
onClickCallback: null,
onClick: function (callback) {
this.onClickCallback = callback;
},
handleTouches: function (touch, evt) {
(this.hovered && this.onClickCallback) && this.onClickCallback();});
定義它正在這裏叫做
backMenu.onClick(function() {
window.location.href = "http://www.test.com";
});
是this.onClickCallback = this.onClickCallback()
?