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
5efa8948
Commit
5efa8948
authored
Jul 24, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
이제 공격자와 피격자는 종이 뭉치가 날아가는 것을 동시에 볼 수 있음
parent
0541c50e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
GameServer.js
GameServer.js
+1
-1
Client.js
js/Client.js
+3
-1
WordSpace.js
js/WordSpace.js
+0
-1
No files found.
GameServer.js
View file @
5efa8948
...
@@ -76,7 +76,7 @@ class GameRoom
...
@@ -76,7 +76,7 @@ class GameRoom
{
{
this
.
roomId
=
GameServer
.
getRoomNumber
();
this
.
roomId
=
GameServer
.
getRoomNumber
();
this
.
roomIndex
=
-
1
;
this
.
roomIndex
=
-
1
;
this
.
startCount
=
4
;
this
.
startCount
=
2
;
this
.
maxPlayer
=
100
;
this
.
maxPlayer
=
100
;
this
.
nextRank
=
100
;
this
.
nextRank
=
100
;
...
...
js/Client.js
View file @
5efa8948
...
@@ -163,7 +163,9 @@ socket.on('attacked', function(msg) // object attackData
...
@@ -163,7 +163,9 @@ socket.on('attacked', function(msg) // object attackData
WordSpace
.
attackedEvents
.
push
(
attackedEvent
);
WordSpace
.
attackedEvents
.
push
(
attackedEvent
);
console
.
log
(
msg
.
attacker
);
console
.
log
(
msg
.
attacker
);
console
.
log
(
msg
.
victim
);
console
.
log
(
msg
.
victim
);
WordSpace
.
makeAttackPaper
(
ScenesData
.
gameScene
,
msg
.
victim
.
position
,
msg
.
attacker
.
position
);
let
victimPos
=
RoomData
.
players
.
find
(
function
(
element
){
return
element
.
id
==
msg
.
victim
.
id
;
});
let
attackerPos
=
RoomData
.
players
.
find
(
function
(
element
){
return
element
.
id
==
msg
.
attacker
.
id
;
});
WordSpace
.
makeAttackPaper
(
ScenesData
.
gameScene
,
attackerPos
.
position
,
victimPos
.
position
);
//console.log(timeout);
//console.log(timeout);
});
});
socket
.
on
(
'
defeat
'
,
function
(
msg
)
// object player
socket
.
on
(
'
defeat
'
,
function
(
msg
)
// object player
...
...
js/WordSpace.js
View file @
5efa8948
...
@@ -445,7 +445,6 @@ WordSpace.makeAttackPaper = function(scene, attackFrom, attackTo)
...
@@ -445,7 +445,6 @@ WordSpace.makeAttackPaper = function(scene, attackFrom, attackTo)
{
{
var
attackPaper
=
scene
.
add
.
sprite
(
attackFrom
.
x
,
attackFrom
.
y
,
'
attackPapaer
'
).
setScale
(
0.5
).
setDepth
(
3
);
var
attackPaper
=
scene
.
add
.
sprite
(
attackFrom
.
x
,
attackFrom
.
y
,
'
attackPapaer
'
).
setScale
(
0.5
).
setDepth
(
3
);
attackPaper
.
throwTarget
=
attackTo
;
attackPaper
.
throwTarget
=
attackTo
;
console
.
log
(
attackTo
);
attackPaper
.
follower
=
{
t
:
0
,
vec
:
new
Phaser
.
Math
.
Vector2
()
};
attackPaper
.
follower
=
{
t
:
0
,
vec
:
new
Phaser
.
Math
.
Vector2
()
};
attackPaper
.
path
=
new
Phaser
.
Curves
.
Spline
([
attackPaper
.
path
=
new
Phaser
.
Curves
.
Spline
([
attackFrom
.
x
,
attackFrom
.
y
,
attackFrom
.
x
,
attackFrom
.
y
,
...
...
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