bgm
This commit is contained in:
parent
f557aaf553
commit
79f0854371
@ -1353,8 +1353,10 @@ actions.prototype.clickSwitchs = function (x,y) {
|
||||
core.musicStatus.bgmStatus = !core.musicStatus.bgmStatus;
|
||||
if (core.musicStatus.bgmStatus)
|
||||
core.resumeBgm();
|
||||
else
|
||||
else {
|
||||
core.pauseBgm();
|
||||
core.musicStatus.playingBgm = null;
|
||||
}
|
||||
core.setLocalStorage('bgmStatus', core.musicStatus.bgmStatus);
|
||||
core.ui.drawSwitchs();
|
||||
break;
|
||||
|
||||
@ -300,6 +300,8 @@ control.prototype.startGame = function (hard, callback) {
|
||||
////// 重新开始游戏;此函数将回到标题页面 //////
|
||||
control.prototype.restart = function() {
|
||||
this.showStartAnimate();
|
||||
if (core.bgms.length>0)
|
||||
core.playBgm(core.bgms[0]);
|
||||
}
|
||||
|
||||
|
||||
@ -1994,6 +1996,10 @@ control.prototype.resumeBgm = function () {
|
||||
}
|
||||
else {
|
||||
if (core.bgms.length>0) {
|
||||
if (core.isset(core.floors[core.status.floorId].bgm)) {
|
||||
core.playBgm(core.floors[core.status.floorId].bgm);
|
||||
}
|
||||
else
|
||||
core.playBgm(core.bgms[0]);
|
||||
core.musicStatus.isPlaying = true;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user