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
24fd8ba4
Commit
24fd8ba4
authored
Jul 14, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'physics' into release
parents
0a7d9205
2e8f2507
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
14 deletions
+20
-14
BGMsound.js
js/BGMsound.js
+17
-12
ScenesData.js
js/ScenesData.js
+3
-2
No files found.
js/BGMsound.js
View file @
24fd8ba4
...
...
@@ -2,34 +2,39 @@ var Audio = Audio || {}
Audio
.
loadSound
=
function
(
scene
)
{
scene
.
load
.
audio
(
'
BGM
'
,
'
assets/sound/login.ogg
'
);
scene
.
load
.
audio
(
'
login
'
,
'
assets/sound/login.ogg
'
);
scene
.
load
.
audio
(
'
startGame
'
,
'
assets/sound/startGame.ogg
'
);
}
Audio
.
playSound
=
function
(
scene
)
Audio
.
playSound
=
function
(
scene
,
title
)
// 한 번만 재생할 때 사용
{
var
bgm
=
scene
.
sound
.
add
(
'
BGM
'
);
bgm
.
setLoop
(
true
);
var
bgm
=
scene
.
sound
.
add
(
title
);
bgm
.
play
();
console
.
log
(
'
PlayMusic
'
);
}
Audio
.
loopSound
=
function
(
scene
,
title
)
// 반복재생할 때 사용
{
var
bgm
=
scene
.
sound
.
add
(
title
);
bgm
.
setLoop
(
true
);
bgm
.
play
();
}
Audio
.
pauseSound
=
function
(
scene
)
Audio
.
pauseSound
=
function
(
scene
,
title
)
{
var
bgm
=
scene
.
sound
.
add
(
'
BGM
'
);
var
bgm
=
scene
.
sound
.
add
(
title
);
bgm
.
pause
();
}
Audio
.
resumeSound
=
function
(
scene
)
Audio
.
resumeSound
=
function
(
scene
,
title
)
{
var
bgm
=
scene
.
sound
.
add
(
'
BGM
'
);
var
bgm
=
scene
.
sound
.
add
(
title
);
bgm
=
scene
.
sound
.
resume
();
}
Audio
.
stopSound
=
function
(
scene
)
Audio
.
stopSound
=
function
(
scene
,
title
)
{
var
bgm
=
scene
.
sound
.
add
(
'
BGM
'
);
var
bgm
=
scene
.
sound
.
add
(
title
);
bgm
.
setLoop
(
false
);
bgm
.
stop
();
console
.
log
(
'
StopMusic
'
);
}
js/ScenesData.js
View file @
24fd8ba4
...
...
@@ -21,7 +21,7 @@ var menuScene = new Phaser.Class(
create
:
function
()
{
Audio
.
playSound
(
this
);
Audio
.
loopSound
(
this
,
'
login
'
);
Input
.
inputField
.
generate
(
this
,
Input
.
menuSceneEnterReaction
);
BackGround
.
drawMenu
(
this
);
}
...
...
@@ -86,13 +86,14 @@ var gameScene = new Phaser.Class(
WordSpace
.
loadImage
(
this
);
Input
.
inputField
.
loadImage
(
this
);
CSVParsing
.
loadText
(
this
);
Audio
.
loadSound
(
this
);
},
create
:
function
()
{
CSVParsing
.
CSVParse
(
this
);
BackGround
.
drawBrain
(
this
);
Audio
.
playSound
(
this
,
'
startGame
'
);
WordSpace
.
wordPhysicsGroup
=
this
.
physics
.
add
.
group
();
Input
.
inputField
.
generate
(
this
,
Input
.
gameSceneEnterReaction
);
...
...
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