Mostrar logo al perder/ganar

This commit is contained in:
Nulo 2021-07-06 20:19:47 +00:00
parent b57b39b7c8
commit 7b252e5861

View file

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