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
0b81dc2a
Commit
0b81dc2a
authored
Jul 18, 2019
by
18손재민
Committed by
18신대성
Jul 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
공격 단어 반격 시간 마스크로 표시함
parent
008e21b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
13 deletions
+7
-13
GameServer.js
GameServer.js
+1
-1
WordObject.js
js/WordObject.js
+6
-12
No files found.
GameServer.js
View file @
0b81dc2a
...
...
@@ -91,7 +91,7 @@ GameServer.enterRoom = function(roomIdx, playerData)
{
if
(
room
.
currentPhase
===
this
.
Phase
.
READY
)
// start count
{
room
.
endTime
=
Date
.
now
()
+
1
5
000
;
// 테스트로 15초로 남겨둠
room
.
endTime
=
Date
.
now
()
+
1000
;
// 테스트로 15초로 남겨둠
this
.
announceToRoom
(
room
.
roomNum
,
'
setCount
'
,
{
isEnable
:
true
,
endTime
:
room
.
endTime
});
room
.
currentPhase
=
this
.
Phase
.
COUNT
;
}
...
...
js/WordObject.js
View file @
0b81dc2a
...
...
@@ -158,22 +158,15 @@ class AttackWord extends WordObject
this
.
maskBackground
=
scene
.
physics
.
add
.
sprite
(
this
.
physicsObj
.
x
,
this
.
physicsObj
.
y
,
'
wordBgr
'
+
this
.
wordGrade
+
'
_
'
+
Math
.
min
(
Math
.
max
(
2
,
this
.
wordText
.
length
),
6
))
.
setTint
(
Phaser
.
Display
.
Color
.
GetColor
(
120
,
120
,
120
)).
setScale
(
this
.
scale
);
this
.
maskBackground
.
alpha
=
0.5
;
console
.
log
(
'
scale
'
+
this
.
scale
);
console
.
log
(
'
this.physicsObj.width
'
+
this
.
physicsObj
.
width
);
console
.
log
(
'
this.physicsObj.height
'
+
this
.
physicsObj
.
height
);
console
.
log
(
'
this.physicsObj.body.width
'
+
this
.
physicsObj
.
body
.
width
);
console
.
log
(
'
this.physicsObj.body.height
'
+
this
.
physicsObj
.
body
.
height
);
this
.
shape
=
scene
.
make
.
graphics
();
var
rect
=
new
Phaser
.
Geom
.
Rectangle
(
0
,
0
,
this
.
physicsObj
.
width
,
this
.
physicsObj
.
height
);
console
.
log
(
rect
);
console
.
log
(
this
.
shape
);
var
rect
=
new
Phaser
.
Geom
.
Rectangle
(
0
,
0
,
this
.
maskBackground
.
width
*
this
.
scale
,
this
.
maskBackground
.
height
*
this
.
scale
);
this
.
shape
.
fillStyle
(
0xffffff
).
fillRectShape
(
rect
);
this
.
mask
=
this
.
shape
.
createGeometryMask
();
this
.
maskBackground
.
setMask
(
this
.
mask
);
this
.
maskStart
=
this
.
physicsObj
.
x
;
this
.
maskEnd
=
this
.
physicsObj
.
x
-
this
.
physicsObj
.
width
;
this
.
maskEnd
=
this
.
physicsObj
.
x
-
this
.
physicsObj
.
width
*
this
.
scale
;
}
attract
()
...
...
@@ -183,8 +176,8 @@ class AttackWord extends WordObject
{
this
.
maskBackground
.
setPosition
(
this
.
physicsObj
.
x
,
this
.
physicsObj
.
y
);
this
.
shape
.
x
=
this
.
physicsObj
.
x
+
(
this
.
maskEnd
-
this
.
maskStart
)
*
((
WordSpace
.
gameTimer
.
now
-
this
.
createdTime
)
/
(
this
.
counterTime
-
this
.
createdTime
))
-
this
.
physicsObj
.
width
/
2
;
this
.
shape
.
y
=
this
.
physicsObj
.
y
-
this
.
physicsObj
.
height
/
2
;
((
WordSpace
.
gameTimer
.
now
-
this
.
createdTime
)
/
(
this
.
counterTime
-
this
.
createdTime
))
-
this
.
physicsObj
.
width
*
this
.
scale
/
2
;
this
.
shape
.
y
=
this
.
physicsObj
.
y
-
this
.
physicsObj
.
height
*
this
.
scale
/
2
;
}
else
if
(
this
.
maskBackground
!=
null
)
this
.
maskBackground
.
destroy
();
}
...
...
@@ -224,7 +217,8 @@ class NameWord extends WordObject
attract
()
{
if
(
this
.
isActive
)
super
.
attract
();
else
{
else
{
this
.
path
.
getPoint
(
this
.
follower
.
t
,
this
.
follower
.
vec
);
this
.
physicsObj
.
setPosition
(
this
.
follower
.
vec
.
x
,
this
.
follower
.
vec
.
y
);
this
.
wordObj
.
setPosition
(
this
.
physicsObj
.
x
,
this
.
physicsObj
.
y
);
...
...
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