TypeScript白鷺引擎Egret防止按鈕事件冒泡穿透

 

this.addEventListener(egret.TouchEvent.TOUCH_BEGIN, (event) => {
                if (event.target!=this) return;//防止按鈕事件冒泡穿透
               
                this.isCancelTap = false;
            }, this)
相關文章
相關標籤/搜索