Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
FOSS2023-2-final
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
유승민
FOSS2023-2-final
Commits
ab2eddf6
Commit
ab2eddf6
authored
1 year ago
by
Anbak98
Browse files
Options
Downloads
Patches
Plain Diff
Finish debug
parent
d2df1324
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#8828
passed
1 year ago
Stage: deploy
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
public/Assets/map.csv
+21
-4
21 additions, 4 deletions
public/Assets/map.csv
public/index.html
+14
-48
14 additions, 48 deletions
public/index.html
with
35 additions
and
52 deletions
public/Assets/map.csv
+
21
−
4
View file @
ab2eddf6
0, 1, 1, 2
3, 4, 4, 5
3, 4, 4, 5
6, 7, 7, 8
\ No newline at end of file
0, 1, 1, 2, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
0, 1, 1, 2, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8
0, 1, 1, 2, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8
6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5, 3, 4, 4, 5
6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8, 6, 7, 7, 8
\ No newline at end of file
This diff is collapsed.
Click to expand it.
public/index.html
+
14
−
48
View file @
ab2eddf6
...
...
@@ -17,43 +17,42 @@
preload
()
{
this
.
load
.
setBaseURL
(
'
https://
git.ajou.ac.kr/copomos00
/phaser3/
-/raw/
master/public/
A
ssets/
'
);
this
.
load
.
image
(
'
tiles
'
,
'
catastrophi_tiles_16
.png
'
);
this
.
load
.
tilemapCSV
(
'
map
'
,
'
catastrophi_level2
.csv
'
);
this
.
load
.
spritesheet
(
'
player
'
,
'
spaceman
.png
'
,
{
frameWidth
:
16
,
frameHeight
:
16
});
this
.
load
.
setBaseURL
(
'
https://
raw.githubusercontent.com/Anbak98
/phaser3/master/public/
a
ssets/
'
);
this
.
load
.
image
(
'
tiles
'
,
'
Tilemap
.png
'
);
this
.
load
.
tilemapCSV
(
'
map
'
,
'
map
.csv
'
);
this
.
load
.
spritesheet
(
'
player
'
,
'
Arrow
.png
'
,
{
frameWidth
:
16
,
frameHeight
:
16
});
}
create
()
{
// When loading a CSV map, make sure to specify the tileWidth and tileHeight
this
.
map
=
this
.
make
.
tilemap
({
key
:
'
map
'
,
tileWidth
:
16
,
tileHeight
:
16
});
this
.
map
=
this
.
make
.
tilemap
({
key
:
'
map
'
,
tileWidth
:
8
,
tileHeight
:
8
});
const
tileset
=
this
.
map
.
addTilesetImage
(
'
tiles
'
);
const
layer
=
this
.
map
.
createLayer
(
0
,
tileset
,
0
,
0
);
// This isn't totally accurate, but it'll do for now
this
.
map
.
setCollisionBetween
(
0
,
3
);
this
.
anims
.
create
({
key
:
'
left
'
,
frames
:
this
.
anims
.
generateFrameNumbers
(
'
player
'
,
{
start
:
8
,
end
:
9
}),
frames
:
this
.
anims
.
generateFrameNumbers
(
'
player
'
,
{
start
:
2
,
end
:
2
}),
frameRate
:
10
,
repeat
:
-
1
});
this
.
anims
.
create
({
key
:
'
right
'
,
frames
:
this
.
anims
.
generateFrameNumbers
(
'
player
'
,
{
start
:
1
,
end
:
2
}),
frames
:
this
.
anims
.
generateFrameNumbers
(
'
player
'
,
{
start
:
3
,
end
:
3
}),
frameRate
:
10
,
repeat
:
-
1
});
this
.
anims
.
create
({
key
:
'
up
'
,
frames
:
this
.
anims
.
generateFrameNumbers
(
'
player
'
,
{
start
:
11
,
end
:
13
}),
frames
:
this
.
anims
.
generateFrameNumbers
(
'
player
'
,
{
start
:
0
,
end
:
0
}),
frameRate
:
10
,
repeat
:
-
1
});
this
.
anims
.
create
({
key
:
'
down
'
,
frames
:
this
.
anims
.
generateFrameNumbers
(
'
player
'
,
{
start
:
4
,
end
:
6
}),
frames
:
this
.
anims
.
generateFrameNumbers
(
'
player
'
,
{
start
:
1
,
end
:
1
}),
frameRate
:
10
,
repeat
:
-
1
});
...
...
@@ -66,23 +65,11 @@
this
.
cameras
.
main
.
setBounds
(
0
,
0
,
this
.
map
.
widthInPixels
,
this
.
map
.
heightInPixels
);
this
.
cameras
.
main
.
startFollow
(
this
.
player
);
this
.
debugGraphics
=
this
.
add
.
graphics
();
this
.
input
.
keyboard
.
on
(
'
keydown-C
'
,
event
=>
{
this
.
showDebug
=
!
this
.
showDebug
;
this
.
drawDebug
();
});
// Debug!!!!
// I do not use this code on Tutorial video
this
.
cursors
=
this
.
input
.
keyboard
.
createCursorKeys
();
this
.
helpText
=
this
.
add
.
text
(
16
,
16
,
this
.
getHelpMessage
(),
{
fontSize
:
'
18px
'
,
fill
:
'
#ffffff
'
});
this
.
helpText
.
setScrollFactor
(
0
);
}
update
(
time
,
delta
)
...
...
@@ -131,28 +118,7 @@
this
.
player
.
anims
.
stop
();
}
}
drawDebug
()
{
this
.
debugGraphics
.
clear
();
if
(
this
.
showDebug
)
{
// Pass in null for any of the style options to disable drawing that component
this
.
map
.
renderDebug
(
this
.
debugGraphics
,
{
tileColor
:
null
,
// Non-colliding tiles
collidingTileColor
:
new
Phaser
.
Display
.
Color
(
243
,
134
,
48
,
200
),
// Colliding tiles
faceColor
:
new
Phaser
.
Display
.
Color
(
40
,
39
,
37
,
255
)
// Colliding face edges
});
}
this
.
helpText
.
setText
(
this
.
getHelpMessage
());
}
getHelpMessage
()
{
return
`Arrow keys to move.\nPress "C" to toggle debug visuals:
${
this
.
showDebug
?
'
on
'
:
'
off
'
}
`
;
}
}
const
config
=
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment