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
93ded99d
Commit
93ded99d
authored
Jul 17, 2019
by
18손재민
Committed by
18류지석
Jul 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
enum 생성함, 공격 단어 반격 시간 마스크 wip
parent
61daf001
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
10 deletions
+44
-10
index.html
index.html
+1
-0
Enums.js
js/Enums.js
+3
-1
WordObject.js
js/WordObject.js
+24
-2
WordSpace.js
js/WordSpace.js
+16
-7
No files found.
index.html
View file @
93ded99d
...
...
@@ -13,6 +13,7 @@
<script
src=
"js/CSVParsing.js"
></script>
<script
src=
"js/SelectWord.js"
></script>
<script
src=
"js/BGMsound.js"
></script>
<script
src=
"js/Enums.js"
></script>
</head>
<body>
<script
src=
"js/Client.js"
></script>
...
...
js/Enums.js
View file @
93ded99d
var
Enums
=
Enums
||
{};
\ No newline at end of file
var
Enums
=
Enums
||
{};
Enums
.
characterAnim
=
{
write
:
0
,
attackWrite
:
1
,
throw
:
2
,
hit
:
3
}
\ No newline at end of file
js/WordObject.js
View file @
93ded99d
...
...
@@ -49,7 +49,7 @@ class WordObject
{
fontSize
:
(
this
.
scale
*
this
.
fontScale
)
+
'
pt
'
,
fontFamily
:
'
"궁서", 궁서체, serif
'
,
fontStyle
:
(
this
.
wordWeight
>
5
?
'
bold
'
:
''
)
//
fontStyle: (this.wordWeight > 5 ? 'bold' : '')
});
if
(
!
this
.
isNameWord
)
this
.
wordObj
.
setColor
(
'
#000000
'
).
setOrigin
(
0.5
,
0.5
);
else
this
.
wordObj
.
setColor
(
'
#ffffff
'
).
setOrigin
(
0.45
,
0.5
);
...
...
@@ -79,7 +79,7 @@ class WordObject
this
.
wordObj
.
destroy
();
this
.
physicsObj
.
destroy
();
}
BackGround
.
myCharacter
.
play
(
WordSpace
.
pyeongminAnims
[
0
]);
BackGround
.
myCharacter
.
play
(
WordSpace
.
pyeongminAnims
[
Enums
.
characterAnim
.
write
]);
}
attract
()
...
...
@@ -150,6 +150,28 @@ class AttackWord extends WordObject
console
.
log
(
'
Attack text :
'
+
text
+
'
, Attacker :
'
+
this
.
attacker
.
nickname
+
'
, Weight :
'
+
this
.
wordWeight
);
console
.
log
(
'
Counter time :
'
+
this
.
counterTime
);
}
instantiate
(
scene
,
lenRate
)
{
super
.
instantiate
(
scene
,
lenRate
);
this
.
maskBackground
=
scene
.
physics
.
add
.
sprite
(
this
.
physicsObj
.
x
,
this
.
physicsObj
.
y
,
'
wordBgr
'
+
this
.
wordGrade
+
'
_
'
+
Math
.
min
(
Math
.
max
(
2
,
this
.
wordText
.
length
),
6
))
.
setTint
(
Phaser
.
Display
.
Color
.
GetColor
(
120
,
120
,
120
)).
setScale
(
this
.
physicsObj
.
scale
);
this
.
shape
=
scene
.
make
.
graphics
();
var
rect
=
new
Phaser
.
Geom
.
Rectangle
(
0
,
0
,
this
.
maskBackground
.
width
,
this
.
maskBackground
.
height
);
this
.
shape
.
fillStyle
(
0xffffff
);
this
.
shape
.
fillRectShape
(
rect
);
this
.
mask
=
this
.
shape
.
createGeometryMask
();
this
.
maskBackground
.
setMask
(
this
.
mask
);
}
attract
()
{
super
.
attract
();
this
.
maskBackground
.
setPosition
(
this
.
physicsObj
.
x
,
this
.
physicsObj
.
y
);
this
.
mask
.
x
=
this
.
physicsObj
.
x
;
this
.
mask
.
y
=
this
.
physicsObj
.
y
;
}
destroy
()
{
switch
(
this
.
wordGrade
)
...
...
js/WordSpace.js
View file @
93ded99d
...
...
@@ -256,20 +256,27 @@ WordSpace.loadAnimation = function(scene)
repeat
:
0
,
hideOnComplete
:
false
});
WordSpace
.
pyeongminAnims
.
push
(
scene
.
anims
.
create
({
key
:
'
write
'
,
WordSpace
.
pyeongminAnims
[
Enums
.
characterAnim
.
write
]
=
scene
.
anims
.
create
({
key
:
'
pyeongminWriteAnim
'
,
frames
:
scene
.
anims
.
generateFrameNumbers
(
'
pyeongminWrite
'
),
frameRate
:
10
,
repeat
:
0
,
hideOnComplete
:
false
}));
WordSpace
.
pyeongminAnims
.
push
(
scene
.
anims
.
create
({
key
:
'
throw
'
,
});
WordSpace
.
pyeongminAnims
[
Enums
.
characterAnim
.
attackWrite
]
=
scene
.
anims
.
create
({
key
:
'
pyeongminattackWriteAnim
'
,
frames
:
scene
.
anims
.
generateFrameNumbers
(
'
pyeongminWrite
'
),
frameRate
:
10
,
repeat
:
-
1
,
hideOnComplete
:
false
});
WordSpace
.
pyeongminAnims
[
Enums
.
characterAnim
.
throw
]
=
scene
.
anims
.
create
({
key
:
'
pyeongminThrowAnim
'
,
frames
:
scene
.
anims
.
generateFrameNumbers
(
'
pyeongminThrow
'
),
frameRate
:
10
,
repeat
:
0
,
hideOnComplete
:
false
})
)
;
});
}
WordSpace
.
generateWord
=
...
...
@@ -373,6 +380,8 @@ WordSpace.findWord = function(wordText)
Input
.
attackMode
=
true
;
WordSpace
.
attackGauge
.
pauseCycle
(
true
);
WordSpace
.
setPlayerTyping
.
add
(
wordText
);
BackGround
.
myCharacter
.
play
(
WordSpace
.
pyeongminAnims
[
Enums
.
characterAnim
.
attackWrite
]);
BackGround
.
myCharacter
.
anims
.
msPerFrame
/=
(
4
-
WordSpace
.
attackGauge
.
getAttackOption
().
wordGrade
);
}
else
// 오타 체크
{
...
...
@@ -450,7 +459,7 @@ WordSpace.attack = function(wordText, grade)
WordSpace
.
attackGauge
.
resetValue
();
WordSpace
.
setPlayerTyping
.
add
(
wordText
);
BackGround
.
myCharacter
.
play
(
WordSpace
.
pyeongminAnims
[
1
]);
BackGround
.
myCharacter
.
play
(
WordSpace
.
pyeongminAnims
[
Enums
.
characterAnim
.
throw
]);
}
else
WordSpace
.
attackGauge
.
cutValue
(
0.3
);
Input
.
maxInput
=
6
;
...
...
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