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
0cca4b1d
Commit
0cca4b1d
authored
Jul 20, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
다른 플레이어 수에 따라 임의의 위치에 플레이어 이미지를 띄움
parent
1cfc871e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
0 deletions
+19
-0
GameServer.js
GameServer.js
+1
-0
Background.js
js/Background.js
+18
-0
No files found.
GameServer.js
View file @
0cca4b1d
...
...
@@ -287,6 +287,7 @@ class Player
this
.
gameRoomId
=
gameRoom
.
roomId
;
this
.
index
=
gameRoom
.
currentPlayer
.
length
;
this
.
nickname
=
playerData
.
nickname
;
this
.
position
=
null
;
this
.
isAlive
=
true
;
this
.
rank
=
-
1
;
...
...
js/Background.js
View file @
0cca4b1d
...
...
@@ -2,6 +2,15 @@ var BackGround = BackGround || {}
BackGround
.
brainGroup
=
null
;
BackGround
.
myCharacter
=
null
;
BackGround
.
characterPos
=
[
new
Phaser
.
Math
.
Vector2
(
100
,
99
),
new
Phaser
.
Math
.
Vector2
(
248
,
198
),
new
Phaser
.
Math
.
Vector2
(
412
,
144
),
new
Phaser
.
Math
.
Vector2
(
124
,
393
),
new
Phaser
.
Math
.
Vector2
(
368
,
336
),
new
Phaser
.
Math
.
Vector2
(
272
,
453
),
new
Phaser
.
Math
.
Vector2
(
100
,
595
),
new
Phaser
.
Math
.
Vector2
(
284
,
678
),
new
Phaser
.
Math
.
Vector2
(
444
,
639
),
new
Phaser
.
Math
.
Vector2
(
116
,
799
),
new
Phaser
.
Math
.
Vector2
(
413
,
789
),
new
Phaser
.
Math
.
Vector2
(
280
,
916
),
new
Phaser
.
Math
.
Vector2
(
1437
,
157
),
new
Phaser
.
Math
.
Vector2
(
1672
,
95
),
new
Phaser
.
Math
.
Vector2
(
1832
,
166
),
new
Phaser
.
Math
.
Vector2
(
1581
,
239
),
new
Phaser
.
Math
.
Vector2
(
1779
,
311
),
new
Phaser
.
Math
.
Vector2
(
1595
,
414
),
new
Phaser
.
Math
.
Vector2
(
1774
,
480
),
new
Phaser
.
Math
.
Vector2
(
1501
,
563
),
new
Phaser
.
Math
.
Vector2
(
1736
,
655
),
new
Phaser
.
Math
.
Vector2
(
1446
,
770
),
new
Phaser
.
Math
.
Vector2
(
1656
,
894
),
new
Phaser
.
Math
.
Vector2
(
1826
,
819
),
]
BackGround
.
otherCharacters
=
[];
BackGround
.
loadImage
=
function
(
scene
)
{
...
...
@@ -13,6 +22,15 @@ BackGround.loadImage = function(scene)
BackGround
.
drawCharacter
=
function
(
scene
)
{
BackGround
.
myCharacter
=
scene
.
add
.
sprite
(
game
.
config
.
width
/
2
,
game
.
config
.
height
*
41
/
48
,
'
pyeongminWrite
'
).
setScale
(
0.45
).
setDepth
(
2
);
BackGround
.
characterPos
=
Phaser
.
Utils
.
Array
.
Shuffle
(
BackGround
.
characterPos
);
RoomData
.
players
.
forEach
(
function
(
element
){
if
(
element
.
id
!=
RoomData
.
myself
.
id
)
{
element
.
position
=
BackGround
.
characterPos
.
pop
();
BackGround
.
otherCharacters
.
push
(
scene
.
add
.
sprite
(
element
.
position
.
x
,
element
.
position
.
y
,
'
pyeongminWrite
'
).
setScale
(
0.45
).
setDepth
(
1
));
BackGround
.
otherCharacters
[
BackGround
.
otherCharacters
.
length
-
1
].
flipX
=
element
.
position
.
x
<
game
.
config
.
width
/
2
?
true
:
false
;
}
});
}
BackGround
.
drawBrain
=
function
(
scene
)
...
...
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