fix setFg

This commit is contained in:
ckcz123 2019-03-20 15:15:59 +08:00
parent cc05d3253a
commit a89e397a40
4 changed files with 8 additions and 8 deletions

View File

@ -2075,6 +2075,8 @@ actions.prototype._clickStorageRemove = function (x, y) {
actions.prototype._clickStorageRemove_all = function () {
core.myconfirm("你确定要清除【全部塔】的所有本地存档?\n此行为不可逆", function () {
var done = function () {
core.saves.autosave.data = null;
core.saves.autosave.updated = false;
core.ui.closePanel();
core.drawText("\t[操作成功]你的所有存档已被清空。");
core.saves.saveIndex = 1;

View File

@ -1964,10 +1964,10 @@ control.prototype.setFg = function(color, time, callback) {
return;
}
this._setFg_animate(core.status.curtainColor, color, callback);
this._setFg_animate(core.status.curtainColor, color, time, callback);
}
control.prototype._setFg_animate = function (nowColor, color, callback) {
control.prototype._setFg_animate = function (nowColor, color, time, callback) {
var per_time = 10, step = parseInt(time / per_time);
var animate = setInterval(function() {
nowColor = [
@ -1980,7 +1980,7 @@ control.prototype._setFg_animate = function (nowColor, color, callback) {
core.fillRect('curtain', 0, 0, core.__PIXELS__, core.__PIXELS__, core.arrayToRGBA(nowColor));
step--;
if (step <= 0) {
delete core.animate.asyncId[animate];
delete core.animateFrame.asyncId[animate];
clearInterval(animate);
core.status.curtainColor = color;
if (core.isset(callback)) callback();

View File

@ -205,10 +205,8 @@ main.floors.sample1=
"type": "move",
"time": 750,
"steps": [
{
"direction": "right",
"value": 2
},
"right",
"right",
"down"
]
},

View File

@ -142,7 +142,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
color = core.status.maps[floorId].color;
core.clearMap('curtain');
core.status.curtainColor = color;
if (color) core.fillRect('curtain', 0, 0, core.__SIZE__, core.__SIZE__, core.arrayToRGBA(color));
if (color) core.fillRect('curtain', 0, 0, core.__PIXELS__, core.__PIXELS__, core.arrayToRGBA(color));
// 更改天气
var weather = core.getFlag('__weather__', null);
if (!weather && core.status.maps[floorId].weather)