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
083dc35e
Commit
083dc35e
authored
Aug 21, 2019
by
18김재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
오타 수정, 처음에 리소스 안불러와지는 버그 수정
parent
0b3c5d88
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
11 deletions
+32
-11
BGMsound.js
js/BGMsound.js
+1
-1
Client.js
js/Client.js
+13
-10
ScenesData.js
js/ScenesData.js
+11
-0
WordSpace.js
js/WordSpace.js
+7
-0
No files found.
js/BGMsound.js
View file @
083dc35e
...
...
@@ -12,7 +12,7 @@ Audio.loadSound = function(scene)
// 게임 진행 중 효과음들
scene
.
load
.
audio
(
'
attack
'
,
'
assets/sound/attackShort.ogg
'
);
scene
.
load
.
audio
(
'
Bagazi
'
,
'
a
a
ssets/sound/Bagazi_ddak.ogg
'
);
scene
.
load
.
audio
(
'
Bagazi
'
,
'
assets/sound/Bagazi_ddak.ogg
'
);
scene
.
load
.
audio
(
'
getItem
'
,
'
assets/sound/getItem.ogg
'
);
scene
.
load
.
audio
(
'
killLog
'
,
'
assets/sound/killLog.ogg
'
);
scene
.
load
.
audio
(
'
killWord
'
,
'
assets/sound/killWord.ogg
'
);
...
...
js/Client.js
View file @
083dc35e
...
...
@@ -124,7 +124,6 @@ socket.on('startGame', function()
// in game
socket
.
on
(
'
changePhase
'
,
function
(
msg
)
// number Phase
{
// Audio.killSound('gameScene',) -> 여기다 게임 페이즈 bgm 넣으면 됨
WordSpace
.
changePhase
(
msg
);
});
socket
.
on
(
'
setPlayerTypingRate
'
,
function
(
msg
)
// number playerTypingRate
...
...
@@ -155,7 +154,7 @@ socket.on('someoneAttacked', function(msg) // {Id attackerId, Id victimId}
socket
.
on
(
'
attacked
'
,
function
(
msg
)
// object attackData
{
Audio
.
playSound
(
ScenesData
.
gameScene
,
'
Bagazi
'
);
let
attackedEvent
=
new
Cycle
(
function
()
{
if
(
!
WordSpace
.
isInvincible
)
...
...
@@ -207,10 +206,12 @@ socket.on('defeat', function(msg) // object player
let
position
=
RoomData
.
findPlayer
(
msg
.
id
).
position
;
let
nicknameText
=
RoomData
.
findPlayer
(
msg
.
id
).
nicknameText
;
// 이거 조건문으로 페이즈마다 다르게 해줘야 하는데 모르겠음
Audio
.
killSound
(
ScenesData
.
gameScene
,
'
Phase1
'
);
Audio
.
killSound
(
ScenesData
.
gameScene
,
'
Phase2
'
);
Audio
.
killSound
(
ScenesData
.
gameScene
,
'
Phase3
'
);
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
;
...
...
@@ -369,10 +370,12 @@ socket.on('gameEnd', function(msg) // number winnerId
{
const
winner
=
RoomData
.
findPlayer
(
msg
);
// 패배랑 같은 이유의 조건문 필요
Audio
.
killSound
(
ScenesData
.
gameScene
,
'
Phase1
'
);
Audio
.
killSound
(
ScenesData
.
gameScene
,
'
Phase2
'
);
Audio
.
killSound
(
ScenesData
.
gameScene
,
'
Phase3
'
);
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
,
'
victory
'
);
console
.
log
(
winner
.
nickname
+
'
Win!!!!!!
'
);
...
...
js/ScenesData.js
View file @
083dc35e
...
...
@@ -20,6 +20,7 @@ var menuScene = new Phaser.Class(
ResourceLoader
.
loadImage
(
this
);
CSVParsing
.
loadText
(
this
);
Audio
.
loadSound
(
this
);
this
.
load
.
scenePlugin
({
key
:
'
rexuiplugin
'
,
url
:
'
https://raw.githubusercontent.com/rexrainbow/phaser3-rex-notes/master/plugins/dist/rexuiplugin.min.js
'
,
...
...
@@ -420,6 +421,7 @@ var gameScene = new Phaser.Class(
preload
:
function
()
{
ScenesData
.
gameScene
=
this
;
Audio
.
loadSound
(
this
);
this
.
load
.
scenePlugin
({
key
:
'
rexuiplugin
'
,
url
:
'
https://raw.githubusercontent.com/rexrainbow/phaser3-rex-notes/master/plugins/dist/rexuiplugin.min.js
'
,
...
...
@@ -443,6 +445,14 @@ var gameScene = new Phaser.Class(
BackGround
.
drawBrain
(
this
);
BackGround
.
drawCharacter
(
this
);
Audio
.
playSound
(
this
,
'
startGame
'
);
if
(
WordSpace
.
CurrentPhase
==
1
)
Audio
.
loopSound
(
this
,
'
Phase1
'
);
else
if
(
WordSpace
.
CurrentPhase
==
2
)
Audio
.
loopSound
(
this
,
'
Phase2
'
);
else
Audio
.
loopSound
(
this
,
'
Phase3
'
);
WordSpace
.
attackPaperGroup
=
this
.
physics
.
add
.
group
();
WordSpace
.
wordPhysicsGroup
=
this
.
physics
.
add
.
group
();
...
...
@@ -506,6 +516,7 @@ var gameScene = new Phaser.Class(
ScenesData
.
changeScene
=
function
(
sceneKey
)
{
Audio
.
killSound
(
ScenesData
.
menuScene
,
'
login
'
);
ScenesData
.
currentScene
.
scene
.
start
(
sceneKey
);
Input
.
input
=
[];
Input
.
converted
=
''
;
...
...
js/WordSpace.js
View file @
083dc35e
...
...
@@ -494,6 +494,13 @@ WordSpace.changePhase = function(newPhase)
console
.
log
(
'
phase changed from
'
+
WordSpace
.
CurrentPhase
+
'
to
'
+
newPhase
);
WordSpace
.
CurrentPhase
=
newPhase
;
if
(
WordSpace
.
CurrentPhase
==
1
)
Audio
.
killSound
(
'
gameScene
'
,
'
Phase1
'
);
else
if
(
WordSpace
.
CurrentPhase
==
2
)
Audio
.
killSound
(
'
gameScene
'
,
'
Phase2
'
);
else
Audio
.
killSound
(
'
gameScene
'
,
'
Phase3
'
);
//WordSpace.pauseCycle(true);
// 여기서 종이 드르륵 열면됨
let
phaseChangeBgr
=
ScenesData
.
gameScene
.
add
.
sprite
(
game
.
config
.
width
/
2
,
game
.
config
.
height
/
2
,
'
phase
'
+
newPhase
).
setOrigin
(
0.5
,
0.5
).
setDepth
(
9.9
).
play
(
'
phase
'
+
newPhase
+
'
Anim
'
);
...
...
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