lastAsyncId

This commit is contained in:
ckcz123 2021-09-02 21:13:15 +08:00
parent 11a981e4da
commit 265bf64e5e
5 changed files with 27 additions and 1 deletions

View File

@ -911,6 +911,7 @@ control.prototype.setHeroOpacity = function (opacity, moveMode, time, callback)
}
}, 10);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = callback;
}
@ -1031,6 +1032,7 @@ control.prototype.moveViewport = function (x, y, moveMode, time, callback) {
}
}, per_time);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = callback;
}
@ -2759,6 +2761,7 @@ control.prototype._setCurtain_animate = function (nowColor, color, time, moveMod
}
}, per_time);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = cb;
}

View File

@ -54,7 +54,8 @@ function core() {
'sun': null
},
"tip": null,
"asyncId": {}
"asyncId": {},
"lastAsyncId": null
}
this.musicStatus = {
'audioContext': null, // WebAudioContext

View File

@ -600,6 +600,8 @@ events.prototype._openDoor_animate = function (block, x, y, callback) {
}
core.maps._drawBlockInfo(blockInfo, x, y);
}, core.status.replay.speed == 24 ? 1 : speed / Math.max(core.status.replay.speed, 1));
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = cb;
}
@ -3184,6 +3186,8 @@ events.prototype._moveTextBox_moving = function (ctx, moveInfo, callback) {
if (callback) callback();
}
}, 10);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = callback;
}
@ -3248,6 +3252,8 @@ events.prototype.closeDoor = function (x, y, id, callback) {
}
core.maps._drawBlockInfo(blockInfo, x, y);
}, core.status.replay.speed == 24 ? 1 : speed / Math.max(core.status.replay.speed, 1));
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = cb;
}
@ -3357,6 +3363,8 @@ events.prototype._moveImage_moving = function (name, moveInfo, callback) {
if (callback) callback();
}
}, per_time);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = callback;
}
@ -3400,6 +3408,8 @@ events.prototype._rotateImage_rotating = function (name, rotateInfo, callback) {
if (callback) callback();
}
}, per_time);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = callback;
}
@ -3459,6 +3469,8 @@ events.prototype._scaleImage_scale = function (ctx, scaleInfo, callback) {
if (callback) callback();
}
}, per_time);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = callback;
}
@ -3506,6 +3518,8 @@ events.prototype.setVolume = function (value, time, callback) {
if (callback) callback();
}
}, per_time);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = callback;
}
@ -3541,6 +3555,7 @@ events.prototype.vibrate = function (direction, time, speed, power, callback) {
}
}, 10);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = cb;
}
@ -3600,6 +3615,7 @@ events.prototype.eventMoveHero = function(steps, time, callback) {
}
}, core.status.replay.speed == 24 ? 1 : time / 8 / core.status.replay.speed);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = cb;
}
_run();
@ -3674,6 +3690,7 @@ events.prototype._jumpHero_doJump = function (jumpInfo, callback) {
}
}, jumpInfo.per_time);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = cb;
}

View File

@ -2622,6 +2622,8 @@ maps.prototype._moveBlock_doMove = function (blockInfo, canvases, moveInfo, call
else
core.maps._moveJumpBlock_finished(blockInfo, canvases, moveInfo, animate, cb);
}, moveInfo.per_time);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = cb;
}
_run();
@ -2754,6 +2756,7 @@ maps.prototype._jumpBlock_doJump = function (blockInfo, canvases, jumpInfo, call
core.maps._moveJumpBlock_finished(blockInfo, canvases, jumpInfo, animate, cb);
}, jumpInfo.per_time);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = cb;
}
@ -2832,6 +2835,7 @@ maps.prototype._animateBlock_doAnimate = function (loc, list, type, time, callba
}
}, 10);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = cb;
}

View File

@ -1683,6 +1683,7 @@ ui.prototype._drawScrollText_animate = function (ctx, time, callback) {
core.drawImage('ui', ctx.canvas, 0, currH);
}, per_time);
core.animateFrame.lastAsyncId = animate;
core.animateFrame.asyncId[animate] = callback;
}