winskin增加缩放倍率,楼传修复,部分战斗动画
This commit is contained in:
parent
1eec945d93
commit
4936449f67
@ -389,7 +389,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"enemys_template": { 'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'exp': 0, 'point': 0, 'special': [] },
|
"enemys_template": { 'name': '新敌人', 'hp': 0, 'atk': 0, 'def': 0, 'mdef': 0, 'speed': 0, 'money': 0, 'exp': 0, 'point': 0, 'special': [] },
|
||||||
|
|
||||||
|
|
||||||
// --------------------------- 【图块属性】相关的表格配置 --------------------------- //
|
// --------------------------- 【图块属性】相关的表格配置 --------------------------- //
|
||||||
|
@ -46,6 +46,12 @@ main.floors.street01=
|
|||||||
{
|
{
|
||||||
"type": "setmusics"
|
"type": "setmusics"
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
"6,11": [
|
||||||
|
{
|
||||||
|
"type": "insert",
|
||||||
|
"name": "chapter01"
|
||||||
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"changeFloor": {
|
"changeFloor": {
|
||||||
|
@ -94,73 +94,73 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
"changingFloor": function (floorId, heroLoc) {
|
"changingFloor": function (floorId, heroLoc) {
|
||||||
// 正在切换楼层过程中执行的操作;此函数的执行时间是“屏幕完全变黑“的那一刻
|
// 正在切换楼层过程中执行的操作;此函数的执行时间是“屏幕完全变黑“的那一刻
|
||||||
// floorId为要切换到的楼层ID;heroLoc表示勇士切换到的位置
|
// floorId为要切换到的楼层ID;heroLoc表示勇士切换到的位置
|
||||||
|
|
||||||
// ---------- 此时还没有进行切换,当前floorId还是原来的 ---------- //
|
// ---------- 此时还没有进行切换,当前floorId还是原来的 ---------- //
|
||||||
var currentId = core.status.floorId || null; // 获得当前的floorId,可能为null
|
var currentId = core.status.floorId || null; // 获得当前的floorId,可能为null
|
||||||
var fromLoad = core.hasFlag('__fromLoad__'); // 是否是读档造成的切换
|
var fromLoad = core.hasFlag('__fromLoad__'); // 是否是读档造成的切换
|
||||||
var isFlying = core.hasFlag('__isFlying__'); // 是否是楼传造成的切换
|
var isFlying = core.hasFlag('__isFlying__'); // 是否是楼传造成的切换
|
||||||
if (!fromLoad && !(isFlying && currentId == floorId)) {
|
if (!fromLoad && !(isFlying && currentId == floorId)) {
|
||||||
if (!core.hasFlag("__leaveLoc__")) core.setFlag("__leaveLoc__", {});
|
if (!core.hasFlag("__leaveLoc__")) core.setFlag("__leaveLoc__", {});
|
||||||
if (currentId != null) core.getFlag("__leaveLoc__")[currentId] = core.clone(core.status.hero.loc);
|
if (currentId != null) core.getFlag("__leaveLoc__")[currentId] = core.clone(core.status.hero.loc);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 可以对currentId进行判定,比如删除某些自定义图层等
|
||||||
|
// if (currentId == 'MT0') {
|
||||||
|
// core.deleteAllCanvas();
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 根据分区信息自动砍层与恢复
|
||||||
|
if (core.autoRemoveMaps) core.autoRemoveMaps(floorId);
|
||||||
|
|
||||||
|
// 重置画布尺寸
|
||||||
|
core.maps.resizeMap(floorId);
|
||||||
|
// 设置勇士的位置
|
||||||
|
heroLoc.direction = core.turnDirection(heroLoc.direction);
|
||||||
|
core.status.hero.loc = heroLoc;
|
||||||
|
// 检查重生怪并重置
|
||||||
|
if (!fromLoad) {
|
||||||
|
core.extractBlocks(floorId);
|
||||||
|
core.status.maps[floorId].blocks.forEach(function (block) {
|
||||||
|
if (block.disable && core.enemys.hasSpecial(block.event.id, 23)) {
|
||||||
|
block.disable = false;
|
||||||
|
core.setMapBlockDisabled(floorId, block.x, block.y, false);
|
||||||
|
core.maps._updateMapArray(floorId, block.x, block.y);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
core.control.gatherFollowers();
|
||||||
|
}
|
||||||
|
|
||||||
// 可以对currentId进行判定,比如删除某些自定义图层等
|
// ---------- 重绘新地图;这一步将会设置core.status.floorId ---------- //
|
||||||
// if (currentId == 'MT0') {
|
core.drawMap(floorId);
|
||||||
// core.deleteAllCanvas();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// 根据分区信息自动砍层与恢复
|
// 切换楼层BGM
|
||||||
if (core.autoRemoveMaps) core.autoRemoveMaps(floorId);
|
if (core.status.maps[floorId].bgm) {
|
||||||
|
var bgm = core.status.maps[floorId].bgm;
|
||||||
|
if (bgm instanceof Array) bgm = bgm[Math.floor(Math.random() * bgm.length)]; // 多个bgm则随机播放一个
|
||||||
|
if (!core.hasFlag("__bgm__")) core.playBgm(bgm);
|
||||||
|
} else if (fromLoad && !core.hasFlag("__bgm__")) {
|
||||||
|
core.pauseBgm();
|
||||||
|
}
|
||||||
|
// 更改画面色调
|
||||||
|
var color = core.getFlag('__color__', null);
|
||||||
|
if (!color && core.status.maps[floorId].color)
|
||||||
|
color = core.status.maps[floorId].color;
|
||||||
|
core.clearMap('curtain');
|
||||||
|
core.status.curtainColor = color;
|
||||||
|
if (color) core.fillRect('curtain', 0, 0, core._PX_ || core.__PIXELS__, core._PY_ || core.__PIXELS__, core.arrayToRGBA(color));
|
||||||
|
// 更改天气
|
||||||
|
var weather = core.getFlag('__weather__', null);
|
||||||
|
if (!weather && core.status.maps[floorId].weather)
|
||||||
|
weather = core.status.maps[floorId].weather;
|
||||||
|
if (weather)
|
||||||
|
core.setWeather(weather[0], weather[1]);
|
||||||
|
else core.setWeather();
|
||||||
|
|
||||||
// 重置画布尺寸
|
// ...可以新增一些其他内容,比如创建个画布在右上角显示什么内容等等
|
||||||
core.maps.resizeMap(floorId);
|
|
||||||
// 设置勇士的位置
|
|
||||||
heroLoc.direction = core.turnDirection(heroLoc.direction);
|
|
||||||
core.status.hero.loc = heroLoc;
|
|
||||||
// 检查重生怪并重置
|
|
||||||
if (!fromLoad) {
|
|
||||||
core.extractBlocks(floorId);
|
|
||||||
core.status.maps[floorId].blocks.forEach(function (block) {
|
|
||||||
if (block.disable && core.enemys.hasSpecial(block.event.id, 23)) {
|
|
||||||
block.disable = false;
|
|
||||||
core.setMapBlockDisabled(floorId, block.x, block.y, false);
|
|
||||||
core.maps._updateMapArray(floorId, block.x, block.y);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
core.control.gatherFollowers();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ---------- 重绘新地图;这一步将会设置core.status.floorId ---------- //
|
},
|
||||||
core.drawMap(floorId);
|
|
||||||
|
|
||||||
// 切换楼层BGM
|
|
||||||
if (core.status.maps[floorId].bgm) {
|
|
||||||
var bgm = core.status.maps[floorId].bgm;
|
|
||||||
if (bgm instanceof Array) bgm = bgm[Math.floor(Math.random() * bgm.length)]; // 多个bgm则随机播放一个
|
|
||||||
if (!core.hasFlag("__bgm__")) core.playBgm(bgm);
|
|
||||||
} else if (fromLoad && !core.hasFlag("__bgm__")) {
|
|
||||||
core.pauseBgm();
|
|
||||||
}
|
|
||||||
// 更改画面色调
|
|
||||||
var color = core.getFlag('__color__', null);
|
|
||||||
if (!color && core.status.maps[floorId].color)
|
|
||||||
color = core.status.maps[floorId].color;
|
|
||||||
core.clearMap('curtain');
|
|
||||||
core.status.curtainColor = color;
|
|
||||||
if (color) core.fillRect('curtain', 0, 0, core._PX_ || core.__PIXELS__, core._PY_ || core.__PIXELS__, core.arrayToRGBA(color));
|
|
||||||
// 更改天气
|
|
||||||
var weather = core.getFlag('__weather__', null);
|
|
||||||
if (!weather && core.status.maps[floorId].weather)
|
|
||||||
weather = core.status.maps[floorId].weather;
|
|
||||||
if (weather)
|
|
||||||
core.setWeather(weather[0], weather[1]);
|
|
||||||
else core.setWeather();
|
|
||||||
|
|
||||||
// ...可以新增一些其他内容,比如创建个画布在右上角显示什么内容等等
|
|
||||||
|
|
||||||
},
|
|
||||||
"afterChangeFloor": function (floorId) {
|
"afterChangeFloor": function (floorId) {
|
||||||
// 转换楼层结束的事件;此函数会在整个楼层切换完全结束后再执行
|
// 转换楼层结束的事件;此函数会在整个楼层切换完全结束后再执行
|
||||||
// floorId是切换到的楼层
|
// floorId是切换到的楼层
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 4.8 KiB After Width: | Height: | Size: 1.3 KiB |
4163
project/plugins.js
4163
project/plugins.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user