修复样板傻逼bug,循环动画挂载存档
This commit is contained in:
parent
c5600f78d1
commit
7e3625e637
@ -2192,6 +2192,7 @@ maps.prototype.showBgFgMap = function (name, loc, floorId, callback) {
|
||||
|
||||
////// 隐藏前景/背景地图 //////
|
||||
maps.prototype.hideBgFgMap = function (name, loc, floorId, callback) {
|
||||
this.removeGlobalAnimate(loc.x, loc.y, name)
|
||||
this._triggerBgFgMap('hide', name, loc, floorId, callback);
|
||||
}
|
||||
|
||||
@ -2455,7 +2456,7 @@ maps.prototype.setBgFgBlock = function (name, number, x, y, floorId) {
|
||||
if (/^\d+$/.test(number)) number = parseInt(number);
|
||||
else number = core.getNumberById(number);
|
||||
}
|
||||
|
||||
this.removeGlobalAnimate(x, y, name)
|
||||
var values = core.getFlag('__' + name + 'v__', {});
|
||||
values[floorId] = (values[floorId] || []).filter(function (one) { return one[0] != x || one[1] != y });
|
||||
values[floorId].push([x, y, number]);
|
||||
|
@ -8,6 +8,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
// 清除游戏数据
|
||||
// 这一步会清空状态栏和全部画布内容,并删除所有动态创建的画布
|
||||
core.clearStatus();
|
||||
core.status.animateObjs = []
|
||||
core.plugin.playing.clear()
|
||||
// 初始化status
|
||||
core.status = core.clone(core.initStatus, function (name) {
|
||||
return name != "hero" && name != "maps";
|
||||
@ -50,7 +52,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
else core.showStatusBar();
|
||||
// 隐藏右下角的音乐按钮
|
||||
core.dom.musicBtn.style.display = "none";
|
||||
},
|
||||
},
|
||||
"win": function (reason, norank, noexit) {
|
||||
// 游戏获胜事件
|
||||
// 请注意,成绩统计时是按照hp进行上传并排名
|
||||
@ -68,6 +70,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
if (replaying) core.stopReplay();
|
||||
core.waitHeroToStop(function () {
|
||||
if (!noexit) {
|
||||
core.status.animateObjs = []
|
||||
core.plugin.playing.clear()
|
||||
core.clearMap("all"); // 清空全地图
|
||||
core.deleteAllCanvas(); // 删除所有创建的画布
|
||||
core.dom.gif2.innerHTML = "";
|
||||
@ -80,12 +84,14 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
},
|
||||
"lose": function (reason) {
|
||||
// 游戏失败事件
|
||||
core.ui.closePanel();
|
||||
var replaying = core.isReplaying();
|
||||
core.stopReplay();
|
||||
core.status.animateObjs = []
|
||||
core.plugin.playing.clear()
|
||||
core.waitHeroToStop(function () {
|
||||
core.drawText(
|
||||
["\t[" + (reason || "结局1") + "]你死了。\n如题。"],
|
||||
@ -1598,7 +1604,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
version: core.firstData.version,
|
||||
guid: core.getGuid(),
|
||||
time: new Date().getTime(),
|
||||
cg: cg
|
||||
cg: cg,
|
||||
animateObjs: core.status.animateObjs.filter(v => v.loop),
|
||||
playing: [...core.plugin.playing].filter(v => v.loop)
|
||||
};
|
||||
return data;
|
||||
},
|
||||
@ -1645,6 +1653,8 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
// TODO:增加自己的一些读档处理
|
||||
core.ui.statusBar.clearItemInfo();
|
||||
core.ui.statusBar.update();
|
||||
core.status.animateObjs = data.animateObjs
|
||||
core.plugin.playing = new Set(data.playing)
|
||||
if (core.getFlag("_cgText")) {
|
||||
core.setFlag("_cgText", false)
|
||||
for (let v in data.cg) {
|
||||
|
Loading…
Reference in New Issue
Block a user