diff --git a/index.html b/index.html index 58a4b55..a98218d 100644 --- a/index.html +++ b/index.html @@ -17,6 +17,13 @@ + + Resolução de tela + + 1920 x 1080 + 1280 x 720 + + Start Game diff --git a/src/imagens/game-assets/tanjiro/tanjiro-dash.png b/src/imagens/game-assets/tanjiro/tanjiro-dash.png new file mode 100644 index 0000000..cacb72a Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-dash.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 0.png new file mode 100644 index 0000000..b640592 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 1.png new file mode 100644 index 0000000..1495916 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 2.png new file mode 100644 index 0000000..1a6d8e3 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 3.png new file mode 100644 index 0000000..5b75d5f Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 4.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 4.png new file mode 100644 index 0000000..b3f73e6 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 4.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 5.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 5.png new file mode 100644 index 0000000..4484c3b Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 5.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 6.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 6.png new file mode 100644 index 0000000..756b65b Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 6.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 7.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 7.png new file mode 100644 index 0000000..eb55ac6 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 7.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 8.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 8.png new file mode 100644 index 0000000..556a30e Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/headbutt/headbutt 8.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 0.png new file mode 100644 index 0000000..5fdab8d Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 1.png new file mode 100644 index 0000000..6713ab9 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 2.png new file mode 100644 index 0000000..471b213 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 3.png new file mode 100644 index 0000000..cbff9ab Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 4.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 4.png new file mode 100644 index 0000000..864de30 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 4.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 5.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 5.png new file mode 100644 index 0000000..2ccd8d2 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 5.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 6.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 6.png new file mode 100644 index 0000000..455d1ab Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/koma attack/koma attack 6.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/lunge down in the air/lunge down in the air 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/lunge down in the air/lunge down in the air 0.png new file mode 100644 index 0000000..df3722f Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/lunge down in the air/lunge down in the air 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/lunge down in the air/lunge down in the air 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/lunge down in the air/lunge down in the air 1.png new file mode 100644 index 0000000..fd52b96 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/lunge down in the air/lunge down in the air 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/lunge down in the air/lunge down in the air 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/lunge down in the air/lunge down in the air 2.png new file mode 100644 index 0000000..d252798 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/lunge down in the air/lunge down in the air 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 0.png new file mode 100644 index 0000000..9674e90 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 1.png new file mode 100644 index 0000000..293e049 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 2.png new file mode 100644 index 0000000..3d41674 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 3.png new file mode 100644 index 0000000..70ba472 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/orizontal slash/orizontal slash 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water on the air/shock wave of water on the air 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water on the air/shock wave of water on the air 0.png new file mode 100644 index 0000000..04fb069 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water on the air/shock wave of water on the air 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water on the air/shock wave of water on the air 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water on the air/shock wave of water on the air 1.png new file mode 100644 index 0000000..1105db8 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water on the air/shock wave of water on the air 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water on the air/shock wave of water on the air 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water on the air/shock wave of water on the air 2.png new file mode 100644 index 0000000..b44644b Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water on the air/shock wave of water on the air 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water/shock wave of water 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water/shock wave of water 0.png new file mode 100644 index 0000000..6048a86 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water/shock wave of water 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water/shock wave of water 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water/shock wave of water 1.png new file mode 100644 index 0000000..5c87f4c Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water/shock wave of water 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water/shock wave of water 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water/shock wave of water 2.png new file mode 100644 index 0000000..b44644b Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/shock wave of water/shock wave of water 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash in the air/slash in the air 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash in the air/slash in the air 0.png new file mode 100644 index 0000000..f0edb59 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash in the air/slash in the air 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash in the air/slash in the air 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash in the air/slash in the air 1.png new file mode 100644 index 0000000..1ed0230 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash in the air/slash in the air 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 0.png new file mode 100644 index 0000000..260802c Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 1.png new file mode 100644 index 0000000..bb84ae6 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 2.png new file mode 100644 index 0000000..e4508b4 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 3.png new file mode 100644 index 0000000..1be315c Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 4.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 4.png new file mode 100644 index 0000000..6283479 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 4.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 5.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 5.png new file mode 100644 index 0000000..a4b7455 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 5.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 6.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 6.png new file mode 100644 index 0000000..912edf5 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta 6.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 0.png new file mode 100644 index 0000000..f520e00 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 1.png new file mode 100644 index 0000000..57c8e9d Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 2.png new file mode 100644 index 0000000..53912ba Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 3.png new file mode 100644 index 0000000..a6a0ac6 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 4.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 4.png new file mode 100644 index 0000000..101f35a Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash voltereta/slash voltereta effect 4.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash/slash 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash/slash 0.png new file mode 100644 index 0000000..2db10a2 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash/slash 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash/slash 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash/slash 1.png new file mode 100644 index 0000000..0fc21ca Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/slash/slash 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 0.png new file mode 100644 index 0000000..5c8d37e Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 1.png new file mode 100644 index 0000000..5850dc4 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 2.png new file mode 100644 index 0000000..187d1cf Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 3.png new file mode 100644 index 0000000..3a2c0cb Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/thrust/thrust 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 0.png new file mode 100644 index 0000000..c3e2183 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 1.png new file mode 100644 index 0000000..d346e07 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 2.png new file mode 100644 index 0000000..33e510e Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 3.png new file mode 100644 index 0000000..548c5fa Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/upper slash/upper slash 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 0.png new file mode 100644 index 0000000..bd8953d Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 1.png new file mode 100644 index 0000000..1bd3f25 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 2.png new file mode 100644 index 0000000..80b49ce Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 3.png new file mode 100644 index 0000000..fd64f03 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water slash/water slash 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 0.png new file mode 100644 index 0000000..9a4e156 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 1.png new file mode 100644 index 0000000..a499ddd Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 2.png new file mode 100644 index 0000000..8da438c Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 3.png new file mode 100644 index 0000000..0a5de07 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 4.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 4.png new file mode 100644 index 0000000..71910e6 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 4.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 5.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 5.png new file mode 100644 index 0000000..d0ad7f2 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 5.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 6.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 6.png new file mode 100644 index 0000000..9589f88 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/attacks/water tornado slash/water tornado slash 6.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 0.png new file mode 100644 index 0000000..86cb06a Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 1.png new file mode 100644 index 0000000..56afb53 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 10.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 10.png new file mode 100644 index 0000000..7fadda4 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 10.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 2.png new file mode 100644 index 0000000..f18d038 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 3.png new file mode 100644 index 0000000..f81dd78 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 4.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 4.png new file mode 100644 index 0000000..c0cbcd6 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 4.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 5.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 5.png new file mode 100644 index 0000000..03d9ab6 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 5.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 6.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 6.png new file mode 100644 index 0000000..022cbeb Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 6.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 7.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 7.png new file mode 100644 index 0000000..ad2b2e7 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 7.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 8.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 8.png new file mode 100644 index 0000000..d232445 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 8.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 9.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 9.png new file mode 100644 index 0000000..4569652 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/damage/damage 9.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 0.png new file mode 100644 index 0000000..b4ce98d Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 1.png new file mode 100644 index 0000000..24b19f4 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 2.png new file mode 100644 index 0000000..f8b4da9 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 3.png new file mode 100644 index 0000000..334b42f Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 4.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 4.png new file mode 100644 index 0000000..e3b19b7 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/intro/intro 4.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 0.png new file mode 100644 index 0000000..d706817 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 1.png new file mode 100644 index 0000000..33664af Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 2.png new file mode 100644 index 0000000..618a73e Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 3.png new file mode 100644 index 0000000..37797ea Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 4.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 4.png new file mode 100644 index 0000000..57a00df Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 4.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 5.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 5.png new file mode 100644 index 0000000..707bda6 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/jump/jump 5.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 0.png new file mode 100644 index 0000000..a862326 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 1.png new file mode 100644 index 0000000..7a715a8 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 2.png new file mode 100644 index 0000000..9d60edf Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 3.png new file mode 100644 index 0000000..347306c Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 4.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 4.png new file mode 100644 index 0000000..5cb986b Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 4.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 5.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 5.png new file mode 100644 index 0000000..94164cc Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 5.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 6.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 6.png new file mode 100644 index 0000000..01ff35d Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 6.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 7.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 7.png new file mode 100644 index 0000000..5de2d78 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/run/run 7.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/stand/stand 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/stand/stand 0.png new file mode 100644 index 0000000..27a42f5 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/stand/stand 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/stand/stand 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/stand/stand 1.png new file mode 100644 index 0000000..d28c5ff Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/stand/stand 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/stand/stand 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/stand/stand 2.png new file mode 100644 index 0000000..74b2395 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/stand/stand 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/sword/sword.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/sword/sword.png new file mode 100644 index 0000000..cca0da4 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/sword/sword.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/ultimate action/ultimate action 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/ultimate action/ultimate action 0.png new file mode 100644 index 0000000..778a3e9 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/ultimate action/ultimate action 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/ultimate action/ultimate action 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/ultimate action/ultimate action 1.png new file mode 100644 index 0000000..09e828b Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/ultimate action/ultimate action 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 0.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 0.png new file mode 100644 index 0000000..3e62338 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 0.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 1.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 1.png new file mode 100644 index 0000000..35cd840 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 1.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 2.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 2.png new file mode 100644 index 0000000..21bb6b5 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 2.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 3.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 3.png new file mode 100644 index 0000000..eaa62d1 Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 3.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 4.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 4.png new file mode 100644 index 0000000..62316cc Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 4.png differ diff --git a/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 5.png b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 5.png new file mode 100644 index 0000000..b50ac5c Binary files /dev/null and b/src/imagens/game-assets/tanjiro/tanjiro-moveset/win/win 5.png differ diff --git a/src/imagens/game-assets/zenitsu/zenitsu_sprite_sheet__demon_slayer__by_xxstevegamesxx_degka16.png b/src/imagens/game-assets/zenitsu/zenitsu_sprite_sheet__demon_slayer__by_xxstevegamesxx_degka16.png new file mode 100644 index 0000000..b0608e3 Binary files /dev/null and b/src/imagens/game-assets/zenitsu/zenitsu_sprite_sheet__demon_slayer__by_xxstevegamesxx_degka16.png differ diff --git a/src/js/classes.js b/src/js/classes.js index 5aff292..e0afba2 100644 --- a/src/js/classes.js +++ b/src/js/classes.js @@ -101,7 +101,9 @@ class Character extends Sprite { direction, canAttack = true, canMove = true, - gotHit = false + gotHit = false, + clickCount = 0, + }){ super({ position, @@ -114,7 +116,7 @@ class Character extends Sprite { this.width = 80 this.height = 150 this.lastKey - this.movSpeed = 7 + this.movSpeed = speed this.jumps = 2 this.attackBox = { position: { @@ -136,6 +138,7 @@ class Character extends Sprite { this.canAttack = canAttack this.canMove = canMove this.gotHit = gotHit + this.clickCount = clickCount @@ -171,10 +174,27 @@ class Character extends Sprite { this.position.x = canvas.width - this.width } + // Defeat checker if(this.health === 0){ this.switchSprite('fall') this.canMove = false + } + + + + + + if(this.clickCount === 2){ + if(this.direction > 0){ + this.position.x += 20 + this.switchSprite('dash') + } else { + this.position.x -= 20 + } + setTimeout(() => { + this.clickCount = 0 + }, 300); } @@ -200,6 +220,11 @@ class Character extends Sprite { } switchSprite(sprite) { + //overriding all other animations with the attack animation + if (this.image === this.sprites.attack.image && this.framesCurrent < this.sprites.attack.framesMax - 1 && this.gotHit === false || this.image === this.sprites.attackInverted.image && this.framesCurrent < this.sprites.attackInverted.framesMax - 1 && this.gotHit === false ) { + return + } + if(this.image === this.sprites.fall.image && this.framesCurrent < this.sprites.fall.framesMax){ return } @@ -207,13 +232,12 @@ class Character extends Sprite { if(this.image === this.sprites.takeHit.image && this.framesCurrent < this.sprites.takeHit.framesMax - 1){ return } - //overriding all other animations with the attack animation - if (this.image === this.sprites.attack.image && this.framesCurrent < this.sprites.attack.framesMax - 1 && this.gotHit === false || this.image === this.sprites.attackInverted.image && this.framesCurrent < this.sprites.attackInverted.framesMax - 1 && this.gotHit === false ) { + + if(this.image === this.sprites.dash.image && this.framesCurrent < this.sprites.dash.framesMax - 1 && !this.isAttacking){ return } - switch(sprite) { case 'idle': if(this.image !== this.sprites.idle.image){ @@ -327,6 +351,13 @@ class Character extends Sprite { this.offset.y = this.sprites.fall.offset.y } break; + case 'dash': + this.image = this.sprites.dash.image + this.framesMax = this.sprites.dash.framesMax + this.framesCurrent = 0 + this.framesHold = this.sprites.dash.framesHold + this.scale = this.sprites.dash.scale + this.offset.y = this.sprites.dash.offset.y } } } diff --git a/src/js/game.js b/src/js/game.js index 506eee3..c0fabca 100644 --- a/src/js/game.js +++ b/src/js/game.js @@ -6,8 +6,9 @@ canvas.height = window.innerHeight context.fillRect(0,0,canvas.width,canvas.height) -const gravity = 0.35 -const jumpHeight = -12 +const gravity = resolucao==='1280x720'? 0.6: 0.35 +const jumpHeight = resolucao==='1280x720'? -14: -12 +const speed = resolucao==='1280x720'? 10: 7 const background = new SpriteScenery({ position: { @@ -114,6 +115,13 @@ const player1 = new Character({ framesHold: characterDefaultSettings[characterP1].fall.framesHold, scale: characterDefaultSettings[characterP1].fall.scale, offset: characterDefaultSettings[characterP1].fall.offset + }, + dash: { + imageSrc: `../src/imagens/game-assets/${characterP1}/${characterP1}-dash.png`, + framesMax: characterDefaultSettings[characterP1].dash.framesMax, + framesHold: characterDefaultSettings[characterP1].dash.framesHold, + scale: characterDefaultSettings[characterP1].dash.scale, + offset: characterDefaultSettings[characterP1].dash.offset } }, attackBox: { @@ -136,9 +144,6 @@ const player2 = new Character({ x: 0, y: 0 }, - // imageSrc: `../src/imagens/game-assets/${characterP2}/${characterP2}-idle.png`, - // framesMax: 8, - // scale: 3, offset: { x: 300, y: 0 @@ -213,6 +218,13 @@ const player2 = new Character({ framesHold: characterDefaultSettings[characterP2].fall.framesHold, scale: characterDefaultSettings[characterP2].fall.scale, offset: characterDefaultSettings[characterP2].fall.offset + }, + dash: { + imageSrc: `../src/imagens/game-assets/${characterP2}/${characterP2}-dash.png`, + framesMax: characterDefaultSettings[characterP2].dash.framesMax, + framesHold: characterDefaultSettings[characterP2].dash.framesHold, + scale: characterDefaultSettings[characterP2].dash.scale, + offset: characterDefaultSettings[characterP2].dash.offset } }, attackBox: { @@ -230,6 +242,9 @@ const keys = { pressed: false }, d: { + pressed: false, + }, + space: { pressed: false }, ArrowLeft: { @@ -428,36 +443,64 @@ animate() let controlSwitch = 0 window.addEventListener('keydown', (event) =>{ - //Player 1 keys switch (event.key) { case `Control`: keys.Control.pressed = true controlSwitch++ - // // } break + case `d`: + if(keys.d.pressed === false && player1.clickCount < 2) { + player1.clickCount++ + setTimeout(() => { + player1.clickCount = 0 + }, 300); + } keys.d.pressed = true player1.lastKey = `d` break + case `D`: + if(keys.d.pressed === false && player1.clickCount < 2) { + player1.clickCount++ + setTimeout(() => { + player1.clickCount = 0 + }, 300); + } keys.d.pressed = true player1.lastKey = `d` break + case `a`: + if(keys.a.pressed === false) { + player1.clickCount++ + setTimeout(() => { + player1.clickCount = 0 + }, 300); + } keys.a.pressed = true player1.lastKey = `a` break + case `A`: + if(keys.a.pressed === false) { + player1.clickCount++ + setTimeout(() => { + player1.clickCount = 0 + }, 300); + } keys.a.pressed = true player1.lastKey = `a` break + case `w`: if(player1.jumps>0 && player1.canMove){ player1.velocity.y = jumpHeight player1.jumps-- } break + case `W`: if(player1.jumps>0 && player1.canMove){ player1.velocity.y = jumpHeight @@ -465,12 +508,36 @@ window.addEventListener('keydown', (event) =>{ } break + case ` `: + if(player1.canAttack && player1.canMove && keys.space.pressed === false){ + player1.attack() + if(player1.position.x + player1.width <= player2.position.x + player2.width) { + player1.switchSprite(`attack`) + } else { + player1.switchSprite(`attack-inverted`) + } + } + keys.space.pressed = true + break + //Player 2 keys case `ArrowRight`: + if(keys.ArrowRight.pressed === false) { + player2.clickCount++ + setTimeout(() => { + player2.clickCount = 0 + }, 300); + } keys.ArrowRight.pressed = true player2.lastKey = `ArrowRight` break case `ArrowLeft`: + if(keys.ArrowLeft.pressed === false) { + player2.clickCount++ + setTimeout(() => { + player2.clickCount = 0 + }, 300); + } keys.ArrowLeft.pressed = true player2.lastKey = `ArrowLeft` break @@ -484,36 +551,6 @@ window.addEventListener('keydown', (event) =>{ }) -window.addEventListener('keyup', (event) =>{ - - switch (event.key) { - //Player 1 keys - case ` `: - if(player1.canAttack && player1.canMove){ - player1.attack() - if(player1.position.x + player1.width <= player2.position.x + player2.width) { - player1.switchSprite(`attack`) - } else { - player1.switchSprite(`attack-inverted`) - } - } - break - case 'q': - break - - //Player 2 keys - case `3`: - if(player2.canAttack && player2.canMove){ - player2.attack() - if(player1.position.x + player1.width >= player2.position.x + player2.width) { - player2.switchSprite(`attack`) - } else { - player2.switchSprite(`attack-inverted`) - } - } - break - } -}) window.addEventListener(`keyup`, (event) =>{ switch (event.key) { //Player 1 keys @@ -529,6 +566,8 @@ window.addEventListener(`keyup`, (event) =>{ case `A`: keys.a.pressed = false break + case ' ': + keys.space.pressed = false //Player 2 keys case `ArrowRight`: @@ -537,6 +576,16 @@ window.addEventListener(`keyup`, (event) =>{ case `ArrowLeft`: keys.ArrowLeft.pressed = false break + case `3`: + if(player2.canAttack && player2.canMove){ + player2.attack() + if(player1.position.x + player1.width >= player2.position.x + player2.width) { + player2.switchSprite(`attack`) + } else { + player2.switchSprite(`attack-inverted`) + } + } + break } }) \ No newline at end of file diff --git a/src/js/index.js b/src/js/index.js index f71be71..29535b1 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -1,4 +1,6 @@ function startGame(){ + const select = document.getElementById("resolucao") + localStorage.setItem('resolucao', select.options[select.selectedIndex].value) window.location.href = "html/character-select.html" } diff --git a/src/js/sprite-default-settings.js b/src/js/sprite-default-settings.js index 2209ab5..7738b78 100644 --- a/src/js/sprite-default-settings.js +++ b/src/js/sprite-default-settings.js @@ -1,8 +1,10 @@ +const resolucao = localStorage.getItem('resolucao') + const characterDefaultSettings = { tanjiro: { idle: { framesMax: 8, - framesHold: 20, + framesHold: resolucao==='1280x720'? 10: 20, scale: 3, offset: { y: 0 @@ -10,7 +12,7 @@ const characterDefaultSettings = { }, idleInverted: { framesMax: 8, - framesHold: 20, + framesHold: resolucao==='1280x720'? 10: 20, scale: 3, offset: { y: 0 @@ -18,7 +20,7 @@ const characterDefaultSettings = { }, run: { framesMax: 8, - framesHold: 10, + framesHold: resolucao==='1280x720'? 5: 10, scale: 3, offset: { y: 0 @@ -26,7 +28,7 @@ const characterDefaultSettings = { }, runInverted: { framesMax: 8, - framesHold: 10, + framesHold: resolucao==='1280x720'? 5: 10, scale: 3, offset: { y: 0 @@ -34,7 +36,7 @@ const characterDefaultSettings = { }, jump: { framesMax: 2, - framesHold: 20, + framesHold: resolucao==='1280x720'? 5: 10, scale: 3, offset: { y: 0 @@ -42,7 +44,7 @@ const characterDefaultSettings = { }, jumpInverted: { framesMax: 2, - framesHold: 20, + framesHold: resolucao==='1280x720'? 5: 10, scale: 3, offset: { y: 0 @@ -50,7 +52,7 @@ const characterDefaultSettings = { }, attack: { framesMax: 8, - framesHold: 7, + framesHold: resolucao==='1280x720'? 5: 7, scale: 3, offset: { y: 0 @@ -58,7 +60,7 @@ const characterDefaultSettings = { }, attackInverted: { framesMax: 8, - framesHold: 7, + framesHold: resolucao==='1280x720'? 5: 7, scale: 3, offset: { y: 0 @@ -66,7 +68,7 @@ const characterDefaultSettings = { }, takeHit: { framesMax: 5, - framesHold: 10, + framesHold: resolucao==='1280x720'? 5: 10, scale: 3, offset: { y: 0 @@ -74,7 +76,15 @@ const characterDefaultSettings = { }, fall: { framesMax: 10, - framesHold: 10, + framesHold: resolucao==='1280x720'? 5: 10, + scale: 3, + offset: { + y: 0 + } + }, + dash: { + framesMax: 4, + framesHold: resolucao==='1280x720'? 5: 10, scale: 3, offset: { y: 0 @@ -85,7 +95,7 @@ const characterDefaultSettings = { zenitsu: { idle: { framesMax: 8, - framesHold: 20, + framesHold: resolucao==='1280x720'? 10: 20, scale: 2.9, offset: { y: -5 @@ -93,7 +103,7 @@ const characterDefaultSettings = { }, idleInverted: { framesMax: 8, - framesHold: 20, + framesHold: resolucao==='1280x720'? 10: 20, scale: 2.9, offset: { y: -5 @@ -101,7 +111,7 @@ const characterDefaultSettings = { }, run: { framesMax: 4, - framesHold: 10, + framesHold: resolucao==='1280x720'? 10: 10, scale: 2.7, offset: { y: -20 @@ -109,7 +119,7 @@ const characterDefaultSettings = { }, runInverted: { framesMax: 4, - framesHold: 10, + framesHold: resolucao==='1280x720'? 10: 10, scale: 2.7, offset: { y: -20 @@ -133,7 +143,7 @@ const characterDefaultSettings = { }, attack: { framesMax: 8, - framesHold: 7, + framesHold: resolucao==='1280x720'? 4: 7, scale: 2.9, offset: { y: -5 @@ -141,7 +151,7 @@ const characterDefaultSettings = { }, attackInverted: { framesMax: 8, - framesHold: 7, + framesHold: resolucao==='1280x720'? 4: 7, scale: 2.9, offset: { y: -5 @@ -149,7 +159,7 @@ const characterDefaultSettings = { }, takeHit: { framesMax: 5, - framesHold: 10, + framesHold: resolucao==='1280x720'? 5: 10, scale: 2.9, offset: { y: -5 @@ -157,7 +167,15 @@ const characterDefaultSettings = { }, fall: { framesMax: 10, - framesHold: 10, + framesHold: resolucao==='1280x720'? 5: 10, + scale: 3, + offset: { + y: 0 + } + }, + dash: { + framesMax: 4, + framesHold: resolucao==='1280x720'? 5: 10, scale: 3, offset: { y: 0