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
9ce93814
Commit
9ce93814
authored
Aug 21, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
자잘한 밸런스 패치 및 공격 모드 시 공격 길이 제한에 맞게 입력 창 길이를 조절함
parent
d4e76ee6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
12 deletions
+23
-12
GameServer.js
GameServer.js
+2
-2
Input.js
js/Input.js
+16
-6
ResourceLoader.js
js/ResourceLoader.js
+1
-1
ScenesData.js
js/ScenesData.js
+2
-2
WordSpace.js
js/WordSpace.js
+2
-1
No files found.
GameServer.js
View file @
9ce93814
...
...
@@ -82,7 +82,7 @@ class GameRoom
{
this
.
roomId
=
GameServer
.
getRoomNumber
();
this
.
roomIndex
=
-
1
;
this
.
startCount
=
2
;
this
.
startCount
=
5
;
this
.
maxPlayer
=
100
;
this
.
nextRank
=
100
;
...
...
@@ -143,7 +143,7 @@ class GameRoom
{
if
(
this
.
currentPhase
===
GameServer
.
Phase
.
READY
)
{
this
.
endTime
=
Date
.
now
()
+
10000
;
// 테스트용 10초
this
.
endTime
=
Date
.
now
()
+
30000
;
// 방 대기 시간
this
.
announceToRoom
(
'
setRoomCount
'
,
{
isEnable
:
true
,
endTime
:
this
.
endTime
,
playerCount
:
this
.
currentPlayer
.
length
,
...
...
js/Input.js
View file @
9ce93814
...
...
@@ -23,7 +23,11 @@ Input.gameSceneEnterReaction = function()
{
if
(
RoomData
.
myself
.
isAlive
&&
!
Input
.
isEntered
)
{
if
(
Input
.
attackMode
)
WordSpace
.
attack
(
Input
.
removeConVow
(
Input
.
finalInput
),
Input
.
attackOption
.
wordGrade
);
if
(
Input
.
attackMode
)
{
WordSpace
.
attack
(
Input
.
removeConVow
(
Input
.
finalInput
),
Input
.
attackOption
.
wordGrade
);
Input
.
inputField
.
inputBackground
.
setFrame
(
4
);
}
else
WordSpace
.
findWord
(
Input
.
finalInput
);
Input
.
reset
();
Input
.
isEntered
=
true
;
...
...
@@ -304,18 +308,24 @@ Input.removeConVow = function(_wordText)
Input
.
inputField
=
{
generate
:
function
(
scene
,
enterCallback
,
text
,
isHopaeScene
=
false
)
generate
:
function
(
scene
,
enterCallback
,
text
)
{
this
.
text
=
text
.
getElement
(
'
text
'
);
this
.
inputBackground
=
text
.
getElement
(
'
background
'
);
scene
.
input
.
keyboard
.
on
(
'
keyup
'
,
function
()
{
Input
.
pressCount
--
;
Input
.
justPressed
=
''
;
if
(
isHopaeScene
)
if
(
ScenesData
.
currentScene
==
ScenesData
.
gameScene
)
Input
.
inputField
.
inputBackground
.
setFrame
(
4
);
scene
.
input
.
keyboard
.
on
(
'
keydown
'
,
function
()
{
if
(
ScenesData
.
currentScene
==
ScenesData
.
hopaeScene
&&
Input
.
finalInput
.
length
>
1
)
Input
.
inputField
.
inputBackground
.
setFrame
(
Input
.
finalInput
.
length
-
2
);
})
scene
.
input
.
keyboard
.
on
(
'
keyup
'
,
function
()
{
Input
.
pressCount
--
;
Input
.
justPressed
=
''
;
if
(
ScenesData
.
currentScene
==
ScenesData
.
hopaeScene
)
{
ScenesData
.
hopaeScene
.
checkBtn
.
setEnable
(
Input
.
checkProperInput
(
Input
.
inputField
.
text
.
text
)
||
(
Input
.
finalInput
.
length
>
1
)
?
true
:
false
);
ScenesData
.
hopaeScene
.
warningText
.
setVisible
(
Input
.
finalInput
.
length
>
4
?
true
:
false
);
if
(
Input
.
finalInput
.
length
>
1
)
Input
.
inputField
.
inputBackground
.
setFrame
(
Input
.
finalInput
.
length
-
2
);
}
})
}
})
scene
.
input
.
keyboard
.
on
(
'
keydown-SHIFT
'
,
function
()
{
Input
.
isShifted
=
true
});
scene
.
input
.
keyboard
.
on
(
'
keyup-SHIFT
'
,
function
()
{
Input
.
isShifted
=
false
});
scene
.
input
.
keyboard
.
on
(
'
keydown-DELETE
'
,
function
()
{
Input
.
reset
()});
...
...
js/ResourceLoader.js
View file @
9ce93814
...
...
@@ -11,7 +11,6 @@ ResourceLoader.loadBackGround = function(scene)
ResourceLoader
.
loadImage
=
function
(
scene
)
{
scene
.
load
.
image
(
'
inputfield
'
,
'
assets/image/etc/wordspace.png
'
);
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
for
(
let
j
=
2
;
j
<
7
;
j
++
)
...
...
@@ -43,6 +42,7 @@ ResourceLoader.loadImage = function(scene)
scene
.
load
.
spritesheet
(
'
wordBreak
'
,
'
assets/image/word/wordbreak.png
'
,
{
frameWidth
:
180
,
frameHeight
:
180
});
scene
.
load
.
spritesheet
(
'
hopaeSceneInput
'
,
'
assets/image/word/hopaeSceneInput.png
'
,
{
frameWidth
:
239
,
frameHeight
:
45
});
scene
.
load
.
spritesheet
(
'
gameSceneInput
'
,
'
assets/image/etc/wordSpace/wordspace.png
'
,
{
frameWidth
:
253
,
frameHeight
:
67
});
scene
.
load
.
image
(
'
attackPaper
'
,
'
assets/image/etc/paper_crumbled.png
'
);
scene
.
load
.
image
(
'
button
'
,
'
assets/placeholder/button.png
'
);
scene
.
load
.
image
(
'
panel
'
,
'
assets/placeholder/panel.png
'
);
...
...
js/ScenesData.js
View file @
9ce93814
...
...
@@ -252,7 +252,7 @@ var hopaeScene = new Phaser.Class(
this
.
inputBackground
=
UIObject
.
createLabel
(
this
,
game
.
config
.
width
/
2
,
game
.
config
.
height
/
2
,
10
,
'
hopaeSceneInput
'
,
2
,
'
center
'
,
''
,
50
,
'
#ffffff
'
,
0.45
,
0.5
);
Input
.
inputField
.
generate
(
this
,
function
(){},
this
.
inputBackground
,
true
);
Input
.
inputField
.
generate
(
this
,
function
(){},
this
.
inputBackground
);
UIObject
.
createLabel
(
this
,
game
.
config
.
width
/
2
,
game
.
config
.
height
/
2
-
200
,
2
,
'
noticeBackground
'
,
1
,
'
center
'
,
'
호패는 오직 한글만 입력이 가능합니다.
\n
띄어쓰기도 사용할 수 없습니다.
'
,
50
,
'
#000000
'
).
layout
();
...
...
@@ -468,7 +468,7 @@ var gameScene = new Phaser.Class(
WordSpace
.
wordPhysicsGroup
=
this
.
physics
.
add
.
group
();
Input
.
inputField
.
generate
(
this
,
Input
.
gameSceneEnterReaction
,
UIObject
.
createLabel
(
ScenesData
.
gameScene
,
game
.
config
.
width
/
2
,
game
.
config
.
height
*
25
/
36
,
10
,
'
inputfield
'
,
1
,
'
center
'
,
''
,
25
,
'
#000000
'
));
UIObject
.
createLabel
(
ScenesData
.
gameScene
,
game
.
config
.
width
/
2
,
game
.
config
.
height
*
25
/
36
,
10
,
'
gameSceneInput
'
,
1
,
'
center
'
,
''
,
25
,
'
#000000
'
));
WordSpace
.
attackGauge
.
generate
(
this
);
WordSpace
.
spaceInitiate
(
this
);
...
...
js/WordSpace.js
View file @
9ce93814
...
...
@@ -265,7 +265,7 @@ WordSpace.findWord = function(wordText)
}
WordSpace
.
setPlayerTyping
.
add
(
wordText
);
}
else
if
(
wordText
===
'
공격
'
&&
WordSpace
.
attackGauge
.
value
>=
3
&&
WordSpace
.
nameGroup
.
length
>
0
)
// 공격모드 진입.
else
if
(
wordText
===
'
공격
'
&&
WordSpace
.
attackGauge
.
value
>=
2
&&
WordSpace
.
nameGroup
.
length
>
0
)
// 공격모드 진입.
{
console
.
log
(
'
attack mode
'
);
let
tempAttackOption
=
this
.
attackGauge
.
getAttackOption
();
...
...
@@ -273,6 +273,7 @@ WordSpace.findWord = function(wordText)
Input
.
attackOption
.
wordGrade
=
tempAttackOption
.
wordGrade
;
Input
.
maxInput
=
Input
.
attackOption
.
wordCount
;
Input
.
attackMode
=
true
;
Input
.
inputField
.
inputBackground
.
setFrame
(
Input
.
maxInput
-
2
);
WordSpace
.
attackGauge
.
pauseCycle
(
true
);
WordSpace
.
setPlayerTyping
.
add
(
wordText
);
switch
(
tempAttackOption
.
wordCount
)
...
...
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