[LayaAirIDE 2.0]popup设置了关闭效果后,窗口关闭但遮罩层没有关掉,请问如何处理
popup设置了关闭效果后,窗口关闭但遮罩层没有关掉,请问如何处理
//关闭效果
hideEffect(): void {
Laya.Tween.to(this,{y:Laya.stage.height,alpha:0},200,Laya.Ease.linearIn);
}
//关闭效果
hideEffect(): void {
Laya.Tween.to(this,{y:Laya.stage.height,alpha:0},200,Laya.Ease.linearIn);
}
import { ui } from "./ui/layaMaxUI";
export default class ShopDialog extends ui.ShopDialogUI {
constructor() {
super();
this.popupEffect = Laya.Handler.create(this, this.showEffect);
this.closeEffect = Laya.Handler.create(this, this.hideEffect);
this.btnClose.on(Laya.Event.CLICK, this, this.closeDialog);
}
//关闭
closeDialog(): void {
this.close();
}
//关闭效果
hideEffect(): void {
Laya.Tween.to(this,{y:Laya.stage.height,alpha:0},200,Laya.Ease.linearIn);
}
//显示效果
showEffect(): void {
this.pos(0, Laya.stage.height);
Laya.Tween.to(this, { y: Laya.stage.height - this.height, alpha: 1 }, 200, Laya.Ease.linearIn);
}
}
没有找到相关结果
已邀请:
要回复问题请先登录
1 个回复
网购时代
赞同来自: