Laya.loader.load("resources/zxfish/chargeLuck/spine/fuyyun_lb.json", Laya.Loader.SPINE).then((template: Laya.SpineTemplet) => {
this.spineBg.templet = template;
this.spineBg.on(Laya.Event.LABEL, this, (event: any)=>{
if (event.name == "idle2") {
this.mainPanel.scale(0.1, 0.1, true);
this.mainPanel.visible = true;
let callBack = Laya.Handler.create(this, ()=>{
this.spineBg.play("idle2", true);
}, null);
Laya.Tween.to(this.mainPanel, { scaleX: 1, scaleY: 1 }, 233, Laya.Ease.linearNone, callBack);
}
});
this.spineBg.playbackRate(0.5);
this.spineBg.visible = true;
this.spineBg.play("idle", false);
});
//第一个动画播放完, 播放第二个
this.bgSpine.on(Laya.Event.STOPPED, this, (event: any)=>{
this.bgSpine.play("idle2", true);
});