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
dfca8a59
Commit
dfca8a59
authored
Jul 14, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
강호패 생성시 플레이어 데이터가 제대로 들어가지 않는 문제 해결
parent
24fd8ba4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
3 deletions
+6
-3
ScenesData.js
js/ScenesData.js
+1
-0
WordObject.js
js/WordObject.js
+2
-1
WordSpace.js
js/WordSpace.js
+2
-1
server.js
server.js
+1
-1
No files found.
js/ScenesData.js
View file @
dfca8a59
...
...
@@ -123,6 +123,7 @@ var gameScene = new Phaser.Class(
});
console
.
log
(
RoomData
.
myself
);
WordSpace
.
test
=
WordSpace
.
generateWord
.
Name
(
this
,
false
,
null
);
WordSpace
.
attackGauge
.
add
(
11
);
},
update
:
function
()
...
...
js/WordObject.js
View file @
dfca8a59
...
...
@@ -30,7 +30,7 @@ class WordObject
}
else
{
this
.
physicsObj
=
scene
.
physics
.
add
.
sprite
(
random
.
x
,
random
.
y
,
'
nameBgr
'
+
Math
.
min
(
Math
.
max
(
2
,
this
.
wordText
.
length
),
6
))
this
.
physicsObj
=
scene
.
physics
.
add
.
sprite
(
random
.
x
,
random
.
y
,
(
this
.
isStrong
?
'
strongBgr
'
:
'
nameBgr
'
)
+
Math
.
min
(
Math
.
max
(
2
,
this
.
wordText
.
length
),
6
))
.
setMass
(
this
.
wordWeight
*
10
)
.
setScale
(
this
.
scale
)
.
setFrictionX
(
0
)
...
...
@@ -158,6 +158,7 @@ class AttackWord extends WordObject
}
if
(
WordSpace
.
gameTimer
.
now
<
this
.
counterTime
)
{
console
.
log
(
this
.
attacker
);
let
tempWord
=
WordSpace
.
generateWord
.
Name
(
ScenesData
.
gameScene
,
true
,
this
.
attacker
);
tempWord
.
destroy
();
}
...
...
js/WordSpace.js
View file @
dfca8a59
...
...
@@ -238,6 +238,7 @@ WordSpace.loadImage = function(scene)
for
(
let
i
=
2
;
i
<
7
;
i
++
)
{
scene
.
load
.
image
(
'
nameBgr
'
+
i
,
'
assets/placeholder/name
'
+
i
+
'
.png
'
);
scene
.
load
.
image
(
'
strongBgr
'
+
i
,
'
assets/placeholder/strong
'
+
i
+
'
.png
'
);
}
WordSpace
.
weightTextObjForTest
=
scene
.
add
.
text
(
100
,
75
,
'
뇌의 무게: (현재) 0 / 100 (전체)
'
).
setDepth
(
10
).
setColor
(
'
#000000
'
);
...
...
@@ -406,7 +407,7 @@ WordSpace.attack = function(wordText, grade)
let
attackData
=
{
roomNum
:
RoomData
.
roomNum
,
attacker
:
PlayerData
,
attacker
:
RoomData
.
myself
,
target
:
element
.
ownerId
,
text
:
wordText
,
grade
:
grade
,
...
...
server.js
View file @
dfca8a59
...
...
@@ -89,7 +89,7 @@ io.on('connection', function(socket)
{
let
dataToPush
=
{
attackerId
:
msg
.
attacker
.
id
Num
,
attackerId
:
msg
.
attacker
.
id
,
attacker
:
msg
.
attacker
.
nickname
,
word
:
msg
.
text
,
wordGrade
:
msg
.
grade
,
...
...
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