diff --git a/src/img/island.webp b/src/img/island.webp new file mode 100644 index 0000000000000000000000000000000000000000..5f54c45c02ef64355f75ec4b117de7f11d9579a7 Binary files /dev/null and b/src/img/island.webp differ diff --git a/src/js/game.js b/src/js/game.js index e9f400d72cdc1ffdd8daf4907cd49d601fce289a..855f6c70cc9039e46025e063a51159c951e97558 100644 --- a/src/js/game.js +++ b/src/js/game.js @@ -14,7 +14,7 @@ let assets = { images: { splash: "splash1.webp", font: "hampsterfont.webp", - catapult: "catapult.webp", + island: "island.webp", debug_ball: "ball.webp", }, } @@ -177,11 +177,13 @@ menuRoom.keyDown = (key) => { if (menuRoom.index < 0) menuRoom.index = menuRoom.options.length-1; } +const gameRoom = new Room("game"); +gameRoom.background = "#305182" +gameRoom.draw = () => { + canvas.drawImage(assets.images.island, (canvas.width/2 - assets.images.island.width/2)-canvas.cX, (canvas.height/2 - assets.images.island.height/2)-canvas.cY); +} - -rooms.push(loadingRoom); -rooms.push(menuRoom); -rooms.push(debugRoom); +rooms.push(loadingRoom, menuRoom, debugRoom, gameRoom); currentRoom = rooms[roomIndex];