diff --git a/assets/boats.ase b/assets/boats.ase index 75652bafe3308cddaeb6f2eb373600e032d9b30b..3a7bd9290e870c419b1752fdd476858cf33decbf 100644 Binary files a/assets/boats.ase and b/assets/boats.ase differ diff --git a/src/img/boats.webp b/src/img/boats.webp index 1fe6040877aaa6e1bf278dd1b2756eec365806f8..2a2257d70d8f09614f00df7a58ed57fe98906538 100644 Binary files a/src/img/boats.webp and b/src/img/boats.webp differ diff --git a/src/js/game.js b/src/js/game.js index 75c9995a6ef9251bc534b5fb9a9ed8073db4e417..e289fe2c5779c7ccb738ff5195dcec754429a8fa 100644 --- a/src/js/game.js +++ b/src/js/game.js @@ -190,8 +190,8 @@ menuRoom.keyDown = (key) => { class Boat extends Entity { constructor(x, y, sprite, speed =1, id=randomInt(100, 10000), target={x:0,y:0}) { super(id, x, y); - this.boatbody = 0; - this.boatsail = 0; + this.boatbody = randomInt(0,2); + this.boatsail = randomInt(0,2); this.sprite = sprite; this.speed = speed; if (speed === 0) speed = 0.5; @@ -248,6 +248,8 @@ gameRoom.wavePendingStart = 0; gameRoom.boatCount = 0; gameRoom.boatSpeed = 0; +gameRoom.boatAvoid = {} + console.log(typeof(gameRoom.remove)) gameRoom.startWave = _ => { @@ -282,7 +284,7 @@ gameRoom.step = _ => { if (item.constructor.name === "Boat") numberOfBoats++; item.step(); } - if (numberOfBoats === 0 && !gameRoom.wavePendingStart) {gameRoom.wave++; gameRoom.wavePendingStart=1; setTimeout(gameRoom.startWave, 3000)}; + if (numberOfBoats === 0 && !gameRoom.wavePendingStart) {gameRoom.wave++; gameRoom.wavePendingStart=1; setTimeout(gameRoom.startWave, 3000)} if (gameRoom.wave >= 401) endRoom.wonGame(); } gameRoom.drawGUI = () => {