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