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
2a3a5c27
Commit
2a3a5c27
authored
Jun 26, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
단어 등급 및 단어 무게 추가
parent
2fdfec15
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
WordObject.js
script/WordObject.js
+27
-1
No files found.
script/WordObject.js
View file @
2a3a5c27
...
...
@@ -12,7 +12,18 @@ class WordObject
}
return
temp
;
})(
this
.
wordText
);
//alert(this.wordTyping);
this
.
wordGrade
=
2
<
this
.
wordTyping
&&
this
.
wordTyping
<
6
?
3
:
7
<
this
.
wordTyping
&&
this
.
wordTyping
<
11
?
2
:
12
<
this
.
wordTyping
&&
this
.
wordTyping
<
16
?
1
:
0
;
this
.
wordWeight
=
(
function
(
_wordGrade
)
{
var
temp
=
0
;
temp
=
_wordGrade
==
3
?
3
:
_wordGrade
==
2
?
5
:
_wordGrade
==
1
?
7
:
10
;
return
temp
;
})(
this
.
wordGrade
);
//alert("wordTyping : " + this.wordTyping + '\n' + "wordGrade : " + this.wordGrade + '\n' + "wordWeight : " + this.wordWeight + '\n');
}
generate
(
scene
)
...
...
@@ -30,7 +41,22 @@ class WordObject
this
.
physicsObj
.
setVelocity
(
dist
*
Math
.
cos
(
angle
)
*
wordSpeed
,
dist
*
Math
.
sin
(
angle
)
*
wordSpeed
);
this
.
wordObj
.
setPosition
(
this
.
physicsObj
.
x
,
this
.
physicsObj
.
y
);
}
getWordWeight
()
{
return
this
.
wordWeight
;
}
}
//***********ToDo*************
WordObject
.
isEqual
(
inputWord
)
{
if
(
inputWord
===
this
.
wordText
)
{
this
.
destroy
();
}
}
//****************************
function
firstSound
(
charText
)
{
...
...
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