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
65f8bfe2
Commit
65f8bfe2
authored
Jul 04, 2019
by
18류지석
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'word'
# Conflicts: # js/WordSpace.js # js/main.js
parents
2a0faee5
82a56735
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
0 deletions
+24
-0
KKUTU_word.txt
assets/KKUTU_word.txt
+0
-0
Input.js
js/Input.js
+1
-0
ScenesData.js
js/ScenesData.js
+1
-0
WordSpace.js
js/WordSpace.js
+22
-0
No files found.
assets/KKUTU_word.txt
View file @
65f8bfe2
B
가
js/Input.js
View file @
65f8bfe2
...
...
@@ -295,6 +295,7 @@ Input.inputField =
});
scene
.
input
.
keyboard
.
on
(
'
keydown-ENTER
'
,
function
()
{
Input
.
convInput
=
Input
.
removeConVow
(
Input
.
convInput
);
if
(
Input
.
attackMode
)
WordSpace
.
attack
(
Input
.
convInput
,
Input
.
attackOption
.
wordGrade
);
else
WordSpace
.
findWord
(
Input
.
convInput
);
WordSpace
.
resetGameOverTimer
();
...
...
js/ScenesData.js
View file @
65f8bfe2
...
...
@@ -51,6 +51,7 @@ var gameScene = new Phaser.Class(
WordSpace
.
wordPhysicsGroup
=
this
.
physics
.
add
.
group
();
WordSpace
.
wordCycle
.
resetCycle
(
this
,
3000
);
WordSpace
.
attackGauge
.
resetCycle
(
this
);
WordSpace
.
playerTyping
.
initiate
(
this
);
CSVParsing
.
CSVParse
(
this
);
},
...
...
js/WordSpace.js
View file @
65f8bfe2
...
...
@@ -361,6 +361,7 @@ WordSpace.findWord = function(wordText)
WordSpace
.
genWordByProb
(
WordSpace
.
gameSceneForTest
);
WordSpace
.
wordCycle
.
resetCycle
(
WordSpace
.
gameSceneForTest
,
WordSpace
.
WordSpawnDelay
,
0
);
}
WordSpace
.
playerTyping
.
add
(
wordText
);
}
else
if
(
wordText
===
'
공격
'
&&
WordSpace
.
attackGauge
.
value
>=
3
)
// 공격모드 진입.
{
...
...
@@ -369,6 +370,7 @@ WordSpace.findWord = function(wordText)
Input
.
maxInput
=
Input
.
attackOption
.
wordCount
;
Input
.
attackMode
=
true
;
WordSpace
.
attackGauge
.
pauseCycle
(
true
);
WordSpace
.
playerTyping
.
add
(
wordText
);
}
else
{
...
...
@@ -376,8 +378,27 @@ WordSpace.findWord = function(wordText)
}
}
WordSpace
.
playerTyping
=
{
totalTyping
:
0
,
playerTyping
:
0
,
add
:
function
(
wordText
)
{
this
.
totalTyping
+=
wordText
!=
null
?
WordReader
.
getWordTyping
(
wordText
)
:
0
;
this
.
playerTyping
=
this
.
totalTyping
/
this
.
gameTimer
.
now
*
1000
;
this
.
text
.
setText
(
'
현재 타수 :
'
+
this
.
playerTyping
.
toFixed
(
1
));
},
initiate
:
function
(
scene
)
{
this
.
gameTimer
=
new
Phaser
.
Time
.
Clock
(
scene
);
this
.
gameTimer
.
start
();
this
.
text
=
scene
.
add
.
text
(
100
,
200
,
'
현재 타수 :
'
+
this
.
playerTyping
.
toFixed
(
1
)).
setDepth
(
10
).
setColor
(
'
#000000
'
);
}
}
WordSpace
.
attack
=
function
(
wordText
,
grade
)
{
wordText
=
Input
.
removeConVow
(
wordText
);
if
(
wordText
!=
''
)
{
console
.
log
(
'
attack
'
+
wordText
+
'
, grade:
'
+
grade
);
...
...
@@ -385,6 +406,7 @@ WordSpace.attack = function(wordText, grade)
// 이부분에서 게이지에 따라 급수 결정
// 이부분은 서버 잘써야함
WordSpace
.
attackGauge
.
resetValue
();
WordSpace
.
playerTyping
.
add
(
wordText
);
}
else
{
...
...
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