Adjust game volume
This commit is contained in:
1 parent
c2cb433409
commit
96a15ccb0d
13 files changed
+62
-49
No files matched your search
@@ -236,7 +236,7 @@ class AnimTimedSoundEvent extends AnimTimedEvent {
|
||||
const soundConfig = { rate: (this.pitch * 0.01), volume: (this.volume * 0.01) };
|
||||
if (this.resourceName) {
|
||||
try {
|
||||
scene.sound.play(this.resourceName, soundConfig);
|
||||
scene.playSound(this.resourceName, soundConfig);
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ export function doPokeballBounceAnim(scene: BattleScene, pokeball: Phaser.GameOb
|
||||
duration: bouncePower * baseBounceDuration,
|
||||
ease: 'Cubic.easeIn',
|
||||
onComplete: () => {
|
||||
scene.sound.play('pb_bounce_1', { volume: bouncePower });
|
||||
scene.playSound('pb_bounce_1', { volume: bouncePower });
|
||||
|
||||
bouncePower = bouncePower > 0.01 ? bouncePower * 0.5 : 0;
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ export abstract class PokemonSpeciesForm {
|
||||
}
|
||||
|
||||
cry(scene: BattleScene, soundConfig?: Phaser.Types.Sound.SoundConfig): integer {
|
||||
scene.sound.play(this.speciesId.toString(), soundConfig);
|
||||
scene.playSound(this.speciesId.toString(), soundConfig);
|
||||
return scene.sound.get(this.speciesId.toString()).totalDuration * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user