Compare commits

...

2 Commits

Author SHA1 Message Date
f64cfb2c14 refactor: 所有楼层的 bgm 换成 opus 2025-01-18 22:19:44 +08:00
1ef551799b refactor: bgm控制器 2025-01-18 21:54:24 +08:00
173 changed files with 746 additions and 574 deletions

View File

@ -706,7 +706,7 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "material",
"_directory": "./project/bgms/",
"_transform": (function (one) {
if (one.endsWith('.mp3') || one.endsWith('.ogg') || one.endsWith('.wav') || one.endsWith('.m4a') || one.endsWith('.flac'))
if (one.endsWith('.mp3') || one.endsWith('.ogg') || one.endsWith('.wav') || one.endsWith('.m4a') || one.endsWith('.flac') || one.endsWith('.opus'))
return one;
return null;
}).toString(),

View File

@ -154,7 +154,7 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"_type": "material",
"_directory": "./project/bgms/",
"_transform": (function (one) {
if (one.endsWith('.mp3') || one.endsWith('.ogg') || one.endsWith('.wav') || one.endsWith('.m4a') || one.endsWith('.flac'))
if (one.endsWith('.mp3') || one.endsWith('.ogg') || one.endsWith('.wav') || one.endsWith('.m4a') || one.endsWith('.flac') || one.endsWith('.opus'))
return one;
return null;
}).toString(),

View File

@ -526,17 +526,20 @@ control.prototype.setHeroMoveInterval = function (callback) {
// render.move(true);
// });
core.interval.heroMoveInterval = window.setInterval(function () {
// render.offset += toAdd * 4;
core.status.heroMoving += toAdd;
if (core.status.heroMoving >= 8) {
clearInterval(core.interval.heroMoveInterval);
core.status.heroMoving = 0;
// render.offset = 0;
// render.move(false);
if (callback) callback();
}
}, ((core.values.moveSpeed / 8) * toAdd) / core.status.replay.speed);
core.interval.heroMoveInterval = window.setInterval(
function () {
// render.offset += toAdd * 4;
core.status.heroMoving += toAdd;
if (core.status.heroMoving >= 8) {
clearInterval(core.interval.heroMoveInterval);
core.status.heroMoving = 0;
// render.offset = 0;
// render.move(false);
if (callback) callback();
}
},
((core.values.moveSpeed / 8) * toAdd) / core.status.replay.speed
);
};
////// 每移动一格后执行的事件 //////
@ -2988,25 +2991,23 @@ control.prototype.screenFlash = function (
// todo: deprecate playBgm, pauseBgm, resumeBgm, triggerBgm
////// 播放背景音乐 //////
control.prototype.playBgm = function (bgm, startTime) {
bgm = core.getMappedName(bgm);
if (main.mode !== 'play') return;
Mota.require('var', 'bgm').changeTo(bgm, startTime);
// see src/module/fallback/audio.ts
};
////// 暂停背景音乐的播放 //////
control.prototype.pauseBgm = function () {
if (main.mode !== 'play') return;
Mota.require('var', 'bgm').pause();
// see src/module/fallback/audio.ts
};
////// 恢复背景音乐的播放 //////
control.prototype.resumeBgm = function (resumeTime) {
if (main.mode !== 'play') return;
Mota.require('var', 'bgm').resume();
// see src/module/fallback/audio.ts
};
////// 更改背景音乐的播放 //////
control.prototype.triggerBgm = function () {
// see src/module/fallback/audio.ts
return;
if (main.mode !== 'play') return;
const bgm = Mota.require('var', 'bgm');
bgm.disable = !bgm.disable;
@ -3036,6 +3037,8 @@ control.prototype.getPlayingSounds = function (name) {
////// 检查bgm状态 //////
control.prototype.checkBgm = function () {
// see src/module/fallback/audio.ts
return;
const bgm = Mota.require('var', 'bgm');
if (bgm.disable) {
bgm.pause();

View File

@ -696,12 +696,12 @@ events.prototype.getItem = function (id, num, x, y, isGentleClick, callback) {
(id.endsWith('Key')
? '(钥匙类道具,遇到对应的门时自动打开)'
: itemCls == 'tools'
? '消耗类道具请按T在道具栏使用'
: itemCls == 'constants'
? '永久类道具请按T在道具栏使用'
: itemCls == 'equips'
? '装备类道具请按Q在装备栏进行装备'
: '')
? '消耗类道具请按T在道具栏使用'
: itemCls == 'constants'
? '永久类道具请按T在道具栏使用'
: itemCls == 'equips'
? '装备类道具请按Q在装备栏进行装备'
: '')
);
}
itemHint.push(id);

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -194,25 +194,26 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
],
"bgms": [
"beforeBoss.opus",
"cave.mp3",
"escape.mp3",
"escape2.mp3",
"grass.mp3",
"beforeNight.opus",
"cave.opus",
"chapter2ED.opus",
"escape.opus",
"escape2.opus",
"grass.opus",
"mount.opus",
"night.mp3",
"output6.ogg",
"palaceCenter.mp3",
"palaceNorth.mp3",
"palaceSouth.mp3",
"plot1.mp3",
"road.mp3",
"title.mp3",
"tower.mp3",
"towerBoss.mp3",
"towerBoss2.mp3",
"towerBoss3.mp3",
"winter.mp3",
"winterTown.mp3"
"night.opus",
"palaceCenter.opus",
"palaceNorth.opus",
"palaceSouth.opus",
"plot1.opus",
"road.opus",
"title.opus",
"tower.opus",
"towerBoss.opus",
"towerBoss2.opus",
"towerBoss3.opus",
"winter.opus",
"winterTown.opus"
],
"sounds": [
"008-System08.ogg",
@ -356,7 +357,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"首饰",
"首饰"
],
"startBgm": "title.mp3",
"startBgm": "title.opus",
"styles": {
"floorChangingStyle": " ",
"statusBarColor": [

View File

@ -120,7 +120,7 @@ main.floors.MT0=
"width": 15,
"height": 15,
"autoEvent": {},
"bgm": "cave.mp3",
"bgm": "cave.opus",
"beforeBattle": {},
"bg2map": [

View File

@ -12,7 +12,7 @@ main.floors.MT1=
"images": [],
"ratio": 1,
"defaultGround": "T331",
"bgm": "cave.mp3",
"bgm": "cave.opus",
"firstArrive": [
"\t[原始人]不知为何,最近这些蝙蝠的攻击性变得很强,而且还不知道从哪冒出来了这些黏糊糊的东西。",
"\t[原始人]之前捡到了一个来历不明的方块状东西(怪物手册),好像能打开,不知道里面有没有写什么",

View File

@ -12,7 +12,7 @@ main.floors.MT10=
"images": [],
"ratio": 1,
"defaultGround": "grass",
"bgm": "grass.mp3",
"bgm": "grass.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT11=
"images": [],
"ratio": 1,
"defaultGround": "grass",
"bgm": "grass.mp3",
"bgm": "grass.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT12=
"images": [],
"ratio": 1,
"defaultGround": "grass",
"bgm": "grass.mp3",
"bgm": "grass.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT13=
"images": [],
"ratio": 1,
"defaultGround": "grass",
"bgm": "mount.mp3",
"bgm": "mount.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT14=
"images": [],
"ratio": 1,
"defaultGround": "T331",
"bgm": "mount.mp3",
"bgm": "mount.opus",
"firstArrive": null,
"eachArrive": [
{

View File

@ -12,7 +12,7 @@ main.floors.MT15=
"images": [],
"ratio": 1,
"defaultGround": "T331",
"bgm": "mount.mp3",
"bgm": "mount.opus",
"color": [
0,
0,

View File

@ -12,7 +12,7 @@ main.floors.MT16=
"images": [],
"ratio": 1,
"defaultGround": "T331",
"bgm": "mount.mp3",
"bgm": "mount.opus",
"color": null,
"weather": [
"cloud",

View File

@ -12,7 +12,7 @@ main.floors.MT17=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "plot1.mp3",
"bgm": "plot1.opus",
"color": null,
"weather": null,
"firstArrive": [

View File

@ -12,7 +12,7 @@ main.floors.MT18=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "plot1.mp3",
"bgm": "plot1.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT19=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "plot1.mp3",
"bgm": "plot1.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT20=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "plot1.mp3",
"bgm": "plot1.opus",
"firstArrive": null,
"eachArrive": [
{

View File

@ -12,7 +12,7 @@ main.floors.MT21=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "plot1.mp3",
"bgm": "plot1.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT22=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "road.mp3",
"bgm": "road.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT23=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "road.mp3",
"bgm": "road.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT24=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "road.mp3",
"bgm": "road.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT25=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "road.mp3",
"bgm": "road.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT26=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "road.mp3",
"bgm": "road.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT27=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "road.mp3",
"bgm": "road.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT28=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "road.mp3",
"bgm": "road.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT3=
"images": [],
"ratio": 1,
"defaultGround": "T331",
"bgm": "cave.mp3",
"bgm": "cave.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT30=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "road.mp3",
"bgm": "road.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT31=
"images": [],
"ratio": 2,
"defaultGround": "grass",
"bgm": "road.mp3",
"bgm": "road.opus",
"firstArrive": [
"\t[低级智人]\b[up,hero]杰克,你为什么在这?",
"\t[杰克,thief]\b[up,4,7]哟,咱好久不见了,我只是来这里寻找点东西。",

View File

@ -12,7 +12,7 @@ main.floors.MT32=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [
{
"type": "function",

View File

@ -12,7 +12,7 @@ main.floors.MT33=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT34=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT35=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT36=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT37=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT38=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [
"\t[低级智人]\b[down,hero]奇怪,这里的山崖边竟然有护栏,难道这附近有其他人吗?"
],

View File

@ -12,7 +12,7 @@ main.floors.MT39=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT4=
"images": [],
"ratio": 1,
"defaultGround": "T331",
"bgm": "cave.mp3",
"bgm": "cave.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT40=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": null,
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT41=
"images": [],
"ratio": 8,
"defaultGround": "T331",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT42=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT43=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT44=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT45=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT46=
"images": [],
"ratio": 8,
"defaultGround": "T331",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT47=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT48=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT49=
"images": [],
"ratio": 8,
"defaultGround": "T580",
"bgm": "winter.mp3",
"bgm": "winter.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT5=
"images": [],
"ratio": 1,
"defaultGround": "T331",
"bgm": "cave.mp3",
"bgm": "cave.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT50=
"images": [],
"ratio": 8,
"defaultGround": "T650",
"bgm": "palaceSouth.mp3",
"bgm": "palaceSouth.opus",
"firstArrive": [
{
"type": "openDoor",

View File

@ -12,7 +12,7 @@ main.floors.MT51=
"images": [],
"ratio": 8,
"defaultGround": "T650",
"bgm": "palaceSouth.mp3",
"bgm": "palaceSouth.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT52=
"images": [],
"ratio": 8,
"defaultGround": "T650",
"bgm": "palaceSouth.mp3",
"bgm": "palaceSouth.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT53=
"images": [],
"ratio": 8,
"defaultGround": "T650",
"bgm": "palaceSouth.mp3",
"bgm": "palaceSouth.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT54=
"images": [],
"ratio": 8,
"defaultGround": "T650",
"bgm": "palaceSouth.mp3",
"bgm": "palaceSouth.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT55=
"images": [],
"ratio": 8,
"defaultGround": "T650",
"bgm": "palaceSouth.mp3",
"bgm": "palaceSouth.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT56=
"images": [],
"ratio": 8,
"defaultGround": "T650",
"bgm": "palaceSouth.mp3",
"bgm": "palaceSouth.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT57=
"images": [],
"ratio": 8,
"defaultGround": "T650",
"bgm": "palaceSouth.mp3",
"bgm": "palaceSouth.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

View File

@ -12,7 +12,7 @@ main.floors.MT58=
"images": [],
"ratio": 8,
"defaultGround": "T650",
"bgm": "palaceSouth.mp3",
"bgm": "palaceSouth.opus",
"firstArrive": [],
"eachArrive": [],
"parallelDo": "",

Some files were not shown because too many files have changed in this diff Show More