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
e14d54ec
Commit
e14d54ec
authored
5 years ago
by
18손재민
Browse files
Options
Browse Files
Download
Plain Diff
시즌 20호 머지
parents
0be9638b
9126adbc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
GameServer.js
GameServer.js
+10
-4
Client.js
js/Client.js
+1
-1
ScenesData.js
js/ScenesData.js
+1
-1
No files found.
GameServer.js
View file @
e14d54ec
...
...
@@ -82,7 +82,7 @@ class GameRoom
{
this
.
roomId
=
GameServer
.
getRoomNumber
();
this
.
roomIndex
=
-
1
;
this
.
startCount
=
5
;
this
.
startCount
=
2
;
this
.
maxPlayer
=
100
;
this
.
nextRank
=
100
;
...
...
@@ -143,7 +143,8 @@ class GameRoom
{
if
(
this
.
currentPhase
===
GameServer
.
Phase
.
READY
)
{
this
.
endTime
=
Date
.
now
()
+
30000
;
// 방 대기 시간
this
.
countStartTime
=
Date
.
now
();
this
.
endTime
=
10000
;
// 방 대기 시간
this
.
announceToRoom
(
'
setRoomCount
'
,
{
isEnable
:
true
,
endTime
:
this
.
endTime
,
playerCount
:
this
.
currentPlayer
.
length
,
...
...
@@ -153,6 +154,7 @@ class GameRoom
}
else
if
(
this
.
currentPhase
===
GameServer
.
Phase
.
COUNT
)
{
this
.
endTime
=
this
.
endTime
-
(
Time
.
now
()
-
this
.
countStartTime
);
this
.
announceToRoom
(
'
setRoomCount
'
,
{
isEnable
:
true
,
endTime
:
this
.
endTime
,
playerCount
:
this
.
currentPlayer
.
length
,
...
...
@@ -264,13 +266,17 @@ class GameRoom
console
.
table
(
this
.
currentPlayer
);
this
.
announceToRoom
(
'
startGame
'
);
this
.
startTime
=
Date
.
now
();
setTimeout
(
function
()
{
this
.
checkPhase
(
Date
.
now
());
}.
bind
(
this
),
6000
);
}
checkPhase
(
checkTime
)
{
if
(
this
.
currentPhase
===
GameServer
.
Phase
.
START
)
{
if
(
this
.
phaseChanger
<
0
&&
checkTime
-
this
.
startTime
>
1
000
)
if
(
checkTime
-
this
.
startTime
>
6
000
)
{
this
.
currentPhase
=
GameServer
.
Phase
.
MAIN
;
this
.
rateArrangePoint
=
150
;
...
...
@@ -289,7 +295,7 @@ class GameRoom
}
else
if
(
this
.
currentPhase
===
GameServer
.
Phase
.
MAIN
)
{
let
playerLimit
=
Math
.
m
in
(
Math
.
round
(
this
.
currentPlayer
.
length
/
5
),
3
);
let
playerLimit
=
Math
.
m
ax
(
Math
.
round
(
this
.
currentPlayer
.
length
/
5
),
3
);
if
(
this
.
aliveCount
<=
playerLimit
)
{
this
.
currentPhase
=
GameServer
.
Phase
.
MUSIC
;
...
...
This diff is collapsed.
Click to expand it.
js/Client.js
View file @
e14d54ec
...
...
@@ -70,7 +70,7 @@ socket.on('setRoomCount', function(msg)
setTimeout
(
function
()
{
ScenesData
.
roomScene
.
isCounting
=
msg
.
isEnable
;
ScenesData
.
roomScene
.
endTime
=
msg
.
endTime
;
ScenesData
.
roomScene
.
endTime
=
Date
.
now
()
+
msg
.
endTime
;
ScenesData
.
roomScene
.
peopleCount
=
msg
.
playerCount
;
if
(
msg
.
isEnter
)
// generate character
...
...
This diff is collapsed.
Click to expand it.
js/ScenesData.js
View file @
e14d54ec
...
...
@@ -67,7 +67,7 @@ var menuScene = new Phaser.Class(
PlayerData
.
currentHopae
=
(
PlayerData
.
userData
.
recentHopae
==
null
)
?
PlayerData
.
userData
.
hopae
[
0
]
:
PlayerData
.
userData
.
recentHopae
;
PlayerData
.
nickname
=
PlayerData
.
currentHopae
.
name
;
this
.
userName
=
this
.
add
.
text
(
250
,
75
,
PlayerData
.
userData
.
userName
).
setOrigin
(
0
,
0.5
).
setColor
(
'
#000000
'
).
setDepth
(
9.9
).
setPadding
(
5
,
5
,
5
,
5
).
setFont
(
'
40pt sejongFont
'
);
this
.
userName
=
this
.
add
.
text
(
250
,
75
,
PlayerData
.
userData
.
userName
.
length
<
10
?
PlayerData
.
userData
.
userName
:
PlayerData
.
userData
.
userName
.
substr
(
0
,
8
)
+
'
...
'
).
setOrigin
(
0
,
0.5
).
setColor
(
'
#000000
'
).
setDepth
(
9.9
).
setPadding
(
5
,
5
,
5
,
5
).
setFont
(
'
40pt sejongFont
'
);
this
.
money
=
this
.
add
.
text
(
950
,
70
,
PlayerData
.
userData
.
money
+
'
냥
'
).
setOrigin
(
1
,
0.5
).
setColor
(
'
#ffffff
'
).
setDepth
(
9.9
).
setPadding
(
5
,
5
,
5
,
5
).
setFont
(
'
40pt sejongFont
'
);
this
.
organizeHopae
=
function
()
...
...
This diff is collapsed.
Click to expand it.
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