diff --git a/client/public/css/main.css b/client/public/css/main.css index fedccf3b05b1d617496f7ff56564185ee563d5a0..945b210c0f7c2d6d24eeda24dfee78ce95640658 100644 --- a/client/public/css/main.css +++ b/client/public/css/main.css @@ -29,6 +29,28 @@ h1 em { color: #777; } +h3 { + font-family: 'New Super Mario Font U', sans-serif; + color: #1341d6; + font-size: 50px; +} +h3 em { + font-style: normal; + font-weight: bold; + color: #777; +} + +h4 { + font-family: 'New Super Mario Font U', sans-serif; + color: #1341d6; + font-size: 25px; +} +h4 em { + font-style: normal; + font-weight: bold; + color: #777; +} + canvas { background-color: #000000; border: 3px dashed #777; diff --git a/client/public/res/scoreboard.json b/client/public/res/scoreboard.json index 6939e19fac08019ccab38e10c3214a00d752bf43..fa41906ceb6eb4bd0456a6483f639d4bac29ff7f 100644 --- a/client/public/res/scoreboard.json +++ b/client/public/res/scoreboard.json @@ -142,6 +142,18 @@ }, { "score": -15 + }, + { + "nom": "rayane", + "score": 0 + }, + { + "nom": "raayne*", + "score": -15 + }, + { + "nom": "rayane", + "score": -15 } ] } \ No newline at end of file diff --git a/client/src/setHtml.js b/client/src/setHtml.js index 7f7378ffebdac8831d5494945b9f13add71d58da..d2678b63fe50de081691b9a6f65c0eb6638f208b 100644 --- a/client/src/setHtml.js +++ b/client/src/setHtml.js @@ -1,16 +1,17 @@ export default class setHtml { static credits() { return ` - <p>Julien Bouin 33%</p> - <p> Pseudo : Jogz </p> - <p> jeu préféré : Rocket League </p> - <p>Rayane Belguebli 33%</p> - <p> Pseudo : Rayanou </p> - <p> jeu préféré : Fifa </p> - <p>Mathis Decoster 33%</p> - <p>pseudo: Wakly</p> - <p>jeu préféré : Teamfight Tactics</p> - <p>Groupe H</p> + <h3>Groupe H</h3> + <h4> + <br> + <p>- Julien Bouin 33% / Pseudo : Jogz / jeu préféré : Rocket League </p> + <br> + <p>- Rayane Belguebli 33% / Pseudo : Rayanou / jeu préféré : Fifa </p> + <br> + <p>- Mathis Decoster 33% / pseudo: Wakly / jeu préféré : Teamfight Tactics</p> + <br> + + </h4> <button class="retourMenu">Retour au menu</button>`; } diff --git a/server/Projectile.js b/server/Projectile.js index 65e471787631389faddd6aa31f25d87210fa1ddd..07be4893a4569aa5eb6c78200186cc45e440f27a 100644 --- a/server/Projectile.js +++ b/server/Projectile.js @@ -6,7 +6,7 @@ export class Projectile extends Entite { vitesse; constructor(x, y, image) { - super(x, y, new Hitbox(122, 68, x, y), image); + super(x, y, new Hitbox(122 / 2, 68, x, y), image); this.vitesse = 10; } diff --git a/server/ScoreBoard.js b/server/ScoreBoard.js index 6c8bdf4a500124eb931b12abbc33072da5f40280..98fa4b20c98f0b3eb81886edeea095d2653ef63e 100644 --- a/server/ScoreBoard.js +++ b/server/ScoreBoard.js @@ -13,12 +13,12 @@ export class GestionScore { scores.results.sort((a, b) => b.score - a.score); let html = - '<table><thead><tr><th>Nom</th><th>Score</th></tr></thead><tbody>'; + '<table><thead><tr><th><h4>Nom</h4></th><th><h4>Score</h4></th></tr></thead><tbody>'; const numberOfResults = Math.min(10, scores.results.length); for (let i = 0; i < numberOfResults; i++) { const result = scores.results[i]; - html += `<tr><td>${result.nom}</td><td>${result.score}</td></tr>`; + html += `<tr><td><h4>${result.nom}</h4></td><td><h4>${result.score}</h4></td></tr>`; } html += '</tbody></table>'; diff --git a/server/enemis.js b/server/enemis.js index cc61a3feca458569a907ed4e71db8fcd2c613595..adf43858fff648c706d10897f5344daca3ecb6f4 100644 --- a/server/enemis.js +++ b/server/enemis.js @@ -10,11 +10,11 @@ export default class enemi extends Entite { difficulté; constructor(x, y, image, difficulté) { - super(x, y, new Hitbox(50 / 2, 66, x, y), image); + super(x, y, new Hitbox(50 / 3, 66 / 2, x, y), image); if (difficulté == 1) { this.vx = 3; this.vy = 0; - this.hitbox = new Hitbox(69 / 2, 57, this.x, this.y); + this.hitbox = new Hitbox(69 / 3, 57 / 2, this.x, this.y); } else if (difficulté == 2) { this.vx = 5; this.vy = 1; @@ -29,15 +29,6 @@ export default class enemi extends Entite { this.positionInitialeY = y; } - colision(x, y, image) { - return ( - x >= this.x && - x <= this.x + image.width && - y >= this.y && - y <= this.y + image.height - ); - } - getVies() { return this.vies; } diff --git a/server/index.js b/server/index.js index 672f8e0e39359ceb3cff91d4f32f44bc0611d746..24fdba5404aba2a8f19fd5cf5a038b5acf20fa15 100644 --- a/server/index.js +++ b/server/index.js @@ -308,7 +308,7 @@ function handleAvatarProjectileCollisions(avatar) { canLostLifeEnemi = false; setTimeout(function () { canLostLifeEnemi = true; - }, 1000 / 60); + }, 100); } } });