Skip to content

Commit

Permalink
arreglo bug al terminar nivel final
Browse files Browse the repository at this point in the history
  • Loading branch information
MNVallone committed Nov 30, 2024
1 parent d9e97ca commit 09c153e
Show file tree
Hide file tree
Showing 15 changed files with 15 additions and 9 deletions.
12 changes: 6 additions & 6 deletions administradorDeJuego.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ object derrota {
}
object victoria {
method position() = new MutablePosition(x = 0, y = 0)
method imagen() = "Victoria2.png"
method imagen() = "victoria.jpg"
method sonido() = game.sound("m.deathScreen.mp3")
}
object portada {
Expand Down Expand Up @@ -377,23 +377,22 @@ object botonNiveles{
}

object botonMutearMusica{
var imagen="botonMuteo.png"
var imagen="botonMuteo.png"
method image()=imagen
method position()= new MutablePosition(x=13,y=1)
var muteada=true
method accion(){
if (muteada){
configuracion.iniciarMusica()
imagen="botonDesmuteoSeleccionado.png"
muteada = false
muteada=false
}
else {
configuracion.detenerMusica()
imagen="botonMuteo.png"
imagen="botonMuteoSeleccionado.png"
muteada=true
}
}

method cambiarEstadoDeSeleccion(estado){
if(estado){
self.ponerMarcoDeSeleccion()
Expand All @@ -414,6 +413,7 @@ object botonMutearMusica{

}


}

class BotonDeNivel{
Expand Down Expand Up @@ -458,5 +458,5 @@ const botonNivel3 = new BotonDeNivel(imagenSinSeleccionar="botonNivel3.png", ima
posicion= new MutablePosition(x=9,y=4), numNivel=3,nivel=nivel3)
const botonNivel4 = new BotonDeNivel(imagenSinSeleccionar="botonNivel4.png", imagenDeSeleccion="botonNivel4Seleccionado.png",
posicion= new MutablePosition(x=6,y=2), numNivel=4,nivel=nivel4)
const botonNivel5 = new BotonDeNivel(imagenSinSeleccionar="botonFINAL.png", imagenDeSeleccion="botonFINALSeleccionado.png",
const botonNivel5 = new BotonDeNivel(imagenSinSeleccionar="botonNivel4.png", imagenDeSeleccion="botonNivel4Seleccionado.png",
posicion= new MutablePosition(x=8,y=2), numNivel=5,nivel=nivelFinal)
12 changes: 9 additions & 3 deletions administradorDeOleadas.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,16 @@ object administradorDeOleadas {
oleadaInicial.start()
}
else{
nivelActual.reset()

numNivel+=1
if(numNivel>niveles.size()){
numNivel = 1
pantalla.nuevoEstado(victoria)
administradorDeJuego.terminarJuego()
}
else{
nivelActual.reset()

pantalla.nuevoEstado(finDeNivel)
game.addVisual(pantalla)
game.schedule(2500, {
Expand Down Expand Up @@ -128,7 +131,7 @@ class Nivel{
method inicioOleada() = game.sound("m.iOleada.mp3")
method finOleada() = game.sound("m.fOleada.mp3")
// Verifica si la oleada final está en ejecución
method ejecutando() = cantidadEnemigos > enemigosGenerados && enemigosRestantes > 0
method ejecutando() = cantidadEnemigos >= enemigosGenerados && enemigosRestantes > 0

method seGeneroEnemigo() {enemigosGenerados+=1}

Expand Down Expand Up @@ -179,7 +182,10 @@ override method siguienteOleada(){
}
self.reset()
}

override method reset() {
super()
cantidadEnemigos = 10
}

}

Expand Down
Binary file added assets/botonInicio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/botonInicioSeleccionado.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/botonMuteo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/botonNiveles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/botonNivelesSeleccionado.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s.slimeAgil.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s.slimeBase.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s.slimeBlessed.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s.slimeDorado.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s.slimeGuerrero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s.slimeLadron.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s.slimeMedioOriente.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/s.slimeNinja.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 09c153e

Please sign in to comment.