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
6a1dca8b
Commit
6a1dca8b
authored
Jul 03, 2019
by
18류지석
Committed by
18송대선
Jul 03, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
게이지 WIP
parent
e274a43f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
WordSpace.js
js/WordSpace.js
+9
-2
main.js
js/main.js
+1
-0
No files found.
js/WordSpace.js
View file @
6a1dca8b
...
...
@@ -28,7 +28,6 @@ WordSpace.WordSpawnDelay = 3000;
WordSpace
.
NameSpawnDelay
=
3000
;
WordSpace
.
NameSpawnReduce
=
1000
;
WordSpace
.
gravityPoint
=
{
x
:
640
,
y
:
300
};
WordSpace
.
getSpawnPoint
=
function
()
{
...
...
@@ -103,6 +102,12 @@ WordSpace.GetPlayerTypingRate = function()
WordSpace
.
attackGauge
=
{
value
:
0
,
gradeColor
:
[
'
#000000
'
,
'
#000000
'
,
'
#000000
'
,
'
#000000
'
,
'
#000000
'
],
generate
:
function
(
scene
)
{
console
.
log
(
"
created
"
);
this
.
rectUI
=
scene
.
add
.
rectangle
(
640
,
580
,
0
,
20
,
this
.
gradeColor
[
0
]);
},
add
:
function
(
plus
)
{
if
(
this
.
value
+
plus
>
11
)
this
.
value
=
11
;
...
...
@@ -131,6 +136,8 @@ WordSpace.attackGauge =
this
.
currentCycle
=
scene
.
time
.
addEvent
(
option
);
this
.
text
=
scene
.
add
.
text
(
100
,
100
,
'
게이지:
'
+
this
.
value
.
toFixed
(
1
)).
setDepth
(
10
).
setColor
(
'
#000000
'
);
//this.rectUI.setColor(this.gradeColor[0]);
this
.
rectUI
.
setSize
(
this
.
rectUI
.
width
,
this
.
value
*
20
);
},
pauseCycle
:
function
(
bool
)
{
this
.
currentCycle
.
paused
=
bool
;},
// showValue: 아래쪽에 바의 길이로 게이지 표시, 색으로 게이지의 강도 표현
...
...
@@ -275,7 +282,7 @@ WordSpace.generateWord = function(scene, wordText, grade)
});
WordSpace
.
wordPhysicsGroup
.
add
(
word
.
physicsObj
);
WordSpace
.
weightTextObjForTest
.
setText
(
'
뇌의 무게: (현재)
'
+
WordSpace
.
totalWeight
+
'
/
100
(전체)
'
);
WordSpace
.
weightTextObjForTest
.
setText
(
'
뇌의 무게: (현재)
'
+
WordSpace
.
totalWeight
+
'
/
'
+
this
.
brainCapacity
+
'
(전체)
'
);
}
function
gameOver
()
...
...
js/main.js
View file @
6a1dca8b
...
...
@@ -31,6 +31,7 @@ function create()
{
BackGround
.
drawBrain
(
this
);
Input
.
inputField
.
generate
(
this
);
WordSpace
.
attackGauge
.
generate
(
this
);
WordSpace
.
wordPhysicsGroup
=
this
.
physics
.
add
.
group
();
WordSpace
.
wordCycle
.
resetCycle
(
this
,
3000
,
0
);
WordSpace
.
nameCycle
.
resetCycle
(
this
,
3000
,
0
);
...
...
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