Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
sejong25
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Tear of Sejong
sejong25
Commits
f8e16ff0
Commit
f8e16ff0
authored
Jul 16, 2019
by
18김재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
함수명 명확하게 수정, 대기방 들어가면 장구소리 종료됨
parent
24fd8ba4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
BGMsound.js
js/BGMsound.js
+5
-6
Client.js
js/Client.js
+1
-0
ScenesData.js
js/ScenesData.js
+1
-0
No files found.
js/BGMsound.js
View file @
f8e16ff0
var
Audio
=
Audio
||
{}
var
bgm
;
Audio
.
loadSound
=
function
(
scene
)
{
scene
.
load
.
audio
(
'
login
'
,
'
assets/sound/login.ogg
'
);
...
...
@@ -8,33 +9,31 @@ Audio.loadSound = function(scene)
Audio
.
playSound
=
function
(
scene
,
title
)
// 한 번만 재생할 때 사용
{
var
bgm
=
scene
.
sound
.
add
(
title
);
bgm
=
scene
.
sound
.
add
(
title
);
bgm
.
play
();
}
Audio
.
loopSound
=
function
(
scene
,
title
)
// 반복재생할 때 사용
{
var
bgm
=
scene
.
sound
.
add
(
title
);
bgm
=
scene
.
sound
.
add
(
title
);
bgm
.
setLoop
(
true
);
bgm
.
play
();
}
Audio
.
pauseSound
=
function
(
scene
,
title
)
{
var
bgm
=
scene
.
sound
.
add
(
title
);
bgm
.
pause
();
}
Audio
.
resumeSound
=
function
(
scene
,
title
)
{
var
bgm
=
scene
.
sound
.
add
(
title
);
bgm
=
scene
.
sound
.
resume
();
}
Audio
.
stop
Sound
=
function
(
scene
,
title
)
Audio
.
kill
Sound
=
function
(
scene
,
title
)
{
var
bgm
=
scene
.
sound
.
add
(
title
);
bgm
.
setLoop
(
false
);
bgm
.
stop
();
console
.
log
(
'
killSound
'
);
}
js/Client.js
View file @
f8e16ff0
...
...
@@ -18,6 +18,7 @@ socket.on('setId', function(msg) // {str, num playerNum}
});
socket
.
on
(
'
enterRoom
'
,
function
()
{
Audio
.
killSound
(
ScenesData
.
menuScene
,
'
login
'
);
game
.
scene
.
remove
(
'
menuScene
'
);
game
.
scene
.
start
(
'
roomScene
'
);
});
...
...
js/ScenesData.js
View file @
f8e16ff0
...
...
@@ -24,6 +24,7 @@ var menuScene = new Phaser.Class(
Audio
.
loopSound
(
this
,
'
login
'
);
Input
.
inputField
.
generate
(
this
,
Input
.
menuSceneEnterReaction
);
BackGround
.
drawMenu
(
this
);
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment