Commit 7f385f06 authored by haiyoucuv's avatar haiyoucuv

Success Panel Effect!

parent 4b250249
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -28,8 +28,8 @@ export class SuccessPrizePanel extends Panel {
this.isShowing = true;
this.anchor.set(375, 812);
Tween.get(this)
.set({ scaleX: 0, scaleY: 0 })
.to({ scaleX: 1, scaleY: 1 }, 400, Ease.backOut)
.set({scaleX: 0, scaleY: 0})
.to({scaleX: 1, scaleY: 1}, 400, Ease.backOut)
.call(() => {
this.isShowing = false;
});
......@@ -92,22 +92,23 @@ export class SuccessPrizePanel extends Panel {
propLabel.text = '步数道具\tx1';
break;
}
this.tipsTex.text = '满星过关获得' + propLabel.text;
} else if (this.data.prize && this.data.prize.image) {
this.noPrizeAgainBtn.visible = false;
this.prop.visible = false;
this.prizeImg.texture = Texture.fromUrl(this.data.prize.image);
this.tipsTex.text = '闯关成功!获得抽大奖机会!';
}
}
private lightEffect() {
Tween.get(this.light1, { loop: true })
.set({ anchorX: 219.5, anchorY: 219.5 })
.to({ rotation: 360 }, 12000);
Tween.get(this.light1, {loop: true})
.set({anchorX: 219.5, anchorY: 219.5})
.to({rotation: 360}, 12000);
Tween.get(this.light2, { loop: true })
.set({ anchorX: 219.5, anchorY: 219.5 })
.to({ rotation: -360 }, 12000);
Tween.get(this.light2, {loop: true})
.set({anchorX: 219.5, anchorY: 219.5})
.to({rotation: -360}, 12000);
}
start(data) {
......@@ -118,7 +119,7 @@ export class SuccessPrizePanel extends Panel {
* 挑战满星
*/
private again() {
changeScene(MapScene, { level: this.data.level });
changeScene(MapScene, {level: this.data.level});
super.hidePanel();
}
......@@ -129,7 +130,7 @@ export class SuccessPrizePanel extends Panel {
if (this.data.level == 120) {
changeScene(MapScene);
} else {
changeScene(MapScene, { level: this.data.level + 1 });
changeScene(MapScene, {level: this.data.level + 1});
}
super.hidePanel();
}
......@@ -137,7 +138,7 @@ export class SuccessPrizePanel extends Panel {
public goPrize() {
// 去抽奖
changeScene(LotteryScene, { level: this.data.level })
changeScene(LotteryScene, {level: this.data.level})
super.hidePanel();
}
......
......@@ -54,13 +54,13 @@ export default class CheckBtn extends Container {
private _data: any = null;
public set data(data) {
this._data = data;
this.checkData.isPlayed = true;
if (!data) return;
if (!data.isVisitSuccess) return;
this.enabled = data.isVisitSuccess;
this.starCount = data.stars;
this.checkData = data;
this.checkData.isPlayed = true;
this._sendAwardType = data.sendAwardType;
}
......
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