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
d1fd5f89
Commit
d1fd5f89
authored
Aug 18, 2019
by
18손재민
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
뇌 무게가 찰 시 뇌가 붉게 깜빡 거리며 사망 시 UI가 2초 뒤에 나타남
parent
959a2057
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
45 additions
and
9 deletions
+45
-9
brain.png
assets/image/background/brain.png
+0
-0
weightWarning.png
assets/image/background/weightWarning.png
+0
-0
Client.js
js/Client.js
+10
-3
ResourceLoader.js
js/ResourceLoader.js
+1
-1
ScenesData.js
js/ScenesData.js
+32
-5
WordSpace.js
js/WordSpace.js
+2
-0
No files found.
assets/image/background/brain.png
deleted
100644 → 0
View file @
959a2057
12.1 KB
assets/image/background/weightWarning.png
0 → 100644
View file @
d1fd5f89
13 KB
js/Client.js
View file @
d1fd5f89
...
...
@@ -346,7 +346,9 @@ socket.on('defeat', function(msg) // object player
if
(
msg
.
id
==
RoomData
.
myself
.
id
)
{
RoomData
.
myself
=
RoomData
.
players
[
msg
.
index
];
backToMenu
(
false
);
setTimeout
(()
=>
{
gameEndMenu
(
true
);
},
2000
);
}
});
socket
.
on
(
'
gameEnd
'
,
function
(
msg
)
// object player
...
...
@@ -355,7 +357,9 @@ socket.on('gameEnd', function(msg) // object player
if
(
msg
.
id
==
RoomData
.
myself
.
id
)
{
RoomData
.
myself
.
rank
=
1
;
backToMenu
(
true
);
setTimeout
(()
=>
{
gameEndMenu
(
true
);
},
2000
);
}
});
...
...
@@ -378,8 +382,11 @@ socket.on('userDisconnect', function(msg) // {num index , num id, str nickname}
RoomData
.
aliveCount
--
;
});
var
backTo
Menu
=
function
(
isWin
)
var
gameEnd
Menu
=
function
(
isWin
)
{
WordSpace
.
isGameOver
=
true
;
ScenesData
.
gameScene
.
warningImage
.
destroy
();
ScenesData
.
gameScene
.
warningTween
.
remove
();
let
earnedMoney
=
0
;
if
(
isWin
)
earnedMoney
+=
20
;
earnedMoney
+=
RoomData
.
myself
.
killCount
*
3
;
...
...
js/ResourceLoader.js
View file @
d1fd5f89
...
...
@@ -2,7 +2,7 @@ var ResourceLoader = ResourceLoader || {};
ResourceLoader
.
loadBackGround
=
function
(
scene
)
{
scene
.
load
.
image
(
'
brain
'
,
'
assets/image/background/brain
.png
'
);
scene
.
load
.
image
(
'
weightWarning
'
,
'
assets/image/background/weightWarning
.png
'
);
scene
.
load
.
image
(
'
baseBackground
'
,
'
assets/image/background/yellowBack.png
'
);
scene
.
load
.
image
(
'
gameBackground
'
,
'
assets/image/background/background_brain.png
'
);
scene
.
load
.
image
(
'
menuBackground
'
,
'
assets/placeholder/menuBackground.png
'
);
...
...
js/ScenesData.js
View file @
d1fd5f89
...
...
@@ -459,11 +459,18 @@ var gameScene = new Phaser.Class(
WordSpace
.
setPlayerTyping
.
initiate
(
this
);
WordSpace
.
nameQueue
.
initiate
();
//WordSpace.attackGauge.add(11);
WordSpace
.
generateWord
.
Item
(
ScenesData
.
gameScene
,
Enums
.
item
.
invincible
);
WordSpace
.
generateWord
.
Item
(
ScenesData
.
gameScene
,
Enums
.
item
.
invincible
);
WordSpace
.
generateWord
.
Item
(
ScenesData
.
gameScene
,
Enums
.
item
.
invincible
);
this
.
warningImage
=
this
.
add
.
sprite
(
game
.
config
.
width
/
2
,
game
.
config
.
height
/
2
,
'
weightWarning
'
).
setDisplaySize
(
game
.
config
.
width
,
game
.
config
.
height
).
setDepth
(
0.1
).
setAlpha
(
0
)
this
.
warningTween
=
this
.
tweens
.
add
({
targets
:
this
.
warningImage
,
alpha
:
1
,
duration
:
500
,
ease
:
'
Linear
'
,
yoyo
:
true
,
repeat
:
-
1
});
this
.
warningTween
.
timeScale
=
0
;
WordSpace
.
changePhase
(
WordSpace
.
Phase
.
START
);
},
...
...
@@ -487,6 +494,26 @@ var gameScene = new Phaser.Class(
WordSpace
.
weightTextObjForTest
.
setText
(
'
뇌의 무게: (현재)
'
+
WordSpace
.
totalWeight
+
'
/
'
+
WordSpace
.
brainCapacity
+
'
(전체)
'
);
WordSpace
.
setPlayerTyping
.
add
(
''
);
if
(
!
WordSpace
.
isGameOver
)
{
if
(
WordSpace
.
totalWeight
<
180
)
{
this
.
warningTween
.
timeScale
=
0
;
}
else
if
(
WordSpace
.
totalWeight
<
190
)
{
this
.
warningTween
.
timeScale
=
0.3
;
}
else
if
(
WordSpace
.
totalWeight
<
200
)
{
this
.
warningTween
.
timeScale
=
0.6
;
}
else
if
(
WordSpace
.
isTimerOn
)
{
this
.
warningTween
.
timeScale
=
0.6
+
WordSpace
.
gameOverCycle
.
currentCycle
.
getElapsed
()
/
WordSpace
.
delay
.
GameOver
*
3
;
}
}
}
}
});
...
...
js/WordSpace.js
View file @
d1fd5f89
...
...
@@ -9,6 +9,7 @@ WordSpace.totalWeight = 0; //현재 단어 무게 총합
WordSpace
.
totalWordNum
=
0
;
WordSpace
.
brainCapacity
=
200
;
//수용 가능한 단어 무게 최대치
WordSpace
.
gameTimer
=
null
;
//현재 게임 플레이 시간 타이머
WordSpace
.
isGameOver
=
false
;
WordSpace
.
isTimerOn
=
false
;
WordSpace
.
isInvincible
=
false
;
WordSpace
.
pyeongminAnims
=
[];
...
...
@@ -516,6 +517,7 @@ WordSpace.resetGame = function()
WordSpace
.
totalWordNum
=
0
;
WordSpace
.
brainCapacity
=
200
;
//수용 가능한 단어 무게 최대치
WordSpace
.
gameTimer
=
null
;
//현재 게임 플레이 시간 타이머
WordSpace
.
isGameOver
=
false
;
WordSpace
.
isTimerOn
=
false
;
WordSpace
.
isInvincible
=
false
;
WordSpace
.
pyeongminAnims
=
[];
...
...
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