Commit 13c39cee authored by 18류지석's avatar 18류지석

Merge branch 'sound'

parents 78cf2377 74b1f5ae
No preview for this file type
......@@ -5,6 +5,8 @@ Audio.loadSound = function(scene)
{
scene.load.audio('login', 'assets/sound/login.ogg');
scene.load.audio('startGame', 'assets/sound/startGame.ogg');
scene.load.audio('attack', 'assets/sound/attackShort.ogg');
scene.load.audio('inRoom', 'assets/sound/roomBGM.ogg');
}
Audio.playSound = function(scene, title) // 한 번만 재생할 때 사용
......
......@@ -103,6 +103,7 @@ socket.on('syncRoomData', function(msg) // {num roomNum, [] players}
});
socket.on('startGame', function()
{
Audio.killSound(ScenesData.roomScene, 'inRoom');
game.scene.remove('roomScene');
game.scene.start('gameScene');
});
......
......@@ -49,7 +49,7 @@ var roomScene = new Phaser.Class(
create: function()
{
BackGround.drawRoom(this);
Audio.loopSound(this, 'inRoom');
this.players = [];
this.isCounting = false;
......
......@@ -403,6 +403,7 @@ WordSpace.attack = function(wordText, grade)
if (wordText != '')
{
console.log('attack ' + wordText + ', grade: ' + grade);
Audio.playSound(ScenesData.gameScene, 'attack');
let toSend = [];
WordSpace.nameGroup.forEach(function(element)
{
......
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