獲取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();        }    };})();
相關文章
相關標籤/搜索