发送自定义事件,事件名ClickWord。
this.dispatchEvent(new egret.Event("ClickWord", false, false, this)); //发送自定义事件
接收到自定义事件ClickWord后,执行箭头函数。
this.addEventListener("ClickWord", ()=>{}, this); //接受自定义事件
转载于:https://www.cnblogs.com/wuxingJS/p/10981306.html
原文链接:https://blog.csdn.net/weixin_30342827/article/details/96203903
本站声明:网站内容来源于网络,如有侵权,请联系我们,我们将及时处理。
还没有人抢沙发呢~