Commit e4c6d54c authored by 18류지석's avatar 18류지석

Merge remote-tracking branch 'origin/sound'

parents a1ff4ffd 73b1b9d4
......@@ -12,6 +12,7 @@
<script src="js/WordReader.js"></script>
<script src="js/CSVParsing.js"></script>
<script src="js/SelectWord.js"></script>
<script src="js/BGMsound.js"></script>
</head>
<body>
<script src="js/Client.js"></script>
......
var Audio = Audio || {}
Audio.loadSound = function(scene)
{
scene.load.audio('menuBackground', 'assets/sound/BGM_twochae.ogg')
}
Audio.playSound = function(scene)
{
bgm = scene.sound.play('menuBackground')
}
Audio.pauseSound = function(scene)
{
bgm = scene.sound.pause()
}
Audio.resumeSound = function(scene)
{
bgm = scene.sound.resume()
}
Audio.stopSound = function(scene)
{
bgm = scene.sound.stop()
}
// var Audio = new Audio('assets/sound/BGM_twochae.ogg');
// Audio.play();
\ No newline at end of file
......@@ -13,12 +13,14 @@ var menuScene = new Phaser.Class(
{
Input.inputField.loadImage(this);
BackGround.loadImage(this);
Audio.loadSound(this);
},
create: function()
{
Input.inputField.generate(this, Input.menuSceneEnterReaction);
BackGround.drawMenu(this);
Audio.playSound(this);
}
});
......
This diff is collapsed.
......@@ -14,6 +14,7 @@
"license": "ISC",
"dependencies": {
"express": "^4.17.1",
"socket.io": "^2.2.0"
"socket.io": "^2.2.0",
"web-audio-player": "^1.3.3"
}
}
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