|
@@ -20,6 +20,12 @@ export default class Turnable extends cc.Component {
|
|
|
@property(cc.RichText)
|
|
@property(cc.RichText)
|
|
|
lbl_left: cc.RichText = null;
|
|
lbl_left: cc.RichText = null;
|
|
|
|
|
|
|
|
|
|
+ @property(cc.ParticleSystem)
|
|
|
|
|
+ starAni: cc.ParticleSystem = null;
|
|
|
|
|
+
|
|
|
|
|
+ @property(sp.Skeleton)
|
|
|
|
|
+ baozhaAni: sp.Skeleton = null;
|
|
|
|
|
+
|
|
|
private audioId: number;
|
|
private audioId: number;
|
|
|
|
|
|
|
|
private endAngle = 0
|
|
private endAngle = 0
|
|
@@ -30,6 +36,7 @@ export default class Turnable extends cc.Component {
|
|
|
private perMinus = 0
|
|
private perMinus = 0
|
|
|
|
|
|
|
|
onLoad() {
|
|
onLoad() {
|
|
|
|
|
+ this.baozhaAni.node.active = false;
|
|
|
this.initData();
|
|
this.initData();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -71,6 +78,9 @@ export default class Turnable extends cc.Component {
|
|
|
this.perMinus = this.perAdd / (this.slowDis / (this.perAdd * 0.5));
|
|
this.perMinus = this.perAdd / (this.slowDis / (this.perAdd * 0.5));
|
|
|
this.startDraw = true;
|
|
this.startDraw = true;
|
|
|
|
|
|
|
|
|
|
+ this.starAni.resetSystem()
|
|
|
|
|
+ this.starAni.node.active = true
|
|
|
|
|
+
|
|
|
// this.node_turn.angle = 1800;
|
|
// this.node_turn.angle = 1800;
|
|
|
// let tar = index * 60;
|
|
// let tar = index * 60;
|
|
|
// cc.tween(this.node_turn)
|
|
// cc.tween(this.node_turn)
|
|
@@ -78,10 +88,12 @@ export default class Turnable extends cc.Component {
|
|
|
// .call(this.playOver, this).start();
|
|
// .call(this.playOver, this).start();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- private playOver() {
|
|
|
|
|
|
|
+ private async playOver() {
|
|
|
mk.audio.stopEffect(this.audioId);
|
|
mk.audio.stopEffect(this.audioId);
|
|
|
this.btn_close.getComponent(BtnClosePanel).block_click = false;
|
|
this.btn_close.getComponent(BtnClosePanel).block_click = false;
|
|
|
|
|
+ mk.audio.playEffect("turnplateDrawEnd");
|
|
|
this.updateLeftTimes();
|
|
this.updateLeftTimes();
|
|
|
|
|
+ await mk.time.WaitForSeconds(0.7);
|
|
|
mk.ui.openPanel("module/reward/reward");
|
|
mk.ui.openPanel("module/reward/reward");
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -114,6 +126,9 @@ export default class Turnable extends cc.Component {
|
|
|
|
|
|
|
|
if (this.node_turn.angle <= this.endAngle) {
|
|
if (this.node_turn.angle <= this.endAngle) {
|
|
|
this.startDraw = false;
|
|
this.startDraw = false;
|
|
|
|
|
+ this.starAni.node.active = false
|
|
|
|
|
+ this.baozhaAni.node.active = true
|
|
|
|
|
+ this.baozhaAni.setAnimation(0, 'animation', false)
|
|
|
this.playOver();
|
|
this.playOver();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|