Commit f5f93e3e authored by 张超's avatar 张超 🎱

转盘动画优化1:2圈打底>3圈打底 时间3>4S 2:点击按钮即开始动画

parent 8159675b
...@@ -36,11 +36,12 @@ export default class RotatePannel extends Panel { ...@@ -36,11 +36,12 @@ export default class RotatePannel extends Panel {
if (!this.check()) return; if (!this.check()) return;
this.closeBtns.forEach(btn => btn.touchEnabled = false); this.closeBtns.forEach(btn => btn.touchEnabled = false);
this['rotateStart'].touchEnabled = false; this['rotateStart'].touchEnabled = false;
this.showAnimation(3000, 720, false, egret.Ease.sineIn, null)
submitAfterDostart((status, data) => { submitAfterDostart((status, data) => {
let prizeName = data.lottery ? data.lottery.name : '' let prizeName = data.lottery ? data.lottery.name : ''
this.prizeIndex = this.optionList.findIndex(item => item.name === prizeName) this.prizeIndex = this.optionList.findIndex(item => item.name === prizeName)
let deg = this.prizeIndex > -1 ? 180 - this.prizeIndex * 45 : - 22.5 let deg = this.prizeIndex > -1 ? 180 - this.prizeIndex * 45 : - 22.5
this.showAnimation(3000, 720 + deg, false, egret.Ease.sineInOut, () => { this.showAnimation(4000, 1080 + deg, false, egret.Ease.sineOut, () => {
wait(300).then(() => { wait(300).then(() => {
if (gameIsWinning()) { if (gameIsWinning()) {
PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL); PanelCtrl.instance.show(ModuleTypes.PRIZE_PANEL);
......
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