[0]求教,Laya.Animation这个组件添加到舞台不能点击吗?
求教,Laya.Animation这个组件添加到舞台不能点击,click事件添加到舞台上也响应不了,如何能让这个响应点击呢?
let roleAni = new Laya.Animation();
let url = "resources/skillEffect/anhei_huoqiushu.atlas"
roleAni.loadAtlas(url)
roleAni.mouseEnabled = true;
roleAni.x = roleAni.y = 200;
Laya.stage.addChild(roleAni)
roleAni.on(Laya.Event.CLICK,this,()=>{
console.log("aaaaaaaaaaaaaaaaaaaaaa")
})
roleAni.play();
Laya.stage.on(Laya.Event.CLICK,this.stageClick)
let roleAni = new Laya.Animation();
let url = "resources/skillEffect/anhei_huoqiushu.atlas"
roleAni.loadAtlas(url)
roleAni.mouseEnabled = true;
roleAni.x = roleAni.y = 200;
Laya.stage.addChild(roleAni)
roleAni.on(Laya.Event.CLICK,this,()=>{
console.log("aaaaaaaaaaaaaaaaaaaaaa")
})
roleAni.play();
Laya.stage.on(Laya.Event.CLICK,this.stageClick)
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
phhh
赞同来自: