Skip to content

Commit

Permalink
Co-authored-by: DamianMz <[email protected]>
Browse files Browse the repository at this point in the history
Co-authored-by: NicolasSchkurko <[email protected]>
  • Loading branch information
NahuelMarek committed Nov 29, 2024
1 parent df848f1 commit ddf0bc0
Show file tree
Hide file tree
Showing 23 changed files with 26 additions and 18 deletions.
22 changes: 11 additions & 11 deletions administradorDeJuego.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ object menuInicial{
}
}
object botonDeInicio{
var imagen="botonInicioSeleccionado.png"
var imagen="botonEternoSeleccionado.png"
method image()=imagen
method position()= new MutablePosition(x=2,y=1)
method accion(){
Expand All @@ -351,16 +351,16 @@ object botonDeInicio{
else{self.quitarMarcoDeSeleccion()}
}
method ponerMarcoDeSeleccion(){
imagen="botonInicioSeleccionado.png"
imagen="botonEternoSeleccionado.png"
}
method quitarMarcoDeSeleccion(){
imagen="botonInicio.png"
imagen="botonEterno.png"
}

}

object botonNiveles{
var imagen="botonNiveles.png"
var imagen="botonHistoria.png"
method image()=imagen
method position()= new MutablePosition(x=7,y=1)
const property niveles=[botonNivel1, botonNivel2, botonNivel3, botonNivel4, botonNivel5]
Expand All @@ -378,10 +378,10 @@ object botonNiveles{
else{self.quitarMarcoDeSeleccion()}
}
method ponerMarcoDeSeleccion(){
imagen="botonNivelesSeleccionado.png"
imagen="botonHistoriaSeleccionado.png"
}
method quitarMarcoDeSeleccion(){
imagen="botonNiveles.png"
imagen="botonHistoria.png"
}
}

Expand Down Expand Up @@ -459,13 +459,13 @@ class BotonDeNivel{
}
}

const botonNivel1 = new BotonDeNivel(imagenSinSeleccionar="botonDesmuteo.png", imagenDeSeleccion="botonDesmuteoSeleccionado.png",
const botonNivel1 = new BotonDeNivel(imagenSinSeleccionar="botonNivel1.png", imagenDeSeleccion="botonNivelSeleccionado.png",
posicion= new MutablePosition(x=5,y=4), numNivel=1,nivel=nivel1)
const botonNivel2 = new BotonDeNivel(imagenSinSeleccionar="botonDesmuteo.png", imagenDeSeleccion="botonDesmuteoSeleccionado.png",
const botonNivel2 = new BotonDeNivel(imagenSinSeleccionar="botonNivel2.png", imagenDeSeleccion="botonNive2Seleccionado.png",
posicion= new MutablePosition(x=7,y=4), numNivel=2,nivel=nivel2)
const botonNivel3 = new BotonDeNivel(imagenSinSeleccionar="botonDesmuteo.png", imagenDeSeleccion="botonDesmuteoSeleccionado.png",
const botonNivel3 = new BotonDeNivel(imagenSinSeleccionar="botonNivel3.png", imagenDeSeleccion="botonNivel3Seleccionado.png",
posicion= new MutablePosition(x=9,y=4), numNivel=3,nivel=nivel2)
const botonNivel4 = new BotonDeNivel(imagenSinSeleccionar="botonDesmuteo.png", imagenDeSeleccion="botonDesmuteoSeleccionado.png",
const botonNivel4 = new BotonDeNivel(imagenSinSeleccionar="botonNivel4.png", imagenDeSeleccion="botonNive4Seleccionado.png",
posicion= new MutablePosition(x=6,y=2), numNivel=4,nivel=nivel2)
const botonNivel5 = new BotonDeNivel(imagenSinSeleccionar="botonDesmuteo.png", imagenDeSeleccion="botonDesmuteoSeleccionado.png",
const botonNivel5 = new BotonDeNivel(imagenSinSeleccionar="botonNivelFINAL.png", imagenDeSeleccion="botonNivelFINALSeleccionado.png",
posicion= new MutablePosition(x=8,y=2), numNivel=5,nivel=nivelFinal)
22 changes: 15 additions & 7 deletions administradorDeOleadas.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import slime.*
import wollok.game.*
import administradorDeEnemigos.*
import administradorDeJuego.*

import administradorDeMagos.administradorDeMagos
import puntaje.puntaje

// ===============================
// Administrador de Oleadas: Control de las oleadas de enemigos
Expand All @@ -26,7 +27,7 @@ object administradorDeOleadas {

// Métodos de visualización y sonido
method position() = new MutablePosition(x = 9, y = 5)
method text() = "Oleada: " + numeroOleada.toString() + " " + "Slimes Restantes: " + nivelActual.enemigosRestantes().toString()
method text() = "Oleada: " + /* nivelActual.oleada().toString() */ +" Nivel: " + nivelActual.nombre().toString() + " " + "Slimes Restantes: " + nivelActual.enemigosRestantes().toString()
method textColor() = "#FA0770"
method enemigosVivos() = nivelActual.enemigosVivos()

Expand Down Expand Up @@ -61,6 +62,8 @@ object administradorDeOleadas {
administradorDeJuego.terminarJuego()
}
else{
puntaje.reset()
administradorDeMagos.reset()
nivelActual=self.nivel()
oleadaInicial.start()}
}
Expand Down Expand Up @@ -101,7 +104,12 @@ class Nivel{
var property enemigosRestantes = cantidadEnemigos
var property enemigosGenerados = 0
const property tiempoSpawn

const nombre
/* method oleada(){
if (indiceOleada+1<oleadas.size()) return indiceOleada+1
else return "oleada final"
} */
method nombre()=nombre
method enemigos()=oleadas.get(indiceOleada)
var indiceOleada=0
method oleadaActual()= oleadas.get(indiceOleada)
Expand Down Expand Up @@ -148,7 +156,7 @@ class Nivel{
method resetearCantEnemigosComoAlInicio(){}
}

object nivelFinal inherits Nivel(oleadas=[[slimeDeMedioOriente,slimeBasico,slimeBasico],[slimeBasico,slimeGuerrero,slimeGuerrero],[slimeLadron,slimeBasico]],tiempoSpawn=4000, cantidadEnemigos=2){
object nivelFinal inherits Nivel(oleadas=[[slimeDeMedioOriente,slimeBasico,slimeBasico],[slimeBasico,slimeGuerrero,slimeGuerrero],[slimeLadron,slimeBasico]],tiempoSpawn=4000, cantidadEnemigos=2,nombre="final"){
override method siguienteOleada(){
indiceOleada +=1
if (indiceOleada == oleadas.size()-1){
Expand All @@ -158,11 +166,11 @@ override method siguienteOleada(){
}
}

const nivel1 = new Nivel(oleadas=[[slimeDeMedioOriente,slimeBasico,slimeBasico],[slimeBasico,slimeGuerrero,slimeGuerrero],[slimeLadron,slimeBasico]],tiempoSpawn=4000, cantidadEnemigos=5)
const nivel2 = new Nivel(oleadas=[[slimeBasico,slimeDorado],[slimeAgil,slimeBasico,slimeBasico]],tiempoSpawn=4000, cantidadEnemigos=4)
const nivel1 = new Nivel(oleadas=[[slimeDeMedioOriente,slimeBasico,slimeBasico],[slimeBasico,slimeGuerrero,slimeGuerrero],[slimeLadron,slimeBasico]],tiempoSpawn=4000, cantidadEnemigos=5,nombre="1")
const nivel2 = new Nivel(oleadas=[[slimeBasico,slimeDorado],[slimeAgil,slimeBasico,slimeBasico]],tiempoSpawn=4000, cantidadEnemigos=4,nombre="2")

//algo asi deberia ser nivefinal
object nivelInfinito inherits Nivel(oleadas = [slimeBasico],tiempoSpawn=4000,cantidadEnemigos=3){
object nivelInfinito inherits Nivel(oleadas = [slimeBasico],tiempoSpawn=4000,cantidadEnemigos=3,nombre="infinito"){
const posiblesEnemigos = [slimeBasico, slimeGuerrero, slimeNinja, slimeBlessed,slimeLadron]
const cantidadEnemigosInicial=cantidadEnemigos
const oleadaAleatoria = [slimeBasico]
Expand Down
Binary file added assets/botonEterno.jpg
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/botonEternoSeleccionado.jpg
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/botonFINAL.jpg
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/botonFINALSeleccionado.jpg
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/botonHistoria.jpg
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/botonHistoriaSeleccionado.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/botonInicio.png
Binary file not shown.
Binary file removed assets/botonInicioSeleccionado.png
Binary file not shown.
Binary file removed assets/botonMuteo.png
Binary file not shown.
Binary file removed assets/botonMuteoSeleccionado.png
Binary file not shown.
Binary file added assets/botonNivel1.jpg
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/botonNivel1Seleccionado.jpg
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/botonNivel2.jpg
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/botonNivel2Seleccionado.jpg
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/botonNivel3.jpg
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/botonNivel3Seleccionado.jpg
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/botonNivel4.jpg
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/botonNivel4Seleccionado.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/botonNiveles.png
Binary file not shown.
Binary file removed assets/botonNivelesSeleccionado.png
Binary file not shown.
Binary file removed assets/fondo2.jpg
Binary file not shown.

0 comments on commit ddf0bc0

Please sign in to comment.