This commit is contained in:
oc 2018-05-17 23:37:52 +08:00
parent 7d4f8f41af
commit b71442b099
4 changed files with 33 additions and 36 deletions

View File

@ -407,8 +407,6 @@ events.prototype.doAction = function() {
}
if (floorId==core.status.floorId) {
core.drawMap(floorId);
core.drawHero();
core.updateStatusBar();
}
}
this.doAction();
@ -1094,29 +1092,27 @@ events.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback
})
}
core.drawMap(floorId, function () {
setTimeout(function() {
if (core.isset(heroLoc.direction))
core.setHeroLoc('direction', heroLoc.direction);
core.setHeroLoc('x', heroLoc.x);
core.setHeroLoc('y', heroLoc.y);
core.drawHero();
core.updateStatusBar();
if (core.isset(heroLoc.direction))
core.setHeroLoc('direction', heroLoc.direction);
core.setHeroLoc('x', heroLoc.x);
core.setHeroLoc('y', heroLoc.y);
core.clearMap('hero', 0, 0, 416, 416);
core.drawHero();
var changed = function () {
core.unLockControl();
core.status.replay.animate=false;
core.events.afterChangeFloor(floorId);
if (core.isset(callback)) callback();
}
if (displayAnimate) {
core.hide(core.dom.floorMsgGroup, time/4, function () {
changed();
});
}
else {
var changed = function () {
core.unLockControl();
core.status.replay.animate=false;
core.events.afterChangeFloor(floorId);
if (core.isset(callback)) callback();
}
if (displayAnimate) {
core.hide(core.dom.floorMsgGroup, time/4, function () {
changed();
}
}, 25)
});
}
else {
changed();
}
});
}
core.playSound('floor.mp3');

View File

@ -389,8 +389,10 @@ maps.prototype.drawMap = function (mapName, callback) {
}
} else {
drawEvent();
core.setGlobalAnimate(core.values.animateSpeed);
core.drawHero();
core.updateStatusBar();
}
core.setGlobalAnimate(core.values.animateSpeed);
if (core.isset(callback))
callback();
}
@ -398,7 +400,7 @@ maps.prototype.drawMap = function (mapName, callback) {
////// 绘制Autotile //////
maps.prototype.drawAutotile = function(ctx, mapArr, block, size, left, top){
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 |
@ -899,8 +901,5 @@ maps.prototype.drawAnimate = function (name, x, y, callback) {
maps.prototype.resetMap = function() {
var floorId = core.status.floorId;
core.status.maps[floorId] = this.loadFloor(floorId);
this.drawMap(floorId, function() {
core.drawHero();
core.updateStatusBar();
})
this.drawMap(floorId)
}

View File

@ -278,13 +278,13 @@ items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"useItemEffect": {
"book": "core.ui.drawBook(0);",
"fly": "core.ui.drawFly(core.status.hero.flyRange.indexOf(core.status.floorId));",
"earthquake": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawHero();\n core.updateFg();\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
"pickaxe": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawHero();\n core.updateFg();\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
"icePickaxe": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawHero(), 'stop');\n core.updateFg();\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
"snow": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawHero();\n core.updateFg();\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
"bigKey": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawHero();\n core.updateFg();\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
"bomb": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawHero();\n core.updateFg();\n core.drawTip(core.material.items[itemId].name + '使用成功');\n core.events.afterUseBomb();\n});",
"hammer": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawHero();\n core.updateFg();\n core.drawTip(core.material.items[itemId].name + '使用成功');\n core.events.afterUseBomb();\n});",
"earthquake": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
"pickaxe": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
"icePickaxe": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
"snow": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
"bigKey": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawTip(core.material.items[itemId].name + '使用成功');\n});",
"bomb": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawTip(core.material.items[itemId].name + '使用成功');\n core.events.afterUseBomb();\n});",
"hammer": "core.removeBlockByIds(core.status.floorId, core.status.event.data);\ncore.drawMap(core.status.floorId, function () {\n core.drawTip(core.material.items[itemId].name + '使用成功');\n core.events.afterUseBomb();\n});",
"centerFly": "core.clearMap('hero', 0, 0, 416, 416);\ncore.setHeroLoc('x', core.status.event.data.x);\ncore.setHeroLoc('y', core.status.event.data.y);\ncore.drawHero();\ncore.drawTip(core.material.items[itemId].name + '使用成功');",
"upFly": "var loc = {'direction': core.status.hero.loc.direction, 'x': core.status.event.data.x, 'y': core.status.event.data.y};\ncore.changeFloor(core.status.event.data.id, null, loc, null, function (){\n core.drawTip(core.material.items[itemId].name + '使用成功');\n core.replay();\n});",
"downFly": "var loc = {'direction': core.status.hero.loc.direction, 'x': core.status.event.data.x, 'y': core.status.event.data.y};\ncore.changeFloor(core.status.event.data.id, null, loc, null, function (){\n core.drawTip(core.material.items[itemId].name + '使用成功');\n core.replay();\n});",

View File

@ -9,7 +9,9 @@
最大存档个数提到main处理 √
新建地图可以保留楼层属性 √
道具描述过长时可以自动换行 √
除Autotile外均可自动注册
重写大部分教程,新增大量拓展描述 √
便捷PS工具修复宽大于高时的闪退问题
修复转向触发事件的朝向Bug √
修复flyRange的顺序问题 √
部分细节优化 √