diff --git a/libs/control.js b/libs/control.js index 709c3d55..f1b2c5b6 100644 --- a/libs/control.js +++ b/libs/control.js @@ -863,6 +863,8 @@ control.prototype.jumpHero = function (ex, ey, time, callback) { core.setAlpha('ui', 1.0); core.status.replay.animate=true; + core.playSound('jump.mp3'); + var dx = ex-sx, dy=ey-sy, distance = Math.round(Math.sqrt(dx * dx + dy * dy)); var jump_peak = 6 + distance, jump_count = jump_peak * 2; var currx = sx, curry = sy; diff --git a/libs/events.js b/libs/events.js index 9f639825..d69b7a4c 100644 --- a/libs/events.js +++ b/libs/events.js @@ -85,12 +85,14 @@ events.prototype.startGame = function (hard) { if (core.flags.showBattleAnimateConfirm) { // 是否提供“开启战斗动画”的选择项 core.status.event.selection = core.flags.battleAnimate ? 0 : 1; core.ui.drawConfirmBox("你想开启战斗动画吗?\n之后可以在菜单栏中开启或关闭。\n(强烈建议新手开启此项)", function () { + core.data.flags.battleAnimate = true; core.flags.battleAnimate = true; core.setLocalStorage('battleAnimate', true); core.startGame(hard); core.utils.__init_seed(); core.events.setInitData(hard); }, function () { + core.data.flags.battleAnimate = false; core.flags.battleAnimate = false; core.setLocalStorage('battleAnimate', false); core.startGame(hard); diff --git a/libs/maps.js b/libs/maps.js index 8d200918..cdfd6b36 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -675,7 +675,7 @@ maps.prototype.jumpBlock = function(sx,sy,ex,ey,time,immediateHide,callback) { core.setOpacity('animate', opacityVal); core.canvas.animate.drawImage(blockImage, 0, blockIcon * height, 32, height, block.x * 32, block.y * 32 +32 - height, 32, height); - core.playSound('jump.ogg'); + core.playSound('jump.mp3'); var dx = ex-sx, dy=ey-sy, distance = Math.round(Math.sqrt(dx * dx + dy * dy)); var jump_peak = 6 + distance, jump_count = jump_peak * 2; diff --git a/project/data.js b/project/data.js index c6cab035..6a33d6e3 100644 --- a/project/data.js +++ b/project/data.js @@ -14,7 +14,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d = 'bgm.mp3' ], "sounds" : [ - 'floor.mp3', 'attack.mp3', 'door.mp3', 'item.mp3', 'zone.mp3' + 'floor.mp3', 'attack.mp3', 'door.mp3', 'item.mp3', 'zone.mp3', 'jump.mp3' ], "startBackground" : "bg.jpg", "startLogoStyle" : "color: black", diff --git a/project/sounds/jump.mp3 b/project/sounds/jump.mp3 new file mode 100644 index 00000000..b8ce8f78 Binary files /dev/null and b/project/sounds/jump.mp3 differ