Compare commits

...

7 Commits

Author SHA1 Message Date
dd7fd6920a 封面修改 2024-12-01 17:42:24 +08:00
87a14348da 冲突处理 2024-12-01 15:28:33 +08:00
2d8af9670b 暂存更改的同步 2024-12-01 15:16:25 +08:00
88572376da CG回廊入口 2024-12-01 14:52:03 +08:00
87ce50edf4 开启5图层 2024-11-30 21:57:47 +08:00
egamerainy1022
f2d8d74eae 替换主角行走图,新增素材 2024-11-30 21:15:24 +08:00
egamerainy1022
ce0309df27 替换音乐 2024-11-30 20:36:01 +08:00
16 changed files with 411 additions and 151 deletions

File diff suppressed because one or more lines are too long

View File

@ -64,6 +64,7 @@
<div id='startButtons'> <div id='startButtons'>
<span class='startButton' id='playGame'>START GAME</span> <span class='startButton' id='playGame'>START GAME</span>
<span class='startButton' id='loadGame'>LOAD GAME</span> <span class='startButton' id='loadGame'>LOAD GAME</span>
<span class='startButton' id='CGMode'>CG MODE</span>
<span class='startButton' id='replayGame'>REPLAY MODE</span> <span class='startButton' id='replayGame'>REPLAY MODE</span>
</div> </div>
<div id='levelChooseButtons'></div> <div id='levelChooseButtons'></div>

View File

@ -48,6 +48,7 @@ function main() {
startButtons: document.getElementById('startButtons'), startButtons: document.getElementById('startButtons'),
playGame: document.getElementById('playGame'), playGame: document.getElementById('playGame'),
loadGame: document.getElementById('loadGame'), loadGame: document.getElementById('loadGame'),
CGMode: document.getElementById('CGMode'),
replayGame: document.getElementById('replayGame'), replayGame: document.getElementById('replayGame'),
levelChooseButtons: document.getElementById('levelChooseButtons'), levelChooseButtons: document.getElementById('levelChooseButtons'),
data: document.getElementById('data'), data: document.getElementById('data'),

Binary file not shown.

Binary file not shown.

BIN
project/bgms/theme.mp3 Normal file

Binary file not shown.

View File

@ -43,6 +43,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"now.png", "now.png",
"null.png", "null.png",
"r.png", "r.png",
"shengnvxizao.png",
"status.png", "status.png",
"statusBackground.jpg", "statusBackground.jpg",
"statusBackground.png", "statusBackground.png",
@ -74,15 +75,29 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"1.png", "1.png",
"11.png", "11.png",
"6.png", "6.png",
"12.png" "12.png",
"Outside_B.png",
"C4.png",
"C3.png",
"C2.png",
"C1.png",
"IconSet.png",
"9.png",
"8.png",
"7.png",
"10.png"
], ],
"animates": [ "animates": [
"hand", "hand",
"jianji",
"sword", "sword",
"thunder",
"yongchang",
"zone" "zone"
], ],
"bgms": [ "bgms": [
"bgm.mp3" "Asphodelus_Ceui.mp3",
"theme.mp3"
], ],
"sounds": [ "sounds": [
"attack.mp3", "attack.mp3",
@ -187,7 +202,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"title": "秽翼的尤斯蒂娅", "title": "秽翼的尤斯蒂娅",
"name": "Eustia", "name": "Eustia",
"version": "鸽子窝造塔小队", "version": "鸽子窝造塔小队",
"floorId": "MT0", "floorId": "jiuguan",
"hero": { "hero": {
"image": "hero.png", "image": "hero.png",
"animate": false, "animate": false,
@ -210,7 +225,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
}, },
"loc": { "loc": {
"direction": "up", "direction": "up",
"x": 6, "x": 4,
"y": 9 "y": 9
}, },
"flags": { "flags": {

View File

@ -63,5 +63,11 @@ main.floors.MT9=
"fgmap": [ "fgmap": [
], ],
"areas": "下层" "areas": "下层",
"bg2map": [
],
"fg2map": [
]
} }

View File

@ -282,6 +282,7 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
"autotile4": 0, "autotile4": 0,
"autotile8": 0, "autotile8": 0,
"autotile9": 0, "autotile9": 0,
"autotile10": 0 "autotile10": 0,
"autotile5": 0
} }
} }

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 8.6 KiB

View File

@ -354,7 +354,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
// 背景层2将会覆盖背景层 被事件层覆盖 前景层2将会覆盖前景层 // 背景层2将会覆盖背景层 被事件层覆盖 前景层2将会覆盖前景层
// 另外 请注意加入两个新图层 会让大地图的性能降低一些 // 另外 请注意加入两个新图层 会让大地图的性能降低一些
// 插件作者ad // 插件作者ad
var __enable = false; var __enable = true;
if (!__enable) return; if (!__enable) return;
// 创建新图层 // 创建新图层
@ -1939,6 +1939,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.dom.playGame.style.fontSize = font + "px" core.dom.playGame.style.fontSize = font + "px"
core.dom.loadGame.style.fontSize = font + "px" core.dom.loadGame.style.fontSize = font + "px"
core.dom.CGMode.style.fontSize = font + "px"
core.dom.replayGame.style.fontSize = font + "px" core.dom.replayGame.style.fontSize = font + "px"
core.dom.startButtonGroup.style.padding = font * 0.3 + "px 25px" core.dom.startButtonGroup.style.padding = font * 0.3 + "px 25px"
} }
@ -1947,6 +1948,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
main.dom.outerBackground.style.height = obj.totalHeight + 'px'; main.dom.outerBackground.style.height = obj.totalHeight + 'px';
main.dom.outerUI.style.width = obj.totalWidth + 'px'; main.dom.outerUI.style.width = obj.totalWidth + 'px';
main.dom.outerUI.style.height = obj.totalHeight + 'px'; main.dom.outerUI.style.height = obj.totalHeight + 'px';
main.dom.CGUI.style.width = obj.totalWidth + 'px';
main.dom.CGUI.style.height = obj.totalHeight + 'px';
const innerSize = (obj.canvasWidth * core.domStyle.scale) + "px"; const innerSize = (obj.canvasWidth * core.domStyle.scale) + "px";
for (let i = 0; i < core.dom.gameCanvas.length; ++i) for (let i = 0; i < core.dom.gameCanvas.length; ++i)
@ -1972,6 +1975,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
canvas.style.left = parseFloat(canvas.getAttribute("_left")) * core.domStyle.scale + "px"; canvas.style.left = parseFloat(canvas.getAttribute("_left")) * core.domStyle.scale + "px";
canvas.style.top = parseFloat(canvas.getAttribute("_top")) * core.domStyle.scale + "px"; canvas.style.top = parseFloat(canvas.getAttribute("_top")) * core.domStyle.scale + "px";
} }
// resize next // resize next
main.dom.next.style.width = main.dom.next.style.height = 5 * core.domStyle.scale + "px"; main.dom.next.style.width = main.dom.next.style.height = 5 * core.domStyle.scale + "px";
main.dom.next.style.borderBottomWidth = main.dom.next.style.borderRightWidth = 4 * core.domStyle.scale + "px"; main.dom.next.style.borderBottomWidth = main.dom.next.style.borderRightWidth = 4 * core.domStyle.scale + "px";
@ -2060,6 +2064,8 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
if (core.status.automaticRoute == null) core.status.automaticRoute = {}; if (core.status.automaticRoute == null) core.status.automaticRoute = {};
core.updateStatusBar(); core.updateStatusBar();
core.ui.CG.update()
} }
class StatusBar { class StatusBar {
@ -8628,5 +8634,235 @@ core.plugin.animate = {
} }
core.registerAction('onmousewheel', '_sys_onmousewheel', actions.prototype._sys_onmousewheel, 0); core.registerAction('onmousewheel', '_sys_onmousewheel', actions.prototype._sys_onmousewheel, 0);
},
"CG回廊": function () {
// 在此增加新插件
const CGUI = document.createElement('canvas'); //CGui画布设置
CGUI.style.position = 'absolute';
CGUI.style.zIndex = 0;
CGUI.id = 'CGUI';
main.dom.gameGroup.insertAdjacentElement('afterend', CGUI)
CGUI.style.top = "50%"
CGUI.style.left = "50%"
CGUI.style.transform = "translate(-50%,-50%)"
const ctx = CGUI.getContext("2d");
main.dom.CGUI = CGUI;
let page = 0; // 当前页面变量
let select = 'view'; // 'view'为浏览模式,'zoom'为放大模式
CGUI.onclick = function (e) {
try {
e.preventDefault();
if (core.isPlaying()) return false;
const left = core.dom.gameGroup.offsetLeft;
const top = core.dom.gameGroup.offsetTop;
const px = Math.floor((e.clientX - left) / core.domStyle.scale),
py = Math.floor((e.clientY - top) / core.domStyle.scale);
core.ui.CG.onclick(px * 3, py * 3);
} catch (ee) {
main.log(ee);
}
}
function drawImage(name, image, x, y, w, h, x1, y1, w1, h1, angle, reverse) {
// 检测文件名以 :x, :y, :o 结尾,表示左右翻转,上下翻转和中心翻转
image = core.material.images.images[image];
var scale = {
'x': [-1, 1],
'y': [1, -1],
'o': [-1, -1]
};
// 只能接受2, 4, 8个参数
if (x != null && y != null) {
if (w == null || h == null) {
// 两个参数变成四个参数
w = image.width;
h = image.height;
}
if (x1 != null && y1 != null && w1 != null && h1 != null) {
if (!reverse && !angle) {
name.drawImage(image, x, y, w, h, x1, y1, w1, h1);
} else {
name.save();
name.translate(x1 + w1 / 2, y1 + h1 / 2);
if (reverse) name.scale(scale[reverse][0], scale[reverse][1]);
if (angle) name.rotate(angle);
name.drawImage(image, x, y, w, h, -w1 / 2, -h1 / 2, w1, h1);
name.restore();
}
return;
}
if (!reverse && !angle) {
name.drawImage(image, x, y, w, h);
} else {
name.save();
name.translate(x + w / 2, y + h / 2);
if (reverse) name.scale(scale[reverse][0], scale[reverse][1]);
if (angle) name.rotate(angle);
name.drawImage(image, -w / 2, -h / 2, w, h);
name.restore();
}
return;
}
}
function drawWindow(background, ctx, x, y, w, h, direction, px, py) {
// 仿RM窗口皮肤 ↓
drawImage(ctx, background, 0, 0, 128, 128, x + 2, y + 2, w - 4, h - 4);
// 绘制边框
// 上方
drawImage(ctx, background, 128, 0, 16, 16, x, y, 16, 16);
for (var dx = 0; dx < w - 64; dx += 32) {
drawImage(ctx, background, 144, 0, 32, 16, x + dx + 16, y, 32, 16);
drawImage(ctx, background, 144, 48, 32, 16, x + dx + 16, y + h - 16, 32, 16);
}
drawImage(ctx, background, 144, 0, w - dx - 32, 16, x + dx + 16, y, w - dx - 32, 16);
drawImage(ctx, background, 144, 48, w - dx - 32, 16, x + dx + 16, y + h - 16, w - dx - 32, 16);
drawImage(ctx, background, 176, 0, 16, 16, x + w - 16, y, 16, 16);
// 左右
for (var dy = 0; dy < h - 64; dy += 32) {
drawImage(ctx, background, 128, 16, 16, 32, x, y + dy + 16, 16, 32);
drawImage(ctx, background, 176, 16, 16, 32, x + w - 16, y + dy + 16, 16, 32);
}
drawImage(ctx, background, 128, 16, 16, h - dy - 32, x, y + dy + 16, 16, h - dy - 32);
drawImage(ctx, background, 176, 16, 16, h - dy - 32, x + w - 16, y + dy + 16, 16, h - dy - 32);
// 下方
drawImage(ctx, background, 128, 48, 16, 16, x, y + h - 16, 16, 16);
drawImage(ctx, background, 176, 48, 16, 16, x + w - 16, y + h - 16, 16, 16);
// arrow
if (px != null && py != null) {
if (direction == 'up') {
drawImage(ctx, background, 128, 96, 32, 32, px, y + h - 3, 32, 32);
} else if (direction == 'down') {
drawImage(ctx, background, 160, 96, 32, 32, px, y - 29, 32, 32);
}
}
// 仿RM窗口皮肤 ↑
}
class CG {
constructor() {
//cg列表
this.UIMx = [ //空位用none填充当前ui至多4列6行
["none", "none", 'none'],
["none", "none", "none"],
["none", "none", "none"],
];
}
//更新
update() {
this.background()
this.drawUI()
}
background() {
if (core.domStyle.isVertical) {
ctx.canvas.width = 1248;
ctx.canvas.height = 2028;
core.setTextAlign(ctx, 'center');
} else {
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
core.setTextAlign(ctx, 'center');
}
}
onclick(px, py) { //点击
console.log([px, py])
if (px >= 33 && px <= 177 && py >= 33 && py <= 177) { //离开按钮是一致的,其余的记区分横竖屏
CGUI.style.zIndex = 0
core.clearMap(ctx)
core.restart();
}
if (select === 'view') {
// 浏览模式,点击切换页面
page = (page + 1) % main.core.ui.CG.UIMx.length;
main.core.ui.CG.update();
} else if (select === 'zoom') {
// 放大模式,点击清空画布重绘当前页面
core.clearMap(ctx);
main.core.ui.CG.drawUI();
}
}
drawUI() {
core.clearMap(CGUI)
if (!core?.material?.images?.images['winskin1.png']) return
if (core.domStyle.isVertical) { //竖屏
core.drawWindowSkin('winskin1.png', ctx, 0, 0, 1248, 2028);
core.setTextAlign(ctx, 'center');
core.fillRoundRect(ctx, 45 - 6, 45 - 6, 120 + 12, 80 + 12, 6, '#444444');
core.strokeRoundRect(ctx, 45 - 12, 45 - 12, 120 + 24, 80 + 24, 12, "#444444", 3);
core.fillText(ctx, '离开', 100, 110, '#FFFFFF', core.ui._buildFont(33, true));
// 添加向上翻页和向下翻页的按钮
core.fillRoundRect(ctx, 100 - 6, 100 - 6, 120 + 12, 120 + 12, 6, '#444444');
core.strokeRoundRect(ctx, 100 - 12, 100 - 12, 120 + 24, 120 + 120, 12, "#444444", 3);
core.fillText(ctx, '向上翻页', 100, 250, '#FFFFFF', core.ui._buildFont(24, true));
core.fillText(ctx, '向下翻页', 100, 1500, '#FFFFFF', core.ui._buildFont(24, true));
// 添加3*2个4:3的画框
for (let i = 0; i < 3; i++) {
for (let j = 0; j < 2; j++) {
core.strokeRect(ctx, 200 + j * 200, 300 + i * 300, 160, 120, "#FFFFFF", 2);
core.fillRect(ctx, 200 + j * 200, 300 + i * 300, 160, 120, '#FFFFFF');
}
}
// 添加浏览模式和CG模式的字样
core.fillText(ctx, '浏览模式', 400, 180, '#FFFFFF', core.ui._buildFont(24, true));
core.fillText(ctx, 'CG模式', 1200, 180, '#FFFFFF', core.ui._buildFont(24, true));
} else { //横屏
ctx.canvas.width = 2028;
ctx.canvas.height = 1248;
core.drawWindowSkin('winskin1.png', ctx, 0, 0, 2028, 1248);
core.setTextAlign(ctx, 'center');
core.fillRoundRect(ctx, 45 - 6, 45 - 6, 120 + 12, 120 + 12, 6, '#444444');
core.strokeRoundRect(ctx, 45 - 12, 45 - 12, 120 + 24, 120 + 24, 12, "#444444", 3);
core.fillText(ctx, '离开', 100, 110, '#FFFFFF', core.ui._buildFont(33, true));
// 添加向上翻页和向下翻页的按钮
core.fillRoundRect(ctx, 45 - 6, 350 - 6, 120 + 12, 120 + 12, 6, '#444444');
core.strokeRoundRect(ctx, 45 - 12, 350 - 12, 120 + 24, 120 + 24, 12, "#444444", 3);
core.fillText(ctx, '向上翻页', 100, 400, '#FFFFFF', core.ui._buildFont(24, true));
core.fillRoundRect(ctx, 45 - 6, 850 - 6, 120 + 12, 120 + 12, 6, '#444444');
core.strokeRoundRect(ctx, 45 - 12, 850 - 12, 120 + 24, 120 + 24, 12, "#444444", 3);
core.fillText(ctx, '向下翻页', 100, 900, '#FFFFFF', core.ui._buildFont(24, true));
// 添加3*2个4:3的画框
for (let i = 0; i < 2; i++) {
for (let j = 0; j < 6; j++) {
core.fillRect(ctx, 200 + j * 300, 350 + i * 450, 240, 160, '#FFFFFF');
core.strokeRect(ctx, 200 + j * 300, 350 + i * 450, 240, 160, "#444444", 2);
}
}
// 添加浏览模式和CG模式的字样
core.fillRoundRect(ctx, 550 - 6, 45 - 6, 120 + 12, 120 + 12, 6, '#444444');
core.strokeRoundRect(ctx, 550 - 12, 45 - 12, 120 + 24, 120 + 24, 12, "#444444", 3);
core.fillText(ctx, '浏览模式', 600, 100, '#FFFFFF', core.ui._buildFont(24, true));
core.fillRoundRect(ctx, 1150 - 6, 45 - 6, 120 + 12, 120 + 12, 6, '#444444');
core.strokeRoundRect(ctx, 1150 - 12, 45 - 12, 120 + 24, 120 + 24, 12, "#444444", 3);
core.fillText(ctx, 'CG模式', 1200, 100, '#FFFFFF', core.ui._buildFont(24, true));
}
}
}
core.ui.CG = new CG();
main.dom.CGMode.onclick = function () {
main.core.control.checkBgm();
CGUI.style.zIndex = 10000
main.core.ui.CG.update()
}
} }
} }

BIN
project/tilesets/C1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
project/tilesets/C2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

BIN
project/tilesets/C3.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

BIN
project/tilesets/C4.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 619 KiB