Commit a355eadd authored by 18김재민's avatar 18김재민

음악 처음부터 시작, 반복 성공 / 넘어가면 멈추게 해야함

parent 2fdf73fd
......@@ -2,27 +2,29 @@ var Audio = Audio || {}
Audio.loadSound = function(scene)
{
scene.load.audio('menuBackground', 'assets/sound/BGM_twochae.ogg')
scene.load.audio('BGM', 'assets/sound/BGM_twochae.ogg');
}
Audio.playSound = function(scene)
{
bgm = scene.sound.play('menuBackground')
var bgm = scene.sound.add('BGM');
bgm.setLoop(true);
bgm.play();
}
Audio.pauseSound = function(scene)
{
bgm = scene.sound.pause()
bgm = scene.sound.pause();
}
Audio.resumeSound = function(scene)
{
bgm = scene.sound.resume()
bgm = scene.sound.resume();
}
Audio.stopSound = function(scene)
{
bgm = scene.sound.stop()
bgm = scene.sound.stop();
}
// var Audio = new Audio('assets/sound/BGM_twochae.ogg');
// Audio.play();
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment