Mostrar baldosa al perder

This commit is contained in:
Nulo 2021-07-06 18:12:35 +00:00
parent 72575b44c6
commit 3966d2e36d
3 changed files with 6 additions and 1 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 819 B

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

@ -484,6 +484,11 @@ export function draw(juego: Juego<State>, timestamp: number) {
juego.canvas.width / 2 - width / 2,
juego.canvas.height * 0.1
);
juego.sprites.baldosa.draw(
juego,
juego.canvas.width - juego.sprites.baldosa.getWidth(juego) - 30,
juego.canvas.height - juego.sprites.baldosa.getHeight(juego) - 30
);
} else if (juego.state.has === "won") {
const width = juego.sprites.placaFelicitaciones.getWidth(juego);
juego.sprites.placaFelicitaciones.draw(

View File

@ -178,7 +178,7 @@ async function initJuego() {
height: (juego) => juego.canvas.height * 0.8,
}),
baldosa: loadSprite(assets.baldosa, {
height: (juego) => juego.canvas.height * 0.8,
height: (juego) => juego.canvas.height * 0.2,
}),
larreta: loadSprite(
assets.larreta,