From 457ef09e89401bf69d5ac09693c8b6106d0c0458 Mon Sep 17 00:00:00 2001 From: ckcz123 Date: Tue, 18 Dec 2018 14:02:22 +0800 Subject: [PATCH] clearMap all --- docs/event.md | 1 - libs/events.js | 10 +++------- libs/maps.js | 1 - libs/ui.js | 1 + project/functions.js | 2 +- 5 files changed, 5 insertions(+), 10 deletions(-) diff --git a/docs/event.md b/docs/event.md index cc345ca9..438ee9e7 100644 --- a/docs/event.md +++ b/docs/event.md @@ -2198,7 +2198,6 @@ if (core.getFlag("door",0)==2) { var replaying = core.status.replay.replaying; core.stopReplay(); core.waitHeroToStop(function() { - core.removeGlobalAnimate(0,0,true); core.clearMap('all'); // 清空全地图 core.deleteAllCanvas(); core.drawText([ diff --git a/libs/events.js b/libs/events.js index b76769f5..25cee135 100644 --- a/libs/events.js +++ b/libs/events.js @@ -223,14 +223,10 @@ events.prototype.lose = function (reason) { ////// 游戏结束 ////// events.prototype.gameOver = function (ending, fromReplay, norank) { - // 清空图片和天气 - core.clearMap('animate'); - core.clearMap('weather'); + core.clearMap('all'); + core.deleteAllCanvas(); core.dom.gif2.innerHTML = ""; - core.animateFrame.weather.type = null; - core.animateFrame.weather.level = 0; - core.animateFrame.weather.nodes = []; - core.setFg(null, 0); + core.setWeather(); core.ui.closePanel(); // 下载录像 diff --git a/libs/maps.js b/libs/maps.js index b7f62b88..252fc85a 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -482,7 +482,6 @@ maps.prototype.drawMap = function (floorId, callback) { return; } core.clearMap('all'); - core.removeGlobalAnimate(null, null, true); var drawBg = function(){ var width = core.floors[floorId].width || 13; diff --git a/libs/ui.js b/libs/ui.js index 19f47092..6eb90cd0 100644 --- a/libs/ui.js +++ b/libs/ui.js @@ -32,6 +32,7 @@ ui.prototype.clearMap = function (name, x, y, width, height) { core.canvas[m].clearRect(0, 0, core.bigmap.width*32, core.bigmap.height*32); } core.dom.gif.innerHTML = ""; + core.removeGlobalAnimate(0,0,true); } else { var ctx = this.getContextByName(name); diff --git a/project/functions.js b/project/functions.js index 4d4a98fd..e664967a 100644 --- a/project/functions.js +++ b/project/functions.js @@ -58,9 +58,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = var replaying = core.status.replay.replaying; core.stopReplay(); core.waitHeroToStop(function() { - core.removeGlobalAnimate(0,0,true); core.clearMap('all'); // 清空全地图 core.deleteAllCanvas(); // 删除所有创建的画布 + core.dom.gif2.innerHTML = ""; // 请注意: // 成绩统计时是按照hp进行上传并排名,因此光在这里改${status:hp}是无效的 // 如需按照其他的的分数统计方式,请先将hp设置为你的得分