diff --git a/server/enemis.js b/server/enemis.js index 655ef098dfcdcb7a7203a75015c1994b3d5e4022..0d87d1e260f7a1fad2462e4f48a30d74f5906371 100644 --- a/server/enemis.js +++ b/server/enemis.js @@ -12,11 +12,14 @@ export default class enemi extends Entite { constructor(x, y, image, difficulté) { super(x, y, new Hitbox(50 / 2, 66, x, y), image); if (difficulté == 1) { + this.vx = 3; + this.vy = 0; this.hitbox = new Hitbox(69 / 2, 57, this.x, this.y); + } else if (difficulté == 2) { + this.vx = 5; + this.vy = 1; } this.difficulté = difficulté; - this.vx = 3; - this.vy = 0; this.vies = 2; this.amplitude = 20; this.direction = 1; @@ -48,14 +51,6 @@ export default class enemi extends Entite { return this.vy; } - setVx(vx) { - this.vx = vx; - } - - setVy(vy) { - this.vy = vy; - } - deplacer() { this.x -= this.vx; this.hitbox.x = this.x; diff --git a/client/src/enemis.test.js b/server/enemis.test.js similarity index 100% rename from client/src/enemis.test.js rename to server/enemis.test.js