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

음악 처음부터 시작, 반복

parent a355eadd
var GameServer = GameServer || {}; var GameServer = GameServer || {};
GameServer.Phase = {READY: 0, START: 1, MAIN: 2, MUSIC: 3}; GameServer.Phase = {READY: 0, START: 1, MAIN: 2, MUSIC: 3};
GameServer.startCount = 4; GameServer.startCount = 1;
GameServer.currentPlayer = []; GameServer.currentPlayer = [];
GameServer.playingRoom = []; GameServer.playingRoom = [];
......
...@@ -10,21 +10,26 @@ Audio.playSound = function(scene) ...@@ -10,21 +10,26 @@ Audio.playSound = function(scene)
var bgm = scene.sound.add('BGM'); var bgm = scene.sound.add('BGM');
bgm.setLoop(true); bgm.setLoop(true);
bgm.play(); 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)
{ {
var bgm = scene.sound.add('BGM');
bgm = scene.sound.resume(); 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');
} }
...@@ -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);
} }
}); });
...@@ -80,6 +80,7 @@ var gameScene = new Phaser.Class( ...@@ -80,6 +80,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