Merge pull request #1307 from mengxinzxz/PR-Branch

连环音效更新
This commit is contained in:
Spmario233 2024-05-03 14:22:41 +08:00 committed by GitHub
commit 2a2c88b17b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 11 deletions

Binary file not shown.

BIN
audio/effect/link_clear.mp3 Normal file

Binary file not shown.

View File

@ -9186,19 +9186,13 @@ export const Content = {
game.addVideo("turnOver", player, player.classList.contains("turnedover"));
},
link: function () {
if (player.isLinked()) {
game.log(player, "解除连环");
} else {
game.log(player, "被连环");
}
if (lib.config.background_audio) {
game.playAudio("effect", "link");
}
game.broadcast(function () {
const isLinked = player.isLinked();
game.log(player, (isLinked ? "解除" : "被") + "连环");
game.broadcastAll(isLinked => {
if (lib.config.background_audio) {
game.playAudio("effect", "link");
game.playAudio("effect", "link" + (isLinked ? "_clear" : ""));
}
});
}, isLinked);
player.classList.remove("target");
if (get.is.linked2(player)) {
player.classList.toggle("linked2");