Skip to content

Commit

Permalink
cambiando bola de fuego / agregando que no se pueda crear un mago sob…
Browse files Browse the repository at this point in the history
…re otro
  • Loading branch information
NicolasSchkurko committed Oct 11, 2024
1 parent 7abdbf0 commit b4a487b
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
Binary file removed assets/bolaDeFuego.png
Binary file not shown.
Binary file added assets/bolaDeFuego2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions main.wpgm
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ program cursorGame {

game.start()

game.onTick(1000, "aumentar dinerro", {puntaje.sumarPuntos()})
game.onTick(500, "aumentar dinerro", {puntaje.sumarPuntos()})
game.onTick(3000, "disparar", {generadorDeMagos.disparar()})
game.onTick(1500, "moverDisparos", {administradorDeProyectiles.moverProyectiles()})
game.onTick(250, "impactarDisparos", {administradorDeProyectiles.impactarProyectiles()})

//game.schedule(6000,{generadorDeMagos.disparar()}) esto estaba para probar los tiros perforantes
/*
const musica = game.sound("musica.mp3")
musica.shouldLoop(true)
musica.shouldLoop(trued)
game.schedule(100,{musica.play()})
musica.volume(0.4) */
}
Expand Down
3 changes: 2 additions & 1 deletion menu.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ object menu {

method generarMago2() {
const magoAGenerar = game.colliders(self) // no usamos uniqueColliders porque tira error si no hay ninguna
if (!magoAGenerar.isEmpty()){ // estaba tirando un error de que estaba aplicando un metodo a una lista vacia
const hayMago = game.colliders(cursor).filter{objeto => objeto.queSoy() == "mago"}
if (!magoAGenerar.isEmpty() && hayMago.isEmpty()){ // estaba tirando un error de que estaba aplicando un metodo a una lista vacia
const magoSeleccionado = magoAGenerar.first()
const posicion = game.at(cursor.position().x(), cursor.position().y())
generadorDeMagos.generarMago2(magoSeleccionado, posicion)
Expand Down
4 changes: 2 additions & 2 deletions proyectil.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class Proyectil {
method position() = position
const danio = tipo.danio()
const imagen = tipo.imagen()
method image() = "bolaDeFuego.png"
method image() = "bolaDeFuego2.png"
method mover(){
position.goRight(1)
if (position.x() >= 12){
Expand Down Expand Up @@ -39,7 +39,7 @@ class Proyectil {
}

object proyectilNormal{
const imagen = "bolaDeFuego.png"
const imagen = "bolaDeFuego2.png"
method imagen() {return imagen}
const danio = 50
method danio() = danio
Expand Down

0 comments on commit b4a487b

Please sign in to comment.