En mi juego, a veces quiero tocar música. Pero la música que ya se está reproduciendo no debe anularse.
Entonces, ¿cómo puedo
Idealmente en una interfaz global como this.sound
Gracias por adelantado
HTML5AudioSound tiene isPlaying miembro.
// inside scene method, create sound const music = this.sound.add('music-name', {}); music.play(); // and later if(music.isPlaying) { }Consulte https://newdocs.phaser.io/docs/3.54.0/Phaser.Sound.HTML5AudioSound#isPlaying y https://newdocs.phaser.io/docs/3.52.0/Phaser.Sound.HTML5AudioSoundManager
(este sonido es HTML5AudioSoundManager this.sound