Small fixes

This commit is contained in:
ckcz123 2021-09-16 14:31:53 +08:00
parent 1fab8b94f4
commit cbbd078c25
3 changed files with 8 additions and 4 deletions

View File

@ -993,9 +993,9 @@ events.prototype.doAction = function () {
core.status.event.interval = null;
delete core.status.event.aniamteUI;
if (core.status.gameOver || core.status.replay.failed) return;
core.clearUI();
// 判定是否执行完毕
if (this._doAction_finishEvents()) return;
core.clearUI();
var floorId = core.status.event.data.floorId || core.status.floorId;
// 当前点坐标和前缀
var x = core.status.event.data.x, y = core.status.event.data.y;
@ -1016,6 +1016,7 @@ events.prototype.doAction = function () {
}
events.prototype._doAction_finishEvents = function () {
if (core.status.event.id != 'action') return true;
// 事件处理完毕
if (core.status.event.data.list.length == 0) {
// 检测并执行延迟自动事件
@ -1535,7 +1536,7 @@ events.prototype._action_animate = function (data, x, y, prefix) {
}
events.prototype._action_stopAnimate = function (data, x, y, prefix) {
core.stopAnimate(data.doCallback);
core.stopAnimate(null, data.doCallback);
core.doAction();
}

View File

@ -1780,8 +1780,9 @@ maps.prototype._drawThumbnail_realDrawTempCanvas = function (floorId, blocks, op
options.heroIcon = core.getMappedName(options.heroIcon);
var icon = core.material.icons.hero[options.heroLoc.direction];
var height = core.material.images.images[options.heroIcon].height / 4;
core.drawImage(options.ctx, core.material.images.images[options.heroIcon], icon.stop * 32, icon.loc * height, 32, height,
32 * options.heroLoc.x, 32 * options.heroLoc.y + 32 - height, 32, height);
var width = core.material.images.images[options.heroIcon].width || 32;
core.drawImage(options.ctx, core.material.images.images[options.heroIcon], icon.stop * width, icon.loc * height, width, height,
32 * options.heroLoc.x + 32 - width, 32 * options.heroLoc.y + 32 - height, width, height);
}
// 缩略图:前景
this.drawFg(floorId, options);

View File

@ -149,6 +149,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
var bgm = core.status.maps[floorId].bgm;
if (bgm instanceof Array) bgm = bgm[Math.floor(Math.random() * bgm.length)]; // 多个bgm则随机播放一个
if (!core.hasFlag("__bgm__")) core.playBgm(bgm);
} else if (fromLoad && !core.hasFlag("__bgm__")) {
core.pauseBgm();
}
// 更改画面色调
var color = core.getFlag('__color__', null);