From 271ac7b4dd6ca20943bae929c4e689a963160df0 Mon Sep 17 00:00:00 2001 From: oc Date: Thu, 18 Apr 2019 10:34:48 +0800 Subject: [PATCH] _trigger action --- libs/events.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/events.js b/libs/events.js index af57af2e..12b893cb 100644 --- a/libs/events.js +++ b/libs/events.js @@ -287,8 +287,12 @@ events.prototype.doSystemEvent = function (type, data, callback) { ////// 触发(x,y)点的事件 ////// events.prototype._trigger = function (x, y) { - // 如果已经死亡,或正处于某事件中,则忽略 - if (core.status.gameOver || core.status.event.id) return; + if (core.status.gameOver) return; + if (core.status.event.id == 'action') { + core.insertAction({"type": "trigger", "loc": [x, y]}, x, y, null, true); + return; + } + if (core.status.event.id) return; var block = core.getBlock(x, y); if (block == null) return;