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
94301cf4
Commit
94301cf4
authored
Jul 16, 2019
by
18신대성
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
시즌 11호 머지
parent
25692f08
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
1 deletion
+7
-1
GameServer.js
GameServer.js
+2
-0
ScenesData.js
js/ScenesData.js
+4
-1
server.js
server.js
+1
-0
No files found.
GameServer.js
View file @
94301cf4
...
@@ -93,6 +93,7 @@ GameServer.enterRoom = function(roomIdx, playerData)
...
@@ -93,6 +93,7 @@ GameServer.enterRoom = function(roomIdx, playerData)
{
{
room
.
endTime
=
Date
.
now
()
+
15000
;
// 테스트로 15초로 남겨둠
room
.
endTime
=
Date
.
now
()
+
15000
;
// 테스트로 15초로 남겨둠
this
.
announceToRoom
(
room
.
roomNum
,
'
setCount
'
,
{
isEnable
:
true
,
endTime
:
room
.
endTime
});
this
.
announceToRoom
(
room
.
roomNum
,
'
setCount
'
,
{
isEnable
:
true
,
endTime
:
room
.
endTime
});
room
.
currentPhase
=
this
.
Phase
.
COUNT
;
}
}
else
if
(
room
.
currentPhase
===
this
.
Phase
.
COUNT
)
// countinue count
else
if
(
room
.
currentPhase
===
this
.
Phase
.
COUNT
)
// countinue count
{
{
...
@@ -102,6 +103,7 @@ GameServer.enterRoom = function(roomIdx, playerData)
...
@@ -102,6 +103,7 @@ GameServer.enterRoom = function(roomIdx, playerData)
else
// stop count
else
// stop count
{
{
this
.
announceToRoom
(
room
.
roomNum
,
'
setCount
'
,
{
isEnable
:
false
,
endTime
:
0
});
this
.
announceToRoom
(
room
.
roomNum
,
'
setCount
'
,
{
isEnable
:
false
,
endTime
:
0
});
room
.
currentPhase
=
this
.
Phase
.
READY
;
}
}
return
room
;
return
room
;
}
}
...
...
js/ScenesData.js
View file @
94301cf4
...
@@ -48,14 +48,17 @@ var roomScene = new Phaser.Class(
...
@@ -48,14 +48,17 @@ var roomScene = new Phaser.Class(
{
{
this
.
isCounting
=
false
;
this
.
isCounting
=
false
;
this
.
endTime
=
0
;
this
.
endTime
=
0
;
this
.
peopleCount
=
1
;
this
.
countText
=
this
.
add
.
text
(
640
,
360
,
'
사람들을 위해 대기중입니다...
'
).
setOrigin
(
0.5
,
0.5
).
setColor
(
'
#000000
'
);
this
.
countText
=
this
.
add
.
text
(
640
,
360
,
'
사람들을 위해 대기중입니다...
'
).
setOrigin
(
0.5
,
0.5
).
setColor
(
'
#000000
'
);
this
.
peopleText
=
this
.
add
.
text
(
640
,
100
,
'
1 / 10
'
).
setOrigin
(
0.5
,
0.5
).
setColor
(
'
#000000
'
);
},
},
update
:
function
()
update
:
function
()
{
{
this
.
peopleText
.
setText
(
peopleCount
+
'
/ 10
'
);
if
(
this
.
isCounting
)
if
(
this
.
isCounting
)
{
{
this
.
countText
.
setText
((
this
.
endTime
-
Date
.
now
())
/
1000
);
this
.
countText
.
setText
((
(
this
.
endTime
-
Date
.
now
())
/
1000
).
toFixed
(
1
)
);
if
(
this
.
endTime
-
Date
.
now
()
<
0
)
if
(
this
.
endTime
-
Date
.
now
()
<
0
)
{
{
socket
.
emit
(
'
endCount
'
);
socket
.
emit
(
'
endCount
'
);
...
...
server.js
View file @
94301cf4
...
@@ -144,6 +144,7 @@ io.on('connection', function(socket)
...
@@ -144,6 +144,7 @@ io.on('connection', function(socket)
if
(
data
.
currentRoom
.
aliveCount
<
GameServer
.
startCount
)
if
(
data
.
currentRoom
.
aliveCount
<
GameServer
.
startCount
)
{
{
GameServer
.
announceToRoom
(
GameServer
.
findRoomIndex
(
data
.
currentRoom
.
roomNum
),
'
setCount
'
,
{
isEnable
:
false
,
endTime
:
0
});
GameServer
.
announceToRoom
(
GameServer
.
findRoomIndex
(
data
.
currentRoom
.
roomNum
),
'
setCount
'
,
{
isEnable
:
false
,
endTime
:
0
});
room
.
currentPhase
=
this
.
Phase
.
READY
;
}
}
}
}
else
if
(
data
.
playingData
.
isAlive
)
else
if
(
data
.
playingData
.
isAlive
)
...
...
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