/*A是父节点,B是子节点
A和B都添加了鼠标监听
当点击子节点B的时候,不让鼠标事件穿透到A,那么在B的监听回调函数参数调用stopPropagation函数*/
this.on(Laya.Event.CLICK, this, (e: Laya.Event)=>{
e.stopPropagation();
})
/*A是父节点,B是子节点
A和B都添加了鼠标监听
当点击子节点B的时候,不让鼠标事件穿透到A,那么在B的监听回调函数参数调用stopPropagation函数*/
this.on(Laya.Event.CLICK, this, (e: Laya.Event)=>{
e.stopPropagation();
})