From 700390a3acdf0766208236d204b1143bae4045db Mon Sep 17 00:00:00 2001 From: oc Date: Tue, 25 Dec 2018 21:22:36 +0800 Subject: [PATCH] Fix curtain bug --- libs/maps.js | 2 ++ project/functions.js | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/libs/maps.js b/libs/maps.js index 78b8d5a3..d3fb8cfd 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -587,6 +587,8 @@ maps.prototype.drawMap = function (floorId, callback) { } } else { drawEvent(); + if (core.isset(core.status.curtainColor)) + core.fillRect('curtain',0,0,416,416,core.arrayToRGBA(core.status.curtainColor)); core.setGlobalAnimate(core.values.animateSpeed); core.drawHero(); core.updateStatusBar(); diff --git a/project/functions.js b/project/functions.js index 85f0136b..b4e30afc 100644 --- a/project/functions.js +++ b/project/functions.js @@ -127,6 +127,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = core.fillRect('curtain',0,0,416,416,core.arrayToRGBA(color)); core.status.curtainColor = color; } + else { + core.clearMap('curtain'); + core.status.curtainColor = null; + } // 更改天气 var weather = core.getFlag('__weather__', null); if (!core.isset(weather) && core.isset(core.status.maps[floorId].weather))