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 || {}
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)
{
bgm = scene.sound.play('menuBackground')
var bgm = scene.sound.add('BGM');
bgm.setLoop(true);
bgm.play();
console.log('PlayMusic');
}
Audio.pauseSound = function(scene)
{
bgm = scene.sound.pause()
var bgm = scene.sound.add('BGM');
bgm.pause();
}
Audio.resumeSound = function(scene)
{
bgm = scene.sound.resume()
var bgm = scene.sound.add('BGM');
bgm = scene.sound.resume();
}
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(
create: function()
{
Audio.playSound(this);
Input.inputField.generate(this, Input.menuSceneEnterReaction);
BackGround.drawMenu(this);
Audio.playSound(this);
}
});
......@@ -47,7 +47,7 @@ var gameScene = new Phaser.Class(
{
CSVParsing.CSVParse(this);
BackGround.drawBrain(this);
WordSpace.wordPhysicsGroup = this.physics.add.group();
Input.inputField.generate(this, Input.gameSceneEnterReaction);
......@@ -95,6 +95,7 @@ var gameScene = new Phaser.Class(
update: function()
{
WordSpace.wordForcedGroup.forEach(function(element)
{
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