Mostrar baldosa al perder

This commit is contained in:
Nulo 2021-07-06 20:26:34 +00:00
parent 48016f397c
commit 1c66167ce0
1 changed files with 2 additions and 7 deletions

View File

@ -483,16 +483,11 @@ export function draw(juego: Juego<State>, timestamp: number) {
juego.canvas.height - juego.sprites.logoFPGFDTBlanco.getHeight(juego) - 10
);
if (juego.state.has === "lost") {
const width = juego.sprites.placaPerdiste.getWidth(juego);
juego.sprites.placaPerdiste.draw(
juego,
juego.canvas.width / 2 - width / 2,
juego.canvas.height * 0.1
);
juego.sprites.placaPerdiste.draw(juego, 10, 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
juego.canvas.height * 0.3
);
} else if (juego.state.has === "won") {
const width = juego.sprites.placaFelicitaciones.getWidth(juego);