|
|
@@ -64,12 +64,12 @@ export default class Turnable extends cc.Component {
|
|
|
this.audioId = await mk.audio.playEffect("turnableplay", true);
|
|
|
this.btn_close.getComponent(BtnClosePanel).block_click = true;
|
|
|
|
|
|
- this.perAdd = 10
|
|
|
- this.node_turn.angle += 360 * 5
|
|
|
- this.endAngle = index * -60
|
|
|
- this.slowAngle = this.endAngle + this.slowDis
|
|
|
- this.perMinus = this.perAdd / (this.slowDis / (this.perAdd * 0.5))
|
|
|
- this.startDraw = true
|
|
|
+ this.perAdd = 10;
|
|
|
+ this.node_turn.angle += 360 * 5;
|
|
|
+ this.endAngle = index * -60;
|
|
|
+ this.slowAngle = this.endAngle + this.slowDis;
|
|
|
+ this.perMinus = this.perAdd / (this.slowDis / (this.perAdd * 0.5));
|
|
|
+ this.startDraw = true;
|
|
|
|
|
|
// this.node_turn.angle = 1800;
|
|
|
// let tar = index * 60;
|
|
|
@@ -101,19 +101,19 @@ export default class Turnable extends cc.Component {
|
|
|
}
|
|
|
|
|
|
if (this.startDraw) {
|
|
|
- this.node_turn.angle -= this.perAdd
|
|
|
+ this.node_turn.angle -= this.perAdd;
|
|
|
//开始减速
|
|
|
if (this.node_turn.angle <= this.slowAngle) {
|
|
|
if (this.perAdd <= this.perMinus * 4) {
|
|
|
- this.perAdd -= this.perMinus * 0.01
|
|
|
+ this.perAdd -= this.perMinus * 0.01;
|
|
|
}
|
|
|
else {
|
|
|
- this.perAdd -= this.perMinus
|
|
|
+ this.perAdd -= this.perMinus;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if (this.node_turn.angle <= this.endAngle) {
|
|
|
- this.startDraw = false
|
|
|
+ this.startDraw = false;
|
|
|
}
|
|
|
}
|
|
|
}
|