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
a5b33590
Commit
a5b33590
authored
Jul 09, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
반격 시 강호패 바로 집어넣기 wip
parent
735c481b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
GameServer.js
GameServer.js
+1
-1
WordObject.js
js/WordObject.js
+5
-1
No files found.
GameServer.js
View file @
a5b33590
var
GameServer
=
GameServer
||
{};
var
GameServer
=
GameServer
||
{};
GameServer
.
Phase
=
{
READY
:
0
,
START
:
1
,
MAIN
:
2
,
MUSIC
:
3
};
GameServer
.
Phase
=
{
READY
:
0
,
START
:
1
,
MAIN
:
2
,
MUSIC
:
3
};
GameServer
.
startCount
=
3
;
GameServer
.
startCount
=
2
;
GameServer
.
currentPlayer
=
[];
GameServer
.
currentPlayer
=
[];
GameServer
.
playingRoom
=
[];
GameServer
.
playingRoom
=
[];
...
...
js/WordObject.js
View file @
a5b33590
...
@@ -117,6 +117,7 @@ class AttackWord extends WordObject
...
@@ -117,6 +117,7 @@ class AttackWord extends WordObject
constructor
(
text
,
_wordGrade
,
_playerData
,
isStrong
)
constructor
(
text
,
_wordGrade
,
_playerData
,
isStrong
)
{
{
super
(
text
);
super
(
text
);
console
.
log
(
_playerData
);
this
.
wordGrade
=
_wordGrade
;
this
.
wordGrade
=
_wordGrade
;
this
.
wordWeight
=
WordReader
.
getWordWeight
(
this
.
wordGrade
);
this
.
wordWeight
=
WordReader
.
getWordWeight
(
this
.
wordGrade
);
if
(
WordReader
.
getWordTyping
(
_playerData
.
nickname
)
<=
9
)
if
(
WordReader
.
getWordTyping
(
_playerData
.
nickname
)
<=
9
)
...
@@ -126,6 +127,7 @@ class AttackWord extends WordObject
...
@@ -126,6 +127,7 @@ class AttackWord extends WordObject
//서버 사용하게 되면 PlayerTyping을 피격자의 것으로 바꿔야 함
//서버 사용하게 되면 PlayerTyping을 피격자의 것으로 바꿔야 함
this
.
counterTime
=
WordSpace
.
gameTimer
.
now
+
1000
*
(
this
.
wordTyping
<=
(
5
-
_wordGrade
)
*
2.5
?
this
.
wordTyping
*
(
WordSpace
.
playerTyping
/
60
)
*
2
:
this
.
counterTime
=
WordSpace
.
gameTimer
.
now
+
1000
*
(
this
.
wordTyping
<=
(
5
-
_wordGrade
)
*
2.5
?
this
.
wordTyping
*
(
WordSpace
.
playerTyping
/
60
)
*
2
:
((
5
-
_wordGrade
)
*
2.5
+
(
this
.
wordTyping
-
(
5
-
_wordGrade
)
*
2.5
)
*
3
)
*
(
WordSpace
.
playerTyping
/
60
)
*
2
);
((
5
-
_wordGrade
)
*
2.5
+
(
this
.
wordTyping
-
(
5
-
_wordGrade
)
*
2.5
)
*
3
)
*
(
WordSpace
.
playerTyping
/
60
)
*
2
);
this
.
counterTime
=
10000
;
console
.
log
(
'
Attack text :
'
+
text
+
'
, Attacker :
'
+
this
.
attacker
.
nickname
+
'
, Weight :
'
+
this
.
wordWeight
);
console
.
log
(
'
Attack text :
'
+
text
+
'
, Attacker :
'
+
this
.
attacker
.
nickname
+
'
, Weight :
'
+
this
.
wordWeight
);
console
.
log
(
'
Counter time :
'
+
this
.
counterTime
);
console
.
log
(
'
Counter time :
'
+
this
.
counterTime
);
}
}
...
@@ -139,7 +141,9 @@ class AttackWord extends WordObject
...
@@ -139,7 +141,9 @@ class AttackWord extends WordObject
case
3
:
WordSpace
.
attackGauge
.
add
(
0.5
);
break
;
case
3
:
WordSpace
.
attackGauge
.
add
(
0.5
);
break
;
default
:
console
.
log
(
'
[ERR] wrong grade of word
'
);
break
;
default
:
console
.
log
(
'
[ERR] wrong grade of word
'
);
break
;
}
}
if
(
WordSpace
.
gameTimer
.
now
<
this
.
counterTime
)
WordSpace
.
generateWord
.
Name
(
WordSpace
.
gameSceneForTest
,
true
);
if
(
WordSpace
.
gameTimer
.
now
<
this
.
counterTime
)
WordSpace
.
nameGroup
.
push
(
new
NameWord
(
this
.
attacker
,
true
));
//강호패 넣기 구현해야됨
//WordSpace.generateWord.Name(WordSpace.gameSceneForTest, true);
super
.
destroy
();
super
.
destroy
();
}
}
}
}
...
...
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