Mostrar logo al perder/ganar

This commit is contained in:
Nulo 2021-07-06 20:19:47 +00:00
parent b57b39b7c8
commit 7b252e5861
1 changed files with 7 additions and 2 deletions

View File

@ -109,8 +109,8 @@ function shareButton(juego: Juego<State>): {
const height = sprite.getHeight(juego);
return {
box: {
x: juego.canvas.width / 2 - width / 2,
y: juego.canvas.height * 0.9 - height,
x: juego.canvas.width - width - 5,
y: juego.canvas.height * 0.85 - height,
width,
height,
},
@ -477,6 +477,11 @@ export function draw(juego: Juego<State>, timestamp: number) {
}
if (juego.state.has) {
juego.sprites.logoFPGFDTBlanco.draw(
juego,
0,
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(