Skip to content

Commit

Permalink
ahora funciona bien cambiar entre modo de niveles
Browse files Browse the repository at this point in the history
y modo aleatorio en el menu
  • Loading branch information
NahuelMarek committed Nov 27, 2024
1 parent 4711c5a commit 14522c7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions administradorDeJuego.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ object botonDeInicio{
administradorDeEnemigos.administradorUtilizado(administradorDeOleadas)
administradorDeJuego.administradorUtilizado(administradorDeOleadas)
administradorDeOleadas.modoNiveles(false)
administradorDeOleadas.actualizarOleada()
game.schedule(4000, { administradorDeOleadas.iniciarOleada() })
game.addVisual(administradorDeOleadas)
menuInicial.finalizarMenu()
Expand Down
6 changes: 3 additions & 3 deletions administradorDeOleadas.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ object administradorDeOleadas {
const niveles = botonNiveles.niveles()
var property numNivel = 1
method nivel() = niveles.get(numNivel-1).nivel()
method actualizarOleada(){oleadaActual= self.nivel().oleadaActual()}
method actualizarOleada(){if(modoNiveles) oleadaActual= self.nivel().oleadaActual()
else oleadaActual=oleadaNormal}
// Métodos de visualización y sonido
method position() = new MutablePosition(x = 9, y = 5)
method text() = "Oleada: " + numeroOleada.toString() + " " + "Slimes Restantes: " + oleadaActual.enemigosRestantes().toString()
Expand Down Expand Up @@ -94,8 +95,7 @@ object administradorDeOleadas {
niveles.forEach({botonNivel=>botonNivel.nivel().resetearOleadas()})
numeroOleada = 1
numNivel=1
oleadaActual = oleadaNormal
if(modoNiveles){self.actualizarOleada()}
self.actualizarOleada()
self.frenarTickInicial()
oleadaInicial.interval(4000)
tickParaGenerarEnemigos.stop()
Expand Down

0 comments on commit 14522c7

Please sign in to comment.