绑定上下楼梯事件

This commit is contained in:
ckcz123 2020-05-24 11:49:00 +08:00
parent 07eb9fdbe6
commit 5d553e399a
3 changed files with 19 additions and 4 deletions

View File

@ -286,8 +286,20 @@ editor_mappanel_wrapper = function (editor) {
editor.uivalues.stepPostfix = editor.uifunctions._fillMode_bfs(editor[editor.layerMod], editor.uivalues.stepPostfix[0].x, editor.uivalues.stepPostfix[0].y,
editor[editor.layerMod][0].length, editor[editor.layerMod].length);
}
for (var ii = 0; ii < editor.uivalues.stepPostfix.length; ii++)
editor[editor.layerMod][editor.uivalues.stepPostfix[ii].y][editor.uivalues.stepPostfix[ii].x] = editor.info;
for (var ii = 0; ii < editor.uivalues.stepPostfix.length; ii++) {
var currx = editor.uivalues.stepPostfix[ii].x, curry = editor.uivalues.stepPostfix[ii].y;
editor[editor.layerMod][curry][currx] = editor.info;
// 检查上下楼梯绑定
if (editor.layerMod == 'map' && editor.info && editor.info.id == 'upFloor') {
editor.currentFloorData.changeFloor[currx+","+curry] = { "floorId": ":next", "stair": "downFloor" };
editor.drawEventBlock();
}
if (editor.layerMod == 'map' && editor.info && editor.info.id == 'downFloor') {
editor.currentFloorData.changeFloor[currx+","+curry] = { "floorId": ":before", "stair": "upFloor" };
editor.drawEventBlock();
}
}
}
// console.log(editor.map);
if (editor.info.y != null) {

View File

@ -28,7 +28,10 @@ editor_table_wrapper = function (editor) {
}
editor_table.prototype.checkboxSet = function (value, keys, prefixStrings) {
if (value == null) value = [];
if (!(value instanceof Array)) value = [value];
if (!(value instanceof Array)) {
if (value == 0) value = [];
else value = [value];
}
keys=Array.from(keys)
prefixStrings=Array.from(prefixStrings)
for (var index = 0; index < value.length; index++) {

View File

@ -69,7 +69,7 @@
(已完成!) 合并main中一些设置内容
(已完成!) \t[this], 勇士朝下flag:arg清理瞬移扣血
(OK) 同步存档合并;(OK) 失去焦点右键;地图编辑框无效;(OK) 竖屏标题界面背景
右键反复弹出;
右键反复弹出;(OK) 画上下楼梯直接绑定楼传事件;(OK) 属性框出现0问题
-------------