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
1578c084
Commit
1578c084
authored
Jul 04, 2019
by
18신대성
Committed by
16이지혜
Jul 04, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
씬 분리 성공
parent
a8aa3e7f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
39 additions
and
32 deletions
+39
-32
index.html
index.html
+1
-0
ScenesData.js
js/ScenesData.js
+37
-0
main.js
js/main.js
+1
-32
No files found.
index.html
View file @
1578c084
...
...
@@ -4,6 +4,7 @@
<meta
charset=
"utf-8"
/>
<script
src=
"/socket.io/socket.io.js"
></script>
<script
src=
"js/phaser.js"
></script>
<script
src=
"js/ScenesData.js"
></script>
<script
src=
"js/Background.js"
></script>
<script
src=
"js/Input.js"
></script>
<script
src=
"js/WordSpace.js"
></script>
...
...
js/ScenesData.js
0 → 100644
View file @
1578c084
var
gameScene
=
new
Phaser
.
Class
(
{
Extends
:
Phaser
.
Scene
,
initialize
:
function
gameScene
(
config
)
{
Phaser
.
Scene
.
call
(
this
,
config
);
},
preload
:
function
()
{
BackGround
.
loadImage
(
this
);
WordSpace
.
loadImage
(
this
);
Input
.
inputField
.
loadImage
(
this
);
CSVParsing
.
loadText
(
this
);
},
create
:
function
()
{
BackGround
.
drawBrain
(
this
);
Input
.
inputField
.
generate
(
this
);
WordSpace
.
wordPhysicsGroup
=
this
.
physics
.
add
.
group
();
WordSpace
.
wordCycle
.
resetCycle
(
this
,
3000
);
WordSpace
.
attackGauge
.
resetCycle
(
this
);
CSVParsing
.
CSVParse
(
this
);
},
update
:
function
()
{
WordSpace
.
wordForcedGroup
.
forEach
(
function
(
element
)
{
element
.
attract
();
});
}
});
\ No newline at end of file
js/main.js
View file @
1578c084
...
...
@@ -9,43 +9,12 @@ var config = {
}
},
backgroundColor
:
Phaser
.
Display
.
Color
.
GetColor
(
0
,
0
,
0
),
scene
:
{
preload
:
preload
,
create
:
create
,
update
:
update
}
scene
:
[
gameScene
]
};
var
game
=
new
Phaser
.
Game
(
config
)
var
playerNum
=
-
1
;
// load assets
function
preload
()
{
BackGround
.
loadImage
(
this
);
WordSpace
.
loadImage
(
this
);
Input
.
inputField
.
loadImage
(
this
);
CSVParsing
.
loadText
(
this
);
}
function
create
()
{
BackGround
.
drawBrain
(
this
);
Input
.
inputField
.
generate
(
this
);
WordSpace
.
wordPhysicsGroup
=
this
.
physics
.
add
.
group
();
WordSpace
.
wordCycle
.
resetCycle
(
this
,
3000
);
WordSpace
.
attackGauge
.
resetCycle
(
this
);
CSVParsing
.
CSVParse
(
this
);
}
function
update
()
{
WordSpace
.
wordForcedGroup
.
forEach
(
function
(
element
)
{
element
.
attract
();
});
}
// client side
var
socket
=
io
.
connect
();
socket
.
emit
(
'
idRequest
'
);
...
...
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