From a31991c16a91dca7e05f7c3d3393fafebbff96c8 Mon Sep 17 00:00:00 2001 From: oc Date: Wed, 18 Apr 2018 14:08:31 +0800 Subject: [PATCH] Replay & Sleep --- _server/blockly/MotaAction.g4 | 4 ++-- libs/events.js | 11 ++++++++--- project/functions.js | 2 +- 更新说明.txt | 1 + 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/_server/blockly/MotaAction.g4 b/_server/blockly/MotaAction.g4 index eb9f3578..dc9c1e17 100644 --- a/_server/blockly/MotaAction.g4 +++ b/_server/blockly/MotaAction.g4 @@ -712,7 +712,7 @@ return code; */ win_s - : '游戏胜利,原因' ':' EvalString? Newline + : '游戏胜利,结局' ':' EvalString? Newline ; /* win_s @@ -724,7 +724,7 @@ return code; */ lose_s - : '游戏失败,原因' ':' EvalString? Newline + : '游戏失败,结局' ':' EvalString? Newline ; /* lose_s diff --git a/libs/events.js b/libs/events.js index d1d96eb8..67c8dbcd 100644 --- a/libs/events.js +++ b/libs/events.js @@ -472,7 +472,8 @@ events.prototype.doAction = function() { this.doAction(); break; case "playSound": - core.playSound(data.name); + if (!core.status.replay.replaying) + core.playSound(data.name); this.doAction(); break; case "playBgm": @@ -600,9 +601,13 @@ events.prototype.doAction = function() { this.doAction(); break; case "sleep": // 等待多少毫秒 - setTimeout(function () { + if (core.status.replay.replaying) core.events.doAction(); - }, data.time); + else { + setTimeout(function () { + core.events.doAction(); + }, data.time); + } break; case "revisit": // 立刻重新执行该事件 var block=core.getBlock(x,y); // 重新获得事件 diff --git a/project/functions.js b/project/functions.js index 03d7c3f0..ad3567e3 100644 --- a/project/functions.js +++ b/project/functions.js @@ -73,7 +73,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = core.stopReplay(); core.waitHeroToStop(function() { core.drawText([ - "\t[结局1]你死了。\n如题。" + "\t["+(reason||"结局1")+"]你死了。\n如题。" ], function () { core.events.gameOver(null, replaying); }); diff --git a/更新说明.txt b/更新说明.txt index e97f2ba6..f966670a 100644 --- a/更新说明.txt +++ b/更新说明.txt @@ -8,6 +8,7 @@ APP端也能下载录像 地图临界显伤 √ 单个存档清理 √ 大数据魔塔的支持(临界计算等) √ +进一步对JS文件进行压缩 修复有时候无法输入ID的问题 √ 其他细节优化