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

패배시 bgm 추가

parent 58f0c50f
......@@ -207,14 +207,7 @@ socket.on('defeat', function(msg) // object player
let nicknameText = RoomData.findPlayer(msg.id).nicknameText;
let earnedStrongHopae = RoomData.findPlayer(msg.id).earnedStrongHopae;
if(WordSpace.CurrentPhase == 1)
Audio.killSound(ScenesData.gameScene, 'Phase1');
if(WordSpace.CurrentPhase == 2)
Audio.killSound(ScenesData.gameScene, 'Phase2');
if(WordSpace.CurrentPhase == 3)
Audio.killSound(ScenesData.gameScene, 'Phase3');
Audio.playSound(ScenesData.gameScene, 'defeat');
RoomData.players[msg.index] = msg;
RoomData.players[msg.index].playerImage = playerImage;
RoomData.players[msg.index].position = position;
......
......@@ -36,7 +36,9 @@ var menuScene = new Phaser.Class(
{
ResourceLoader.loadAnimation(this);
BackGround.drawMenu(this);
Audio.playSound(this, 'login');
Audio.killSound(ScenesData.gameScene, 'defeat');
Audio.killSound(ScenesData.gameScene, 'victory');
Audio.loopSound(this, 'login');
ScenesData.menuScene.tutorialFrame = 0;
ScenesData.menuScene.tutorialImage = UIObject.createButton(this, UIObject.createLabel(this, game.config.width / 2, game.config.height / 2, 11,
'tutorialImage', 1, 'center'), -2, -2, -2,
......
......@@ -218,6 +218,15 @@ function gameOver()
{
WordSpace.pauseCycle(true);
if(WordSpace.CurrentPhase == 1)
Audio.killSound(ScenesData.gameScene, 'Phase1');
if(WordSpace.CurrentPhase == 2)
Audio.killSound(ScenesData.gameScene, 'Phase2');
if(WordSpace.CurrentPhase == 3)
Audio.killSound(ScenesData.gameScene, 'Phase3');
Audio.playSound(ScenesData.gameScene, 'defeat');
socket.emit('defeated');
console.log('defeat');
}
......
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