Commit f21d4bcf authored by Tt's avatar Tt

fix(play): 修复点击鱼时重复触发事件的问题

parent a108c58a
......@@ -975,15 +975,27 @@ export class PlayComponent implements OnInit, OnDestroy {
// 注册点击事件处理函数
this.subscribeMapDownEvent(fishId, () => {
if (!fish.ref.visible) return;
if (!fish['child_paopao_bg'].ref.visible) return;
this.g_enableMapDown = true;
if (this.touchFish) {
return;
}
if (!fish.ref.visible) {
return;
}
if (!fish['child_paopao_bg'].ref.visible) {
return;
}
console.log('fish click', fish);
// 点击气泡时执行brokePaopao方法
this.touchFish = fish;
this.brokePaopao(fish);
this.g_enableMapDown = true;
setTimeout(() => {
this.touchFish = null;
}, 100);
})
return fish;
}
private touchFish = null;
brokePaopao(fish) {
fish['child_paopao_bg'].ref.visible = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment