Commit e328b615 authored by 18손재민's avatar 18손재민

Merge remote-tracking branch 'origin/sound'

# Conflicts:
#	GameServer.js
parents d18488f1 4da8cb65
...@@ -2,27 +2,34 @@ var Audio = Audio || {} ...@@ -2,27 +2,34 @@ var Audio = Audio || {}
Audio.loadSound = function(scene) Audio.loadSound = function(scene)
{ {
scene.load.audio('menuBackground', 'assets/sound/BGM_twochae.ogg') scene.load.audio('BGM', 'assets/sound/login.ogg');
} }
Audio.playSound = function(scene) Audio.playSound = function(scene)
{ {
bgm = scene.sound.play('menuBackground') var bgm = scene.sound.add('BGM');
bgm.setLoop(true);
bgm.play();
console.log('PlayMusic');
} }
Audio.pauseSound = function(scene) Audio.pauseSound = function(scene)
{ {
bgm = scene.sound.pause() var bgm = scene.sound.add('BGM');
bgm.pause();
} }
Audio.resumeSound = function(scene) Audio.resumeSound = function(scene)
{ {
bgm = scene.sound.resume() var bgm = scene.sound.add('BGM');
bgm = scene.sound.resume();
} }
Audio.stopSound = function(scene) Audio.stopSound = function(scene)
{ {
bgm = scene.sound.stop() var bgm = scene.sound.add('BGM');
bgm.stop();
console.log('StopMusic');
} }
// var Audio = new Audio('assets/sound/BGM_twochae.ogg');
// Audio.play();
\ No newline at end of file
...@@ -18,9 +18,9 @@ var menuScene = new Phaser.Class( ...@@ -18,9 +18,9 @@ var menuScene = new Phaser.Class(
create: function() create: function()
{ {
Audio.playSound(this);
Input.inputField.generate(this, Input.menuSceneEnterReaction); Input.inputField.generate(this, Input.menuSceneEnterReaction);
BackGround.drawMenu(this); BackGround.drawMenu(this);
Audio.playSound(this);
} }
}); });
...@@ -95,6 +95,7 @@ var gameScene = new Phaser.Class( ...@@ -95,6 +95,7 @@ var gameScene = new Phaser.Class(
update: function() update: function()
{ {
WordSpace.wordForcedGroup.forEach(function(element) WordSpace.wordForcedGroup.forEach(function(element)
{ {
element.attract(); element.attract();
......
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