Odtwórz plik audio w Phaser
unction preload ()
{
this.load.audio('theme', [
'assets/audio/oedipus_wizball_highscore.ogg',
'assets/audio/oedipus_wizball_highscore.mp3'
]);
this.load.image('wizball', 'assets/sprites/wizball.png');
}
function create ()
{
this.add.image(400, 300, 'wizball').setScale(4);
var music = this.sound.add('theme');
music.play();
}
Himanshu Jangid