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
a7b69339
Commit
a7b69339
authored
Jul 07, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
공격 단어 반격 시간 구현, 반격 시간 안에 반격 성공할 경우 강호패가 생성됨
현재 호패 생성 주기가 이상함 수정 요망
parent
6a968efa
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
WordObject.js
js/WordObject.js
+5
-4
WordSpace.js
js/WordSpace.js
+1
-1
No files found.
js/WordObject.js
View file @
a7b69339
...
...
@@ -77,16 +77,17 @@ class AttackWord extends WordObject
this
.
wordWeight
*=
isStrong
?
3
:
2
;
this
.
attacker
=
_attacker
;
//서버 사용하게 되면 PlayerTyping을 피격자의 것으로 바꿔야 함
this
.
attackedTime
=
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
;
/*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);*/
this
.
counterTime
=
WordSpace
.
gameTimer
.
now
+
10000
;
console
.
log
(
'
Attack text :
'
+
text
+
'
, Attacker :
'
+
this
.
attacker
+
'
, Weight :
'
+
this
.
wordWeight
);
console
.
log
(
'
Attacked time :
'
+
this
.
attacked
Time
);
console
.
log
(
'
Counter time :
'
+
this
.
counter
Time
);
console
.
log
(
WordSpace
.
playerTyping
);
}
destroy
()
{
//if(this.attackedTim)
if
(
WordSpace
.
gameTimer
.
now
<
this
.
counterTime
)
WordSpace
.
generateWord
.
Name
(
WordSpace
.
gameSceneForTest
,
true
);
super
.
destroy
();
}
}
...
...
js/WordSpace.js
View file @
a7b69339
...
...
@@ -65,7 +65,7 @@ WordSpace.gameOverCycle = new cycle(gameOver);
//호패 생성 사이클
WordSpace
.
nameCycle
=
new
cycle
(
function
()
{
console
.
log
(
"
호패 on
"
);
WordSpace
.
generateWord
.
Name
(
WordSpace
.
gameSceneForTest
,
false
);
});
//이건 뭐지
WordSpace
.
varAdjustCycle
=
new
cycle
(
function
()
...
...
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