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
849d7b02
Commit
849d7b02
authored
Jul 18, 2019
by
18손재민
Committed by
18신대성
Jul 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
공격 단어 무게 및 반격시간 관련 이슈 일부 수정
parent
cfa46b01
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
14 deletions
+11
-14
GameServer.js
GameServer.js
+1
-1
WordObject.js
js/WordObject.js
+7
-7
WordReader.js
js/WordReader.js
+3
-6
No files found.
GameServer.js
View file @
849d7b02
...
...
@@ -77,7 +77,7 @@ class GameRoom
{
this
.
roomId
=
GameServer
.
getRoomNumber
();
this
.
roomIndex
=
-
1
;
this
.
startCount
=
4
;
this
.
startCount
=
2
;
this
.
maxPlayer
=
100
;
this
.
nextRank
=
100
;
...
...
js/WordObject.js
View file @
849d7b02
class
WordObject
{
constructor
(
text
,
isNameWord
=
false
)
{
this
.
generationCode
=
WordSpace
.
nextWordCode
++
;
this
.
wordText
=
text
;
this
.
wordTyping
=
WordReader
.
getWordTyping
(
this
.
wordText
);
this
.
wordGrade
=
WordReader
.
getWordGrade
(
this
.
wordTyping
);
this
.
wordWeight
=
WordReader
.
getWordWeight
(
this
.
wordGrade
)
;
this
.
wordWeight
=
WordReader
.
normalWeight
[
3
-
this
.
wordGrade
]
;
//console.log("wordTyping : " + this.wordTyping + '\n' + "wordGrade : " + this.wordGrade + '\n' + "wordWeight : " + this.wordWeight + '\n');
this
.
wordSpeed
=
0.5
;
this
.
isNameWord
=
isNameWord
;
...
...
@@ -141,14 +142,12 @@ class AttackWord extends WordObject
{
super
(
text
);
this
.
wordGrade
=
_wordGrade
;
this
.
wordWeight
=
WordReader
.
getWordWeight
(
this
.
wordGrade
)
;
this
.
wordWeight
=
this
.
isStrong
?
WordReader
.
strongAttackWeight
[
3
-
this
.
wordGrade
]
:
WordReader
.
attackWeight
[
3
-
this
.
wordGrade
]
;
if
(
WordReader
.
getWordTyping
(
_playerData
.
nickname
)
>
9
)
this
.
wordWeight
+=
this
.
wordWeight
*
0.2
*
(
WordReader
.
getWordTyping
(
_playerData
.
nickname
)
-
9
);
this
.
wordWeight
*=
isStrong
?
3
:
2
;
this
.
attacker
=
_playerData
;
/*this.counterTime = WordSpace.gameTimer.now + 1000 * (this.wordTyping <= (5 - _wordGrade) * 2.5 ? this.wordTyping / (Math.max(200, WordSpace.playerTyping) / 60) * 1.5 :
((5 - _wordGrade) * 3 + (this.wordTyping - (5 - _wordGrade) * 2.5) * 2.5) / (Math.max(200, WordSpace.playerTyping) / 60) * 1.5);*/
this
.
counterTime
=
WordSpace
.
gameTimer
.
now
+
10000
;
this
.
counterTime
=
WordSpace
.
gameTimer
.
now
+
1000
*
(
this
.
wordTyping
<=
(
5
-
_wordGrade
)
*
2.5
?
this
.
wordTyping
/
(
Math
.
max
(
200
,
WordSpace
.
playerTyping
)
/
60
)
*
1.5
:
((
5
-
_wordGrade
)
*
3
+
(
this
.
wordTyping
-
(
5
-
_wordGrade
)
*
2.5
)
*
2.5
)
/
(
Math
.
max
(
200
,
WordSpace
.
playerTyping
)
/
60
)
*
1.5
);
console
.
log
(
'
Attack text :
'
+
text
+
'
, Attacker :
'
+
this
.
attacker
.
nickname
+
'
, Weight :
'
+
this
.
wordWeight
);
console
.
log
(
'
Counter time :
'
+
this
.
counterTime
);
}
...
...
@@ -194,8 +193,9 @@ class AttackWord extends WordObject
}
if
(
WordSpace
.
gameTimer
.
now
<
this
.
counterTime
)
{
console
.
log
(
this
.
attacker
);
let
tempWord
=
WordSpace
.
generateWord
.
Name
(
ScenesData
.
gameScene
,
true
,
this
.
attacker
);
tempWord
.
physicsObj
.
setPosition
(
this
.
physicsObj
.
x
,
this
.
physicsObj
.
y
);
tempWord
.
wordObj
.
setPosition
(
tempWord
.
physicsObj
.
x
,
tempWord
.
physicsObj
.
y
);
tempWord
.
destroy
();
}
if
(
this
.
maskBackground
!=
null
)
this
.
maskBackground
.
destroy
();
...
...
js/WordReader.js
View file @
849d7b02
...
...
@@ -54,9 +54,6 @@ WordReader.getWordGrade = function(_wordTyping)
17
<=
_wordTyping
&&
_wordTyping
<
26
?
0
:
-
1
;
}
WordReader
.
getWordWeight
=
function
(
_wordGrade
)
{
return
_wordGrade
==
3
?
3
:
_wordGrade
==
2
?
5
:
_wordGrade
==
1
?
7
:
10
;
}
\ No newline at end of file
WordReader
.
normalWeight
=
[
3
,
5
,
7
,
10
];
WordReader
.
attackWeight
=
[
6
,
8
,
12
,
15
];
WordReader
.
strongAttackWeight
=
[
10
,
13
,
16
,
20
];
\ No newline at end of file
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