获取Button脚本挂载的事件名

(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();        }    };})();
相关文章
相关标签/搜索