Skip to content

Commit

Permalink
ya funciona con ambos administradores el boton
Browse files Browse the repository at this point in the history
de reinicio
  • Loading branch information
NahuelMarek committed Nov 19, 2024
1 parent e52aa2e commit 412f2c6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions administradorDeJuego.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class MyException inherits wollok.lang.Exception {}
object administradorDeJuego {
var property pausado = false
var property usuarioEnMenu = true

var property administradorUtilizado = administradorDeOleadas


// Método para finalizar el juego y resetear el estado
Expand All @@ -39,7 +39,7 @@ object administradorDeJuego {
administradorDeEnemigos.reset()
administradorDeMagos.reset()
administradorDeProyectiles.reset()
administradorDeOleadas.reset()
administradorUtilizado.reset()
casa.reset()
puntaje.reset()
//pantalla.reproducirSonido()
Expand Down Expand Up @@ -293,6 +293,7 @@ object botonDeInicio{
configuracion.agregarVisuals()
configuracion.iniciarTicks()
administradorDeEnemigos.administradorUtilizado(administradorDeOleadas)
administradorDeJuego.administradorUtilizado(administradorDeOleadas)
game.schedule(4000, { administradorDeOleadas.iniciarOleada() })
game.addVisual(administradorDeOleadas)
menuInicial.finalizarMenu()
Expand Down Expand Up @@ -393,6 +394,7 @@ class BotonDeNivel{
configuracion.crearTicks()
administradorDeNiveles.numNivel(numNivel)
administradorDeEnemigos.administradorUtilizado(administradorDeNiveles)
administradorDeJuego.administradorUtilizado(administradorDeNiveles)
game.schedule(4000, { administradorDeNiveles.iniciarOleada() })
game.addVisual(administradorDeNiveles)
menuInicial.finalizarMenu()
Expand Down
3 changes: 2 additions & 1 deletion administradorDeNiveles.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ object administradorDeNiveles {
// Resetea el administrador de oleadas
method reset() {
game.removeTickEvent("gestionar oleada")
niveles.forEach({nivelAResetear=>nivelAResetear.reset()})
niveles.forEach({nivelAResetear=>nivelAResetear.nivel().reset()})
numNivel = 1
game.schedule(4000, { self.iniciarOleada() })
}
method recibeDanioMago(danio){}
method frenarEnemigo()= true
Expand Down
1 change: 1 addition & 0 deletions administradorDeOleadas.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ object administradorDeOleadas {
oleadaFinal.reset()
numeroOleada = 1
oleadaActual = oleadaNormal
game.schedule(4000, { self.iniciarOleada() })
}
method recibeDanioMago(danio){}
method frenarEnemigo()= true
Expand Down

0 comments on commit 412f2c6

Please sign in to comment.