Laya.timer.once(1000, this, this.a)
}
private a ()
{
let a:Sprite = Laya.stage.getChildAt(0).getChildAt(0).getChildByName("A") as Sprite;
let b:Sprite = Laya.stage.getChildAt(0).getChildAt(0).getChildByName("B") as Sprite;
b.removeSelf();
a.mask = b;
}
4 个回复
熊猫大侠
赞同来自:
onConfigLoaded(): void {
//加载IDE指定的场景
GameConfig.startScene && Laya.Scene.open(GameConfig.startScene);
Laya.timer.once(1000, this, this.a)
}
private a ()
{
let a:Sprite = Laya.stage.getChildAt(0).getChildAt(0).getChildByName("A") as Sprite;
let b:Sprite = Laya.stage.getChildAt(0).getChildAt(0).getChildByName("B") as Sprite;
b.removeSelf();
a.mask = b;
}
Laya_XS
赞同来自:
如果只显示A这个叫抠图,比如这个效果:https://layaair2.ldc2.layabox.com/demo2/?language=zh&category=2d&group=Sprite&name=MagnifyingGlass
你确定下你想要的是哪个效果?
熊猫大侠
赞同来自:
qzzz
赞同来自: