This commit is contained in:
oc 2019-07-23 14:49:05 +08:00
parent cd3c0e084d
commit 2ea8b012a8
3 changed files with 25 additions and 20 deletions

View File

@ -762,7 +762,7 @@ function omitedcheckUpdateFunction(event) {
"closeDoor_s": ["PosString_0", "PosString_1"],
"show_s": ["EvalString_0", "EvalString_1", "IdString_0"],
"hide_s": ["EvalString_0", "EvalString_1", "IdString_0"],
"setBlock_s": ["PosString_0", "PosString_1", "IdString_0"],
"setBlock_s": ["EvalString_1", "EvalString_2", "IdString_0"],
"move_s": ["PosString_0", "PosString_1"],
"jump_s": ["PosString_2", "PosString_3"], // 跳跃暂时只考虑终点
"showBgFgMap_s": ["EvalString_0", "EvalString_1", "IdString_0"],
@ -772,7 +772,8 @@ function omitedcheckUpdateFunction(event) {
"hideFloorImg_s": ["EvalString_0", "EvalString_1", "IdString_0"],
"trigger_s": ["PosString_0", "PosString_1"],
"insert_2_s": ["PosString_0", "PosString_1", "IdString_0"],
"animate_s": ["EvalString_0", "EvalString_0"]
"animate_s": ["EvalString_0", "EvalString_0"],
"setViewport_s": ["PosString_0", "PosString_1"]
}
editor_blockly.selectPoint = function () {

View File

@ -939,24 +939,25 @@ maps.prototype._drawFloorImage = function (ctx, name, type, image, offsetX, widt
////// 绘制Autotile //////
maps.prototype._drawAutotile = function (ctx, mapArr, block, size, left, top, status) {
var indexArrs = [ //16种组合的图块索引数组; // 将autotile分割成48块16*16的小块; 数组索引即对应各个小块
// +----+----+----+----+----+----+
[10, 9, 4, 3], //0 bin:0000 | 1 | 2 | 3 | 4 | 5 | 6 |
[10, 9, 4, 13], //1 bin:0001 +----+----+----+----+----+----+
[10, 9, 18, 3], //2 bin:0010 | 7 | 8 | 9 | 10 | 11 | 12 |
[10, 9, 16, 15], //3 bin:0011 +----+----+----+----+----+----+
[10, 43, 4, 3], //4 bin:0100 | 13 | 14 | 15 | 16 | 17 | 18 |
[10, 31, 4, 25], //5 bin:0101 +----+----+----+----+----+----+
[10, 7, 2, 3], //6 bin:0110 | 19 | 20 | 21 | 22 | 23 | 24 |
[10, 31, 16, 5], //7 bin:0111 +----+----+----+----+----+----+
[48, 9, 4, 3], //8 bin:1000 | 25 | 26 | 27 | 28 | 29 | 30 |
[8, 9, 4, 1], //9 bin:1001 +----+----+----+----+----+----+
[36, 9, 30, 3], //10 bin:1010 | 31 | 32 | 33 | 34 | 35 | 36 |
[36, 9, 6, 15], //11 bin:1011 +----+----+----+----+----+----+
[46, 45, 4, 3], //12 bin:1100 | 37 | 38 | 39 | 40 | 41 | 42 |
[46, 11, 4, 25], //13 bin:1101 +----+----+----+----+----+----+
[12, 45, 30, 3], //14 bin:1110 | 43 | 44 | 45 | 46 | 47 | 48 |
[34, 33, 28, 27] //15 bin:1111 +----+----+----+----+----+----+
var indexArrs = [ //16种组合的图块索引数组;
// 将autotile分割成48块16*16的小块; 数组索引即对应各个小块
// +----+----+----+----+----+----+
[10, 9, 4, 3], //0 bin:0000 | 1 | 2 | 3 | 4 | 5 | 6 |
[10, 9, 4, 13], //1 bin:0001 +----+----+----+----+----+----+
[10, 9, 18, 3], //2 bin:0010 | 7 | 8 | 9 | 10 | 11 | 12 |
[10, 9, 16, 15], //3 bin:0011 +----+----+----+----+----+----+
[10, 43, 4, 3], //4 bin:0100 | 13 | 14 | 15 | 16 | 17 | 18 |
[10, 31, 4, 25], //5 bin:0101 +----+----+----+----+----+----+
[10, 43, 18, 3], //6 bin:0110 | 19 | 20 | 21 | 22 | 23 | 24 |
[10, 31, 16, 5], //7 bin:0111 +----+----+----+----+----+----+
[48, 9, 4, 3], //8 bin:1000 | 25 | 26 | 27 | 28 | 29 | 30 |
[48, 9, 4, 13], //9 bin:1001 +----+----+----+----+----+----+
[36, 9, 30, 3], //10 bin:1010 | 31 | 32 | 33 | 34 | 35 | 36 |
[36, 9, 6, 15], //11 bin:1011 +----+----+----+----+----+----+
[46, 45, 4, 3], //12 bin:1100 | 37 | 38 | 39 | 40 | 41 | 42 |
[46, 11, 4, 25], //13 bin:1101 +----+----+----+----+----+----+
[12, 45, 30, 3], //14 bin:1110 | 43 | 44 | 45 | 46 | 47 | 48 |
[20, 23, 38, 41] //15 bin:1111 +----+----+----+----+----+----+
];
// 开始绘制autotile

View File

@ -403,6 +403,9 @@ main.dom.body.onkeyup = function(e) {
main.selectButton((main.selectedButton||0) + 1);
else if (e.keyCode == 67 || e.keyCode == 13 || e.keyCode == 32) // C/Enter/Space
main.selectButton(main.selectedButton);
else if (e.keyCode == 27 && main.dom.levelChooseButtons.style.display == 'block') { // ESC
main.core.showStartAnimate(true);
}
e.stopPropagation();
return;
}