mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-24 00:39:32 +09:00
enhance(drop-and-fusion): tweak sounds
This commit is contained in:
parent
b920435068
commit
c2a9a7b69e
BIN
packages/frontend/assets/drop-and-fusion/collision_yen.mp3
Normal file
BIN
packages/frontend/assets/drop-and-fusion/collision_yen.mp3
Normal file
Binary file not shown.
BIN
packages/frontend/assets/drop-and-fusion/fusion_yen.mp3
Normal file
BIN
packages/frontend/assets/drop-and-fusion/fusion_yen.mp3
Normal file
Binary file not shown.
@ -1085,16 +1085,35 @@ function attachGameEvents() {
|
|||||||
game.addListener('sfx', (type, params) => {
|
game.addListener('sfx', (type, params) => {
|
||||||
if (props.mute) return;
|
if (props.mute) return;
|
||||||
|
|
||||||
const soundUrl =
|
if (type === 'fusion') {
|
||||||
type === 'fusion' ? '/client-assets/drop-and-fusion/bubble2.mp3' :
|
if (props.gameMode === 'yen') {
|
||||||
type === 'collision' ? '/client-assets/drop-and-fusion/poi1.mp3' :
|
sound.playUrl('/client-assets/drop-and-fusion/fusion_yen.mp3', {
|
||||||
null as never;
|
volume: 0.3 * params.volume * sfxVolume.value,
|
||||||
|
pan: params.pan,
|
||||||
sound.playUrl(soundUrl, {
|
playbackRate: (params.pitch / 4) * replayPlaybackRate.value,
|
||||||
volume: params.volume * sfxVolume.value,
|
});
|
||||||
pan: params.pan,
|
} else {
|
||||||
playbackRate: params.pitch * replayPlaybackRate.value,
|
sound.playUrl('/client-assets/drop-and-fusion/fusion.mp3', {
|
||||||
});
|
volume: params.volume * sfxVolume.value,
|
||||||
|
pan: params.pan,
|
||||||
|
playbackRate: params.pitch * replayPlaybackRate.value,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
} else if (type === 'collision') {
|
||||||
|
if (props.gameMode === 'yen') {
|
||||||
|
sound.playUrl('/client-assets/drop-and-fusion/collision_yen.mp3', {
|
||||||
|
volume: params.volume * sfxVolume.value,
|
||||||
|
pan: params.pan,
|
||||||
|
playbackRate: params.pitch * replayPlaybackRate.value,
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
sound.playUrl('/client-assets/drop-and-fusion/collision.mp3', {
|
||||||
|
volume: params.volume * sfxVolume.value,
|
||||||
|
pan: params.pan,
|
||||||
|
playbackRate: params.pitch * replayPlaybackRate.value,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user