Replay & Sleep
This commit is contained in:
parent
fb49b62cd1
commit
a31991c16a
@ -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
|
||||
|
||||
@ -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); // 重新获得事件
|
||||
|
||||
@ -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);
|
||||
});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user