更新录像系统

This commit is contained in:
ckcz123 2020-05-23 15:43:04 +08:00
parent 28535a74d3
commit b9957b51a4
4 changed files with 5 additions and 43 deletions

View File

@ -232,10 +232,7 @@ editor_mappanel_wrapper = function (editor) {
// 左键拖拽: 交换
//tip.whichShow(1);
// editor.movePos(editor.uivalues.startPos, editor.uivalues.endPos);
if (editor.layerMod == 'map')
editor.exchangePos(editor.uivalues.startPos, editor.uivalues.endPos);
else
editor.exchangeBgFg(editor.uivalues.startPos, editor.uivalues.endPos, editor.layerMod);
editor.exchangePos(editor.uivalues.startPos, editor.uivalues.endPos);
editor.uifunctions.unhighlightSaveFloorButton();
editor.dom.euiCtx.clearRect(0, 0, core.__PIXELS__, core.__PIXELS__);
}
@ -973,42 +970,6 @@ editor_mappanel_wrapper = function (editor) {
}
}
editor.constructor.prototype.moveBgFg = function (startPos, endPos, name, callback) {
if (!startPos || !endPos || ["bgmap","fgmap"].indexOf(name)<0) return;
if (startPos.x == endPos.x && startPos.y == endPos.y) return;
editor[name][endPos.y][endPos.x] = editor[name][startPos.y][startPos.x];
editor[name][startPos.y][startPos.x] = 0;
editor.updateMap();
editor.file.saveFloorFile(function (err) {
if (err) {
printe(err);
throw(err)
}
;printf('移动图块成功');
editor.drawPosSelection();
if (callback) callback();
});
}
editor.constructor.prototype.exchangeBgFg = function (startPos, endPos, name, callback) {
if (!startPos || !endPos || ["bgmap","fgmap"].indexOf(name)<0) return;
if (startPos.x == endPos.x && startPos.y == endPos.y) return;
var value = editor[name][endPos.y][endPos.x];
editor[name][endPos.y][endPos.x] = editor[name][startPos.y][startPos.x];
editor[name][startPos.y][startPos.x] = value;
editor.updateMap();
editor.file.saveFloorFile(function (err) {
if (err) {
printe(err);
throw(err)
}
;printf('交换图块成功');
editor.drawPosSelection();
if (callback) callback();
});
}
editor.constructor.prototype.clearPos = function (clearPos, pos, callback) {
var fields = Object.keys(editor.file.comment._data.floors._data.loc._data);
pos = pos || editor.pos;

View File

@ -31,7 +31,7 @@ editor_ui_wrapper = function (editor) {
'ESC或点击空白处可以自动保存当前修改',
'H键可以打开操作帮助哦',
'tileset平铺模式可以在地图上拖动来平铺框选的图形',
'可以拖动地图上的图块和事件或按Ctrl+C, Ctrl+X和Ctrl+V进行复制剪切和粘贴Delete删除',
'可以拖动地图上的图块和事件或按Ctrl+C, Ctrl+X和Ctrl+V进行复制剪切和粘贴Delete删除;右键也可以拉框选择区域',
'Alt+数字键保存图块,数字键读取保存的图块',
];
if (value == null) value = Math.floor(Math.random() * tips.length);

View File

@ -730,7 +730,7 @@ control.prototype.waitHeroToStop = function(callback) {
core.setHeroLoc('direction', lastDirection);
core.drawHero();
callback();
}, core.status.replay.speed == 24 ? 0 : 30);
}, core.status.replay.speed == 24 ? 1 : 30);
}
}

View File

@ -444,7 +444,8 @@ events.prototype.openDoor = function (x, y, needKey, callback) {
core.removeBlock(x, y);
setTimeout(function () {
core.status.replay.animate = false;
core.events.afterOpenDoor(id, x, y, callback);
core.events.afterOpenDoor(id, x, y);
if (callback) callback();
}, 1); // +1是为了录像检测系统
} else {
this._openDoor_animate(id, x, y, callback);