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
86763101
Commit
86763101
authored
Aug 08, 2019
by
18손재민
Committed by
18손재민
Aug 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
임시 이미지를 이용하여 방 입장 다이얼로그 구현 wip
parent
b7a061b9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
60 deletions
+25
-60
button.png
assets/placeholder/button.png
+0
-0
panel.png
assets/placeholder/panel.png
+0
-0
ResourceLoader.js
js/ResourceLoader.js
+1
-0
ScenesData.js
js/ScenesData.js
+23
-59
server.js
server.js
+1
-1
No files found.
assets/placeholder/button.png
0 → 100644
View file @
86763101
485 Bytes
assets/placeholder/panel.png
View replaced file @
b7a061b9
View file @
86763101
14.3 KB
|
W:
|
H:
9.19 KB
|
W:
|
H:
2-up
Swipe
Onion skin
js/ResourceLoader.js
View file @
86763101
...
...
@@ -43,6 +43,7 @@ ResourceLoader.loadImage = function(scene)
scene
.
load
.
image
(
'
phaseChangeBgr
'
,
'
assets/placeholder/phaseChange.png
'
);
scene
.
load
.
image
(
'
attackPaper
'
,
'
assets/image/etc/paper_crumbled.png
'
);
scene
.
load
.
image
(
'
panel
'
,
'
assets/placeholder/panel.png
'
);
scene
.
load
.
image
(
'
button
'
,
'
assets/placeholder/button.png
'
);
}
ResourceLoader
.
loadAnimation
=
function
(
scene
)
...
...
js/ScenesData.js
View file @
86763101
...
...
@@ -47,27 +47,13 @@ var menuScene = new Phaser.Class(
this
.
dialog
=
this
.
rexUI
.
add
.
dialog
({
x
:
400
,
y
:
300
,
background
:
this
.
rexUI
.
add
.
roundRectangle
(
0
,
0
,
100
,
100
,
20
,
0x1565c0
),
title
:
this
.
rexUI
.
add
.
label
({
background
:
this
.
rexUI
.
add
.
roundRectangle
(
0
,
0
,
100
,
40
,
20
,
0x003c8f
),
text
:
this
.
add
.
text
(
0
,
0
,
'
제목
'
,
{
fontSize
:
'
24px
'
,
fontFamily
:
'
"궁서", 궁서체, serif
'
}),
space
:
{
left
:
15
,
right
:
15
,
top
:
10
,
bottom
:
10
}
}),
this
.
roomEnterDialog
=
this
.
rexUI
.
add
.
dialog
({
x
:
game
.
config
.
width
/
2
,
y
:
game
.
config
.
height
/
2
,
background
:
this
.
add
.
sprite
(
game
.
config
.
width
/
2
,
game
.
config
.
height
/
2
,
'
panel
'
).
setOrigin
(
0.5
,
0.5
),
content
:
this
.
add
.
text
(
0
,
0
,
'
Do you want to build a snow man
?
'
,
{
content
:
this
.
add
.
text
(
0
,
0
,
'
대기실에 참가하시겠습니까
?
'
,
{
fontSize
:
'
24px
'
}),
...
...
@@ -79,7 +65,7 @@ var menuScene = new Phaser.Class(
space
:
{
title
:
25
,
content
:
25
,
action
:
1
5
,
action
:
1
00
,
left
:
20
,
right
:
20
,
...
...
@@ -88,46 +74,40 @@ var menuScene = new Phaser.Class(
},
align
:
{
actions
:
'
left
'
// 'center'|'left'|'right'
actions
:
'
center
'
// 'center'|'left'|'right'
},
expand
:
{
content
:
false
,
// Content is a pure text object
}
})
.
layout
()
// .drawBounds(this.add.graphics(), 0xff0000)
.
popUp
(
1000
);
},
width
:
1000
,
height
:
800
,
}).
layout
().
setDepth
(
10
).
setVisible
(
false
);
//.drawBounds(this.add.graphics(), 0xff0000)
//.popUp(1000)
this
.
print
=
this
.
add
.
text
(
0
,
0
,
''
);
this
.
d
ialog
this
.
roomEnterD
ialog
.
on
(
'
button.click
'
,
function
(
button
,
groupName
,
index
)
{
//this.print.text += index + ': ' + button.text + '\n';
if
(
index
==
0
)
this
.
print
.
text
+=
'
snow man
\n
'
;
else
this
.
dialog
.
destroy
();
if
(
index
==
0
)
socket
.
emit
(
'
enterRoom
'
,
PlayerData
.
nickname
);
else
this
.
roomEnterDialog
.
setVisible
(
false
);
},
this
)
.
on
(
'
button.over
'
,
function
(
button
,
groupName
,
index
)
{
button
.
getElement
(
'
background
'
).
setStrokeStyle
(
1
,
0xffffff
);
//console.log('button over'
);
})
.
on
(
'
button.out
'
,
function
(
button
,
groupName
,
index
)
{
button
.
getElement
(
'
background
'
).
setStrokeStyle
(
);
//console.log('button out'
);
});
let
gameStartBtn
=
new
Button
(
this
,
game
.
config
.
width
/
2
,
800
,
'
pyeongminWrite
'
,
function
(){
console
.
log
(
'
방 입장
'
);
socket
.
emit
(
'
enterRoom
'
,
PlayerData
.
nickname
);
ScenesData
.
menuScene
.
roomEnterDialog
.
setVisible
(
true
).
popUp
(
200
);
//socket.emit('enterRoom', PlayerData.nickname);
},
1
,
0
,
2
)
gameStartBtn
.
setScale
(
0.5
).
setDepth
(
5
);
...
...
@@ -139,17 +119,12 @@ var menuScene = new Phaser.Class(
}
});
var
createLabel
=
function
(
scene
,
text
)
{
return
scene
.
rexUI
.
add
.
label
({
// width: 40,
// height: 40,
background
:
scene
.
rexUI
.
add
.
roundRectangle
(
0
,
0
,
0
,
0
,
20
,
0x5e92f3
),
background
:
scene
.
add
.
sprite
(
0
,
0
,
'
button
'
).
setOrigin
(
0.5
,
0.5
),
text
:
scene
.
add
.
text
(
0
,
0
,
text
,
{
fontSize
:
'
24px
'
...
...
@@ -166,17 +141,6 @@ var createLabel = function (scene, text) {
var
roomScene
=
new
Phaser
.
Class
(
{
Extends
:
Phaser
.
Scene
,
...
...
server.js
View file @
86763101
...
...
@@ -13,7 +13,7 @@ app.get('/', function(req, res) {
});
// http 기본 포트(80)에 서버 열기
server
.
listen
(
80
,
function
()
{
server
.
listen
(
80
80
,
function
()
{
console
.
log
(
'
[SERVER] Listening on port
'
+
server
.
address
().
port
);
});
...
...
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