我在子结点上 派发事件
this.node.dispatchEvent(new cc.Event.EventCustom(‘acOver’, true));
是一个动画 播完后派发的事件
然后父结点侦听
this.node.on(‘acOver’, function (event) {
cc.log("收到事件over "+event);
event.stopPropagation();
});
为什么无法接收到事件 不是说 dispatchEvent是可以冒泡的么
我在子结点上 派发事件
this.node.dispatchEvent(new cc.Event.EventCustom(‘acOver’, true));
是一个动画 播完后派发的事件
然后父结点侦听
this.node.on(‘acOver’, function (event) {
cc.log("收到事件over "+event);
event.stopPropagation();
});
为什么无法接收到事件 不是说 dispatchEvent是可以冒泡的么
用cc.systemEvent吧
不是说不建议用这个 systemEvent吗
一直在建议使用这个不是么