diff --git a/assets/map/portal.gif b/assets/map/portal.gif new file mode 100644 index 0000000..9c55240 Binary files /dev/null and b/assets/map/portal.gif differ diff --git a/script.js b/script.js index 2419f50..3cdbd56 100644 --- a/script.js +++ b/script.js @@ -89,6 +89,9 @@ imgGrass.title = "It is just grass.." const imgIce = new Image(); imgIce.src = './assets/map/ice.jpg' imgIce.title = "Ice is a slippery slope.. You can not turn on it !" +const imgPortal = new Image(); +imgPortal.src = './assets/map/portal.gif' +imgPortal.title = "This portal can transport you into the next portal." // Get wall texture const imgWall = new Image(); @@ -143,6 +146,7 @@ function showRulesScreen() { // Display map texture mapList.appendChild(imgGrass) mapList.appendChild(imgIce); + mapList.appendChild(imgPortal); } @@ -358,8 +362,7 @@ async function startGame(gameID) { break; case TELEPORTATION: - ctx.fillStyle = "gray"; - ctx.fillRect(x*cell_width, y*cell_height, cell_width, cell_height) + ctx.drawImage(imgPortal, x*cell_width, y*cell_height, cell_width, cell_height); break; case ICE: