(function(){
var Super = function(){};
Super.prototype = cc.Button.prototype;
//实例化原型
Super.prototype._onTouchEnded = function (t) {
if (this.interactable && this.enabledInHierarchy) {
var callback = t.currentTarget._bubblingListeners._callbackTable.touchend.targets[0].clickEvents.length;
if(callback != 0){
cc.hb.audioMgr.playEffect("click", false);//播放Button音效
}
//t.currentTarget._bubblingListeners._callbackTable.touchend.targets[0].clickEvents[0].handler//获取Button脚本挂载的事件名
if (this._pressed) {
cc.Component.EventHandler.emitEvents(this.clickEvents, t);
this.node.emit("click", this);
}
this._pressed = !1;
this._updateState();
t.stopPropagation();
}
};
})();

相关文章:

  • 2021-05-28
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-24
猜你喜欢
  • 2022-02-25
  • 2021-07-06
  • 2021-07-22
  • 2022-02-07
  • 2022-12-23
  • 2022-02-16
  • 2021-10-15
相关资源
相似解决方案