This commit is contained in:
ckcz123 2021-03-03 17:32:34 +08:00
parent 51fd30c14c
commit f16f9b5855
3 changed files with 8 additions and 6 deletions

View File

@ -452,8 +452,9 @@ actions.prototype._sys_keyUp = function (keyCode, altKey) {
////// 点击(触摸)事件按下时 //////
actions.prototype.ondown = function (loc) {
var x = parseInt(loc.x / loc.size), y = parseInt(loc.y / loc.size);
var px = parseInt(loc.x / core.domStyle.scale), py = parseInt(loc.y / core.domStyle.scale);
var lx = Math.max(loc.x, 0), ly = Math.max(loc.y, 0);
var x = parseInt(lx / loc.size), y = parseInt(ly / loc.size);
var px = parseInt(lx / core.domStyle.scale), py = parseInt(ly / core.domStyle.scale);
this.doRegisteredAction('ondown', x, y, px, py);
}

View File

@ -518,8 +518,9 @@ control.prototype._setAutomaticRoute_isMoving = function (destX, destY) {
control.prototype._setAutomaticRoute_isTurning = function (destX, destY, stepPostfix) {
if (destX == core.status.hero.loc.x && destY == core.status.hero.loc.y && stepPostfix.length==0) {
if (core.timeout.turnHeroTimeout==null) {
var routeLength = core.status.route.length;
core.timeout.turnHeroTimeout = setTimeout(function() {
core.turnHero();
if (core.status.route.length == routeLength) core.turnHero();
clearTimeout(core.timeout.turnHeroTimeout);
core.timeout.turnHeroTimeout = null;
}, 250);
@ -974,7 +975,7 @@ control.prototype.moveViewport = function (x, y, time, callback) {
return;
}
var px = core.clamp(32 * x, 0, 32 * core.bigmap.width - core.__PIXELS__);
var py = core.clamp(32 * y, 0, 32 * core.bigmap.width - core.__PIXELS__);
var py = core.clamp(32 * y, 0, 32 * core.bigmap.height - core.__PIXELS__);
var dx = (px - core.bigmap.offsetX) / step, dy = (py - core.bigmap.offsetY) / step;
var animate=window.setInterval(function() {
@ -1389,7 +1390,7 @@ control.prototype.rewindReplay = function () {
"animate": false,
"toReplay": data.replay.toReplay,
"totalList": data.replay.totalList,
"speed": data.replay.speed,
"speed": core.status.replay.speed,
"steps": data.replay.steps,
"save": save
}
@ -1548,7 +1549,6 @@ control.prototype._replay_save = function () {
core.status.replay.save.push({"data": core.saveData(), "replay": {
"totalList": core.cloneArray(core.status.replay.totalList),
"toReplay": core.cloneArray(core.status.replay.toReplay),
"speed": core.status.replay.speed,
"steps": core.status.replay.steps
}});
}

View File

@ -1724,6 +1724,7 @@ maps.prototype.showBlock = function (x, y, floorId) {
if (block.disable) {
block.disable = false;
core.setMapBlockDisabled(floorId, x, y, false);
this._updateMapArray(floorId, block.x, block.y);
// 在本层,添加动画
if (floorId == core.status.floorId) {
if (block.event.cls == 'autotile') {