diff --git a/backend/src/socket/enum/player.enum.ts b/backend/src/socket/enum/player.enum.ts
index 903d484..79361c5 100644
--- a/backend/src/socket/enum/player.enum.ts
+++ b/backend/src/socket/enum/player.enum.ts
@@ -9,4 +9,5 @@ export enum stateOptions {
WALK = 'walk',
ROLL = 'roll',
JUMP = 'jump',
+ ATTACK = 'attack',
}
diff --git a/frontend/src/assets/character/attack/attack.png b/frontend/src/assets/character/attack/attack.png
new file mode 100644
index 0000000..6f8249a
Binary files /dev/null and b/frontend/src/assets/character/attack/attack.png differ
diff --git a/frontend/src/assets/character/sprite.json b/frontend/src/assets/character/sprite.json
index d575f5d..785a05a 100644
--- a/frontend/src/assets/character/sprite.json
+++ b/frontend/src/assets/character/sprite.json
@@ -3,190 +3,211 @@
{
"filename": "base1",
"frame": {
- "x": 33,
- "y": 17,
- "w": 30,
- "h": 30
+ "x": 0,
+ "y": 0,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "base2",
"frame": {
- "x": 129,
- "y": 17,
- "w": 30,
- "h": 30
+ "x": 96,
+ "y": 0,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "base3",
"frame": {
- "x": 225,
- "y": 17,
- "w": 30,
- "h": 30
+ "x": 192,
+ "y": 0,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "base4",
"frame": {
- "x": 321,
- "y": 17,
- "w": 30,
- "h": 30
+ "x": 288,
+ "y": 0,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "base5",
"frame": {
- "x": 417,
- "y": 17,
- "w": 30,
- "h": 30
+ "x": 384,
+ "y": 0,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "base6",
"frame": {
- "x": 513,
- "y": 17,
- "w": 30,
- "h": 30
+ "x": 480,
+ "y": 0,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "base7",
"frame": {
- "x": 609,
- "y": 17,
- "w": 30,
- "h": 30
+ "x": 576,
+ "y": 0,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "base8",
"frame": {
- "x": 705,
- "y": 17,
- "w": 30,
- "h": 30
+ "x": 672,
+ "y": 0,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "base9",
"frame": {
- "x": 801,
- "y": 17,
- "w": 30,
- "h": 30
+ "x": 768,
+ "y": 0,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
+ }
+ },
+ {
+ "filename": "base10",
+ "frame": {
+ "x": 864,
+ "y": 0,
+ "w": 96,
+ "h": 64
+ },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": {
+ "x": 0,
+ "y": 0,
+ "w": 96,
+ "h": 64
+ },
+ "sourceSize": {
+ "w": 96,
+ "h": 64
}
},
{
@@ -378,1138 +399,1285 @@
"h": 0
}
},
+ {
+ "filename": "nohair10",
+ "frame": {
+ "x": 0,
+ "y": 0,
+ "w": 0,
+ "h": 0
+ },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": {
+ "x": 0,
+ "y": 0,
+ "w": 0,
+ "h": 0
+ },
+ "sourceSize": {
+ "w": 0,
+ "h": 0
+ }
+ },
{
"filename": "longhair1",
"frame": {
- "x": 33,
- "y": 81,
- "w": 30,
- "h": 30
+ "x": 0,
+ "y": 64,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "longhair2",
"frame": {
- "x": 129,
- "y": 81,
- "w": 30,
- "h": 30
+ "x": 96,
+ "y": 64,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "longhair3",
"frame": {
- "x": 225,
- "y": 81,
- "w": 30,
- "h": 30
+ "x": 192,
+ "y": 64,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "longhair4",
"frame": {
- "x": 321,
- "y": 81,
- "w": 30,
- "h": 30
+ "x": 288,
+ "y": 64,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "longhair5",
"frame": {
- "x": 417,
- "y": 81,
- "w": 30,
- "h": 30
+ "x": 384,
+ "y": 64,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "longhair6",
"frame": {
- "x": 513,
- "y": 81,
- "w": 30,
- "h": 30
+ "x": 480,
+ "y": 64,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "longhair7",
"frame": {
- "x": 609,
- "y": 81,
- "w": 30,
- "h": 30
+ "x": 576,
+ "y": 64,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "longhair8",
"frame": {
- "x": 705,
- "y": 81,
- "w": 30,
- "h": 30
+ "x": 672,
+ "y": 64,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "longhair9",
"frame": {
- "x": 801,
- "y": 81,
- "w": 30,
- "h": 30
+ "x": 768,
+ "y": 64,
+ "w": 96,
+ "h": 64
+ },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": {
+ "x": 0,
+ "y": 0,
+ "w": 96,
+ "h": 64
+ },
+ "sourceSize": {
+ "w": 96,
+ "h": 64
+ }
+ },
+ {
+ "filename": "longhair10",
+ "frame": {
+ "x": 864,
+ "y": 64,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "mophair1",
"frame": {
- "x": 33,
- "y": 145,
- "w": 30,
- "h": 30
+ "x": 0,
+ "y": 128,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "mophair2",
"frame": {
- "x": 129,
- "y": 145,
- "w": 30,
- "h": 30
+ "x": 96,
+ "y": 128,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "mophair3",
"frame": {
- "x": 225,
- "y": 145,
- "w": 30,
- "h": 30
+ "x": 192,
+ "y": 128,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "mophair4",
"frame": {
- "x": 321,
- "y": 145,
- "w": 30,
- "h": 30
+ "x": 288,
+ "y": 128,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "mophair5",
"frame": {
- "x": 417,
- "y": 145,
- "w": 30,
- "h": 30
+ "x": 384,
+ "y": 128,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "mophair6",
"frame": {
- "x": 513,
- "y": 145,
- "w": 30,
- "h": 30
+ "x": 480,
+ "y": 128,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "mophair7",
"frame": {
- "x": 609,
- "y": 145,
- "w": 30,
- "h": 30
+ "x": 576,
+ "y": 128,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "mophair8",
"frame": {
- "x": 705,
- "y": 145,
- "w": 30,
- "h": 30
+ "x": 672,
+ "y": 128,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "mophair9",
"frame": {
- "x": 801,
- "y": 145,
- "w": 30,
- "h": 30
+ "x": 768,
+ "y": 128,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
+ }
+ },
+ {
+ "filename": "mophair10",
+ "frame": {
+ "x": 864,
+ "y": 128,
+ "w": 96,
+ "h": 64
+ },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": {
+ "x": 0,
+ "y": 0,
+ "w": 96,
+ "h": 64
+ },
+ "sourceSize": {
+ "w": 96,
+ "h": 64
}
},
{
"filename": "shorthair1",
"frame": {
- "x": 33,
- "y": 209,
- "w": 30,
- "h": 30
+ "x": 0,
+ "y": 192,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "shorthair2",
"frame": {
- "x": 129,
- "y": 209,
- "w": 30,
- "h": 30
+ "x": 96,
+ "y": 192,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "shorthair3",
"frame": {
- "x": 225,
- "y": 209,
- "w": 30,
- "h": 30
+ "x": 192,
+ "y": 192,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "shorthair4",
"frame": {
- "x": 321,
- "y": 209,
- "w": 30,
- "h": 30
+ "x": 288,
+ "y": 192,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "shorthair5",
"frame": {
- "x": 417,
- "y": 209,
- "w": 30,
- "h": 30
+ "x": 384,
+ "y": 192,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "shorthair6",
"frame": {
- "x": 513,
- "y": 209,
- "w": 30,
- "h": 30
+ "x": 480,
+ "y": 192,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "shorthair7",
"frame": {
- "x": 609,
- "y": 209,
- "w": 30,
- "h": 30
+ "x": 576,
+ "y": 192,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "shorthair8",
"frame": {
- "x": 705,
- "y": 209,
- "w": 30,
- "h": 30
+ "x": 672,
+ "y": 192,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "shorthair9",
"frame": {
- "x": 801,
- "y": 209,
- "w": 30,
- "h": 30
+ "x": 768,
+ "y": 192,
+ "w": 96,
+ "h": 64
+ },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": {
+ "x": 0,
+ "y": 0,
+ "w": 96,
+ "h": 64
+ },
+ "sourceSize": {
+ "w": 96,
+ "h": 64
+ }
+ },
+ {
+ "filename": "shorthair10",
+ "frame": {
+ "x": 864,
+ "y": 192,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "spikeyhair1",
"frame": {
- "x": 33,
- "y": 273,
- "w": 30,
- "h": 30
+ "x": 0,
+ "y": 256,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "spikeyhair2",
"frame": {
- "x": 129,
- "y": 273,
- "w": 30,
- "h": 30
+ "x": 96,
+ "y": 256,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "spikeyhair3",
"frame": {
- "x": 225,
- "y": 273,
- "w": 30,
- "h": 30
+ "x": 192,
+ "y": 256,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "spikeyhair4",
"frame": {
- "x": 321,
- "y": 273,
- "w": 30,
- "h": 30
+ "x": 288,
+ "y": 256,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "spikeyhair5",
"frame": {
- "x": 417,
- "y": 273,
- "w": 30,
- "h": 30
+ "x": 384,
+ "y": 256,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "spikeyhair6",
"frame": {
- "x": 513,
- "y": 273,
- "w": 30,
- "h": 30
+ "x": 480,
+ "y": 256,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "spikeyhair7",
"frame": {
- "x": 609,
- "y": 273,
- "w": 30,
- "h": 30
+ "x": 576,
+ "y": 256,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "spikeyhair8",
"frame": {
- "x": 705,
- "y": 273,
- "w": 30,
- "h": 30
+ "x": 672,
+ "y": 256,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "spikeyhair9",
"frame": {
- "x": 801,
- "y": 273,
- "w": 30,
- "h": 30
+ "x": 768,
+ "y": 256,
+ "w": 96,
+ "h": 64
+ },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": {
+ "x": 0,
+ "y": 0,
+ "w": 96,
+ "h": 64
+ },
+ "sourceSize": {
+ "w": 96,
+ "h": 64
+ }
+ },
+ {
+ "filename": "spikeyhair10",
+ "frame": {
+ "x": 864,
+ "y": 256,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "bowlhair1",
"frame": {
- "x": 33,
- "y": 337,
- "w": 30,
- "h": 30
+ "x": 0,
+ "y": 320,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "bowlhair2",
"frame": {
- "x": 129,
- "y": 337,
- "w": 30,
- "h": 30
+ "x": 96,
+ "y": 320,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "bowlhair3",
"frame": {
- "x": 225,
- "y": 337,
- "w": 30,
- "h": 30
+ "x": 192,
+ "y": 320,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "bowlhair4",
"frame": {
- "x": 321,
- "y": 337,
- "w": 30,
- "h": 30
+ "x": 288,
+ "y": 320,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "bowlhair5",
"frame": {
- "x": 417,
- "y": 337,
- "w": 30,
- "h": 30
+ "x": 384,
+ "y": 320,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "bowlhair6",
"frame": {
- "x": 513,
- "y": 337,
- "w": 30,
- "h": 30
+ "x": 480,
+ "y": 320,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "bowlhair7",
"frame": {
- "x": 609,
- "y": 337,
- "w": 30,
- "h": 30
+ "x": 576,
+ "y": 320,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "bowlhair8",
"frame": {
- "x": 705,
- "y": 337,
- "w": 30,
- "h": 30
+ "x": 672,
+ "y": 320,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "bowlhair9",
"frame": {
- "x": 801,
- "y": 337,
- "w": 30,
- "h": 30
+ "x": 768,
+ "y": 320,
+ "w": 96,
+ "h": 64
+ },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": {
+ "x": 0,
+ "y": 0,
+ "w": 96,
+ "h": 64
+ },
+ "sourceSize": {
+ "w": 96,
+ "h": 64
+ }
+ },
+ {
+ "filename": "bowlhair10",
+ "frame": {
+ "x": 864,
+ "y": 320,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "curlyhair1",
"frame": {
- "x": 33,
- "y": 401,
- "w": 30,
- "h": 30
+ "x": 0,
+ "y": 384,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "curlyhair2",
"frame": {
- "x": 129,
- "y": 401,
- "w": 30,
- "h": 30
+ "x": 96,
+ "y": 384,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "curlyhair3",
"frame": {
- "x": 225,
- "y": 401,
- "w": 30,
- "h": 30
+ "x": 192,
+ "y": 384,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "curlyhair4",
"frame": {
- "x": 321,
- "y": 401,
- "w": 30,
- "h": 30
+ "x": 288,
+ "y": 384,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "curlyhair5",
"frame": {
- "x": 417,
- "y": 401,
- "w": 30,
- "h": 30
+ "x": 384,
+ "y": 384,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "curlyhair6",
"frame": {
- "x": 513,
- "y": 401,
- "w": 30,
- "h": 30
+ "x": 480,
+ "y": 384,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "curlyhair7",
"frame": {
- "x": 609,
- "y": 401,
- "w": 30,
- "h": 30
+ "x": 576,
+ "y": 384,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "curlyhair8",
"frame": {
- "x": 705,
- "y": 401,
- "w": 30,
- "h": 30
+ "x": 672,
+ "y": 384,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
},
{
"filename": "curlyhair9",
"frame": {
- "x": 801,
- "y": 401,
- "w": 30,
- "h": 30
+ "x": 768,
+ "y": 384,
+ "w": 96,
+ "h": 64
+ },
+ "rotated": false,
+ "trimmed": false,
+ "spriteSourceSize": {
+ "x": 0,
+ "y": 0,
+ "w": 96,
+ "h": 64
+ },
+ "sourceSize": {
+ "w": 96,
+ "h": 64
+ }
+ },
+ {
+ "filename": "curlyhair10",
+ "frame": {
+ "x": 864,
+ "y": 384,
+ "w": 96,
+ "h": 64
},
"rotated": false,
"trimmed": false,
"spriteSourceSize": {
"x": 0,
"y": 0,
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
},
"sourceSize": {
- "w": 30,
- "h": 30
+ "w": 96,
+ "h": 64
}
}
],
diff --git a/frontend/src/assets/character/tool/attack.png b/frontend/src/assets/character/tool/attack.png
new file mode 100644
index 0000000..4a4b33b
Binary files /dev/null and b/frontend/src/assets/character/tool/attack.png differ
diff --git a/frontend/src/assets/icon/checkBox.svg b/frontend/src/assets/icon/checkBox.svg
new file mode 100644
index 0000000..f1680bd
--- /dev/null
+++ b/frontend/src/assets/icon/checkBox.svg
@@ -0,0 +1,3 @@
+
diff --git a/frontend/src/assets/icon/close.svg b/frontend/src/assets/icon/close.svg
new file mode 100644
index 0000000..330e579
--- /dev/null
+++ b/frontend/src/assets/icon/close.svg
@@ -0,0 +1,3 @@
+
diff --git a/frontend/src/assets/icon/help.svg b/frontend/src/assets/icon/help.svg
new file mode 100644
index 0000000..fe02260
--- /dev/null
+++ b/frontend/src/assets/icon/help.svg
@@ -0,0 +1,3 @@
+
diff --git a/frontend/src/assets/icon/keyboardA.svg b/frontend/src/assets/icon/keyboardA.svg
new file mode 100644
index 0000000..d216176
--- /dev/null
+++ b/frontend/src/assets/icon/keyboardA.svg
@@ -0,0 +1,5 @@
+
diff --git a/frontend/src/assets/icon/keyboardArrow.svg b/frontend/src/assets/icon/keyboardArrow.svg
new file mode 100644
index 0000000..8c3816f
--- /dev/null
+++ b/frontend/src/assets/icon/keyboardArrow.svg
@@ -0,0 +1,14 @@
+
diff --git a/frontend/src/assets/icon/keyboardR.svg b/frontend/src/assets/icon/keyboardR.svg
new file mode 100644
index 0000000..c40bbf0
--- /dev/null
+++ b/frontend/src/assets/icon/keyboardR.svg
@@ -0,0 +1,5 @@
+
diff --git a/frontend/src/assets/icon/keyboardShift.svg b/frontend/src/assets/icon/keyboardShift.svg
new file mode 100644
index 0000000..559eea6
--- /dev/null
+++ b/frontend/src/assets/icon/keyboardShift.svg
@@ -0,0 +1,5 @@
+
diff --git a/frontend/src/assets/icon/keyboardSpace.svg b/frontend/src/assets/icon/keyboardSpace.svg
new file mode 100644
index 0000000..4e5e337
--- /dev/null
+++ b/frontend/src/assets/icon/keyboardSpace.svg
@@ -0,0 +1,5 @@
+
diff --git a/frontend/src/assets/info-boardAndRank.png b/frontend/src/assets/info-boardAndRank.png
new file mode 100644
index 0000000..234cfae
Binary files /dev/null and b/frontend/src/assets/info-boardAndRank.png differ
diff --git a/frontend/src/assets/info-chat.png b/frontend/src/assets/info-chat.png
new file mode 100644
index 0000000..6147a1f
Binary files /dev/null and b/frontend/src/assets/info-chat.png differ
diff --git a/frontend/src/assets/info-friends.png b/frontend/src/assets/info-friends.png
new file mode 100644
index 0000000..a322402
Binary files /dev/null and b/frontend/src/assets/info-friends.png differ
diff --git a/frontend/src/assets/info-mypage.png b/frontend/src/assets/info-mypage.png
new file mode 100644
index 0000000..12d41ef
Binary files /dev/null and b/frontend/src/assets/info-mypage.png differ
diff --git a/frontend/src/assets/info-setting.png b/frontend/src/assets/info-setting.png
new file mode 100644
index 0000000..2987ae2
Binary files /dev/null and b/frontend/src/assets/info-setting.png differ
diff --git a/frontend/src/assets/info-walkAndUser.png b/frontend/src/assets/info-walkAndUser.png
new file mode 100644
index 0000000..8331bce
Binary files /dev/null and b/frontend/src/assets/info-walkAndUser.png differ
diff --git a/frontend/src/assets/sidebarImg.png b/frontend/src/assets/sidebarImg.png
new file mode 100644
index 0000000..fe2115e
Binary files /dev/null and b/frontend/src/assets/sidebarImg.png differ
diff --git a/frontend/src/component/Game/Phaser/Player/myPlayer.ts b/frontend/src/component/Game/Phaser/Player/myPlayer.ts
index 8e8d2b0..161248e 100644
--- a/frontend/src/component/Game/Phaser/Player/myPlayer.ts
+++ b/frontend/src/component/Game/Phaser/Player/myPlayer.ts
@@ -29,9 +29,12 @@ export class MyPlayer extends Player {
}
}
- checkAndSetState(state: string, time: number = 0) {
+ checkAndSetState(state: string, time: number = 0, isAttack: boolean) {
if (this.isChangeState) this.state = state;
-
+ if (isAttack) {
+ this.isAttack = true;
+ setTimeout(() => (this.isAttack = false), time);
+ }
if (time) {
this.isChangeState = false;
setTimeout(() => (this.isChangeState = true), time);
@@ -45,47 +48,55 @@ export class MyPlayer extends Player {
this.state = 'wait';
this.scene.input.keyboard.removeAllKeys(true);
} else {
- const cursors = this.scene.input.keyboard.createCursorKeys();
- const keyR = this.scene.input.keyboard.addKey(
- Phaser.Input.Keyboard.KeyCodes.R
- );
- const keyShift = this.scene.input.keyboard.addKey(
- Phaser.Input.Keyboard.KeyCodes.SHIFT
- );
- const keySpace = this.scene.input.keyboard.addKey(
- Phaser.Input.Keyboard.KeyCodes.SPACE
- );
+ if (!this.isAttack) {
+ const cursors = this.scene.input.keyboard.createCursorKeys();
+ const keyR = this.scene.input.keyboard.addKey(
+ Phaser.Input.Keyboard.KeyCodes.R
+ );
+ const keyA = this.scene.input.keyboard.addKey(
+ Phaser.Input.Keyboard.KeyCodes.A
+ );
+ const keyShift = this.scene.input.keyboard.addKey(
+ Phaser.Input.Keyboard.KeyCodes.SHIFT
+ );
+ const keySpace = this.scene.input.keyboard.addKey(
+ Phaser.Input.Keyboard.KeyCodes.SPACE
+ );
- // motion
- if (keyR.isDown) {
- this.speed = 1.5;
- this.checkAndSetState('roll', 100);
- } else if (keyShift.isDown) {
- this.speed = 1.2;
- this.checkAndSetState('run');
- } else if (keySpace.isDown) {
- this.speed = 1;
- this.checkAndSetState('jump', 500);
- } else {
- this.speed = 1;
- this.checkAndSetState('walk');
- }
+ // motion
+ if (keyR.isDown) {
+ this.speed = 1.5;
+ this.checkAndSetState('roll', 100, false);
+ } else if (keyA.isDown) {
+ this.speed = 1;
+ this.checkAndSetState('attack', 800, true);
+ } else if (keyShift.isDown) {
+ this.speed = 1.2;
+ this.checkAndSetState('run', 0, false);
+ } else if (keySpace.isDown) {
+ this.speed = 1;
+ this.checkAndSetState('jump', 500, false);
+ } else {
+ this.speed = 1;
+ this.checkAndSetState('walk', 0, false);
+ }
- this.getBody().setVelocity(0, 0);
+ this.getBody().setVelocity(0, 0);
- sortHeldDirection(this, cursors);
- if (this.heldDirection.length) {
- const move: any = calcMoveToPos(this, this.heldDirection);
- this.getBody().setVelocity(move.x * this.speed, move.y * this.speed);
+ sortHeldDirection(this, cursors);
+ if (this.heldDirection.length) {
+ const move: any = calcMoveToPos(this, this.heldDirection);
+ this.getBody().setVelocity(move.x * this.speed, move.y * this.speed);
- if (move.x !== 0) {
- const direction = move.x > 0 ? 'right' : 'left';
- changeDirection(this, direction);
- }
+ if (move.x !== 0) {
+ const direction = move.x > 0 ? 'right' : 'left';
+ changeDirection(this, direction);
+ }
- changePosition(this, move.x * this.speed, move.y * this.speed);
- } else {
- this.checkAndSetState('wait');
+ changePosition(this, move.x * this.speed, move.y * this.speed);
+ } else {
+ this.checkAndSetState('wait', 0, false);
+ }
}
}
diff --git a/frontend/src/component/Game/Phaser/Player/player.ts b/frontend/src/component/Game/Phaser/Player/player.ts
index daebb60..bbf8163 100644
--- a/frontend/src/component/Game/Phaser/Player/player.ts
+++ b/frontend/src/component/Game/Phaser/Player/player.ts
@@ -4,10 +4,12 @@ export class Player extends Phaser.Physics.Arcade.Sprite {
character: Phaser.GameObjects.Sprite | undefined;
hair: Phaser.GameObjects.Sprite | undefined;
dust: Phaser.GameObjects.Sprite | undefined;
+ tool: Phaser.GameObjects.Sprite | undefined;
nicknameText: Phaser.GameObjects.Text | undefined;
direction: string;
isChangeState: boolean;
isCanMove: boolean;
+ isAttack: boolean;
state: string;
x: number;
y: number;
@@ -37,6 +39,7 @@ export class Player extends Phaser.Physics.Arcade.Sprite {
this.heldDirection = [];
this.id = id;
this.isCanMove = true;
+ this.isAttack = false;
this.character = this.scene.add.sprite(this.x, this.y, 'character-wait');
this.character.setScale(3);
@@ -44,6 +47,9 @@ export class Player extends Phaser.Physics.Arcade.Sprite {
this.hair = this.scene.add.sprite(this.x, this.y, `${this.hairName}-wait`);
this.hair.setScale(3);
+ this.tool = this.scene.add.sprite(this.x, this.y, 'attackTool');
+ this.tool.setScale(3);
+
this.dust = this.scene.add.sprite(this.x - 20, this.y + 5, 'dust');
this.dust.setScale(3);
@@ -67,6 +73,7 @@ export class Player extends Phaser.Physics.Arcade.Sprite {
delete() {
this.character?.destroy();
this.hair?.destroy();
+ this.tool?.destroy();
this.nicknameText?.destroy();
this.dust?.destroy();
}
diff --git a/frontend/src/component/Game/game.ts b/frontend/src/component/Game/game.ts
index fb8d230..d674b2c 100644
--- a/frontend/src/component/Game/game.ts
+++ b/frontend/src/component/Game/game.ts
@@ -14,6 +14,8 @@ import walkImg from '../../assets/character/walk/walk.png';
import runImg from '../../assets/character/run/run.png';
import rollImg from '../../assets/character/roll/roll.png';
import jumpImg from '../../assets/character/jump/jump.png';
+import attackImg from '../../assets/character/attack/attack.png';
+import attackTool from '../../assets/character/tool/attack.png';
import { stringObjectType } from '../../types/types';
const characterImg: stringObjectType = {
@@ -22,6 +24,7 @@ const characterImg: stringObjectType = {
run: runImg,
roll: rollImg,
jump: jumpImg,
+ attack: attackImg,
};
export default class Game extends Phaser.Scene {
@@ -92,7 +95,7 @@ export default class Game extends Phaser.Scene {
this.load.audio('christmas', [christmas]);
// 캐릭터 동작
- const actions = ['wait', 'walk', 'run', 'roll', 'jump'];
+ const actions = ['wait', 'walk', 'run', 'roll', 'jump', 'attack'];
actions.forEach((action: string) => {
this.load.atlas(action, characterImg[action], spriteJSON);
@@ -103,6 +106,11 @@ export default class Game extends Phaser.Scene {
frameWidth: 24,
frameHeight: 9,
});
+
+ this.load.spritesheet('attackTool', attackTool, {
+ frameWidth: 96,
+ frameHeight: 64,
+ });
}
create() {
@@ -128,6 +136,7 @@ export default class Game extends Phaser.Scene {
{ action: 'run', start: 1, end: 8 },
{ action: 'roll', start: 2, end: 5 },
{ action: 'jump', start: 1, end: 9 },
+ { action: 'attack', start: 1, end: 10 },
];
const hairInfo = [
@@ -180,6 +189,16 @@ export default class Game extends Phaser.Scene {
repeat: -1,
});
+ this.anims.create({
+ key: 'attackTool',
+ frames: this.anims.generateFrameNames('attackTool', {
+ start: 0,
+ end: 9,
+ }),
+ frameRate: 10,
+ repeat: -1,
+ });
+
emitter.emit('ready');
}
diff --git a/frontend/src/component/Game/util.ts b/frontend/src/component/Game/util.ts
index b3651b7..1951040 100644
--- a/frontend/src/component/Game/util.ts
+++ b/frontend/src/component/Game/util.ts
@@ -13,6 +13,13 @@ export const changeState = (player: any) => {
player.dust.visible = false;
player.dust.stop();
}
+ if (player.state === 'attack') {
+ player.tool.visible = true;
+ player.tool.play('attackTool');
+ } else {
+ player.tool.visible = false;
+ player.tool.stop();
+ }
};
export const changeDirection = (player: any, direction: string) => {
@@ -22,6 +29,7 @@ export const changeDirection = (player: any, direction: string) => {
player.character.toggleFlipX();
player.hair.toggleFlipX();
player.dust.toggleFlipX();
+ player.tool.toggleFlipX();
player.direction = direction;
};
@@ -58,6 +66,7 @@ export const changePosition = (player: any, x: number, y: number) => {
player.character.setPosition(player.x, player.y);
player.hair.setPosition(player.x, player.y);
+ player.tool.setPosition(player.x, player.y);
player.nicknameText.x = player.x - player.nickname.length * 3.5;
player.nicknameText.y = player.y + 25;
diff --git a/frontend/src/component/Info/Help.tsx b/frontend/src/component/Info/Help.tsx
new file mode 100644
index 0000000..bfc5b5f
--- /dev/null
+++ b/frontend/src/component/Info/Help.tsx
@@ -0,0 +1,74 @@
+import { useEffect, useState } from 'react';
+import help from '../../assets/icon/help.svg';
+import BoardAndRankInfo from './HelpDescription/BoardAndRankInfo';
+import KeyBoardInfo from './HelpDescription/KeyBoardInfo';
+import SidebarInfo from './HelpDescription/SidebarInfo';
+import WalkAndUserInfo from './HelpDescription/WalkAndUserInfo';
+
+import * as style from './info.styled';
+
+const Help = () => {
+ const [isShowModal, setIsShowModal] = useState(false);
+ const [animation, setAnimation] = useState('show');
+ const [setOpen, isSetOpen] = useState(false);
+
+ const setOpenModal = () => {
+ isSetOpen(!setOpen);
+ };
+
+ const handleModal = () => {
+ if (isShowModal) {
+ setAnimation('close');
+ setTimeout(() => setIsShowModal(false), 300);
+
+ const setValue = setOpen ? 'open' : 'close';
+ localStorage.setItem('openHelp', setValue);
+ } else {
+ setAnimation('show');
+ setIsShowModal(true);
+ }
+ };
+
+ useEffect(() => {
+ const openHelp = localStorage.getItem('openHelp');
+ if (openHelp === 'open') {
+ setIsShowModal(true);
+ isSetOpen(true);
+ }
+ }, []);
+
+ return (
+ <>
+ {isShowModal && (
+ <>
+ 우측 하단의 물음표 버튼을 클릭해서 도움말을 볼 수 있습니다. 접속시 도움말 켜기📋 Notice
+
+ 오른쪽 하단의 트로피 모양의 버튼을 클릭하면 SleepyBoard가 보여집니다. +
++ 상단의 탭을 클릭하여 업적을 보거나,{' '} + 걸음수 랭킹을 볼 수 있습니다. +
++ 탭 아래의 필터를 클릭해 모든 유저, 좋아요, 친구, 기간을 설정할 수 + 있습니다. +
++ 걸음수 갱신은 매일 자정에 이루어집니다. +
+화살표 방향키로 이동할 수 있습니다.
+space키로 점프할 수 있습니다.
+A키로 공격 모션을 취할 수 있습니다.
+R키로 구르기를 할 수 있습니다.
+shift키로 달리기를 할 수 있습니다.
++ 왼쪽 상단의 {'>'} 버튼을 클릭하면 사이드바를 볼 수 + 있습니다. +
++ 사이드바 상단의 버튼을 클릭해 다음과 같은 기능을 사용할 수 있습니다. +
++ 캐릭터 변경, 닉네임 수정, 로그아웃, 회원탈퇴를 + 할 수 있습니다. +
++ 회원탈퇴를 하는 경우{' '} + 같은 계정으로 다시는 회원가입할 수 없습니다. +
++ 친구목록을 볼 수 있습니다. +
++ 유저를 검색해서 친구추가 할 수 있습니다. +
++ 친구목록의 아이콘을 클릭해 1:1 채팅 및 친구끊기 + 가 가능합니다. +
++ 친구를 아래로 드래그해서 영상통화가 가능합니다. +
++ 채팅방 목록이 보여집니다. +
++ 각각 채팅방에는{' '} + 닉네임, 시각, 마지막 메세지, 읽지않은 메세지가 + 표시됩니다. +
++ 채팅방을 클릭해 다른 유저와 실시간 1:1 채팅을 + 할 수 있습니다. +
++ 배경음악 및 눈내리기 효과를 on/off 할 수 + 있습니다. +
++ 영상통화에 사용되는 기기(카메라, 마이크)를 설정 + 할 수 있습니다. +
++ 오른쪽 하단에 자신의 걸음수와{' '} + 접속유저가 표시됩니다. +
+방향키로 이동했을때 걸음수가 증가하며 랭킹에 반영됩니다.
+