Skip to content

Commit

Permalink
ahora el nivel infinito vuelve a su cantidad
Browse files Browse the repository at this point in the history
original cuando se hace un reseteo del juego
  • Loading branch information
NahuelMarek committed Nov 29, 2024
1 parent b8ebdf8 commit 4141832
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion administradorDeJuego.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ object fondo{


}

method frenarEnemigo() = false
}

// =======================================
Expand Down
7 changes: 6 additions & 1 deletion administradorDeOleadas.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ object administradorDeOleadas {
oleadaInicial.interval(4000)
tickParaGenerarEnemigos.stop()
nivelActual.reset()
nivelActual.resetearCantEnemigosComoAlInicio()
niveles.forEach({botonNivel=>botonNivel.nivel().resetearOleadas()})
numeroOleada = 1
numNivel=1
Expand Down Expand Up @@ -144,7 +145,7 @@ class Nivel{
enemigosGenerados = 0
enemigosRestantes = cantidadEnemigos
}

method resetearCantEnemigosComoAlInicio(){}
}

object nivelFinal inherits Nivel(oleadas=[[slimeDeMedioOriente,slimeBasico,slimeBasico],[slimeBasico,slimeGuerrero,slimeGuerrero],[slimeLadron,slimeBasico]],tiempoSpawn=4000, cantidadEnemigos=2){
Expand All @@ -163,6 +164,7 @@ const nivel2 = new Nivel(oleadas=[[slimeBasico,slimeDorado],[slimeAgil,slimeBasi
//algo asi deberia ser nivefinal
object nivelInfinito inherits Nivel(oleadas = [slimeBasico],tiempoSpawn=4000,cantidadEnemigos=3){
const posiblesEnemigos = [slimeBasico, slimeGuerrero, slimeNinja, slimeBlessed,slimeLadron]
const cantidadEnemigosInicial=cantidadEnemigos
const oleadaAleatoria = [slimeBasico]
method cambiarEnemigosOleada(){
oleadaAleatoria.clear()
Expand All @@ -175,6 +177,9 @@ object nivelInfinito inherits Nivel(oleadas = [slimeBasico],tiempoSpawn=4000,can
override method enemigos()=oleadaAleatoria
override method oleadaActual()= oleadaAleatoria
override method noTerminoNivel()=true
override method resetearCantEnemigosComoAlInicio(){
cantidadEnemigos=cantidadEnemigosInicial
}
}
//algo asi deberia ser nive Infinito
// nivel = new Nivel(enemigos=[[basico, basico, gerrero], [guerrero, ladron]])

0 comments on commit 4141832

Please sign in to comment.