Browse Source

修改按钮样式

master
song 4 years ago
parent
commit
7065b451ef
  1. BIN
      public/RECOVER_source-code.fla
  2. BIN
      public/images/Bitmap1.png
  3. BIN
      public/images/Bitmap2.png
  4. BIN
      public/images/Bitmap3.png
  5. BIN
      public/images/Bitmap4.png
  6. BIN
      public/images/Bitmap5.png
  7. BIN
      public/images/stopDemopng复制.png
  8. BIN
      public/images/suspend.png
  9. BIN
      public/images/任务完成_.png
  10. BIN
      public/images/倒计时_.png
  11. BIN
      public/images/再来一次_.png
  12. BIN
      public/images/计时_.png
  13. BIN
      public/images/返回按钮_.png
  14. BIN
      public/source-code.fla
  15. 110
      public/source-code.js
  16. 12
      src/classes/main.js

BIN
public/RECOVER_source-code.fla

Binary file not shown.

BIN
public/images/Bitmap1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
public/images/Bitmap2.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 21 KiB

BIN
public/images/Bitmap3.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 22 KiB

BIN
public/images/Bitmap4.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 22 KiB

BIN
public/images/Bitmap5.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 18 KiB

BIN
public/images/stopDemopng复制.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

BIN
public/images/suspend.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.9 KiB

BIN
public/images/任务完成_.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 76 KiB

BIN
public/images/倒计时_.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 39 KiB

BIN
public/images/再来一次_.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 28 KiB

BIN
public/images/计时_.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
public/images/返回按钮_.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

After

Width:  |  Height:  |  Size: 9.0 KiB

BIN
public/source-code.fla

Binary file not shown.

110
public/source-code.js

File diff suppressed because one or more lines are too long

12
src/classes/main.js

@ -49,7 +49,15 @@ Main.prototype.init = function () {
// 游戏状态在进行中才能触发
// play次数 >= 最多完成次数 调用结束的callback
Main.prototype.play = function (direction) {
if (Date.now() - this.prevTime <= 1200 || state !== 1) return;
if (direction === 0) {
if (Date.now() - this.prevTime <= 1500 || state !== 1) return;
}
if (direction === 1) {
if (Date.now() - this.prevTime <= 2800 || state !== 1) return;
}
if (direction === 2) {
if (Date.now() - this.prevTime <= 1500 || state !== 1) return;
}
// if (state !== 1) return;
this.element.play();
// 一进来动画移动到指定位置
@ -58,6 +66,7 @@ Main.prototype.play = function (direction) {
this.times += 1;
this.computeScore(this.times, direction);
window.soundInstance.playBomb(direction);
this.prevTime = Date.now();
if (this.times >= this.max) {
@ -75,7 +84,6 @@ Main.prototype.computeScore = function (times, direction = 0) {
const directionTarget = config.config.scores.find(item => item.direction === direction);
config.currentTimes = times;
config.currentScore += directionTarget.score;
window.soundInstance.playBomb(direction);
if (config.mode === 0) {
sendMessage({ event: 'play', data: { currentTimes: times, currentScore: config.currentScore } });
}

Loading…
Cancel
Save