Skip to content

Commit

Permalink
ahora ya no deja usar el cursor ni menu de
Browse files Browse the repository at this point in the history
seleccion de magos durante la pausa
  • Loading branch information
NahuelMarek committed Nov 18, 2024
1 parent 322be13 commit dc5d21d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 14 deletions.
9 changes: 5 additions & 4 deletions administradorDeJuego.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ object administradorDeJuego {
} else {
configuracion.iniciarTicks()
game.removeVisual(pantalla)


pausado = false
return pausado
}
Expand Down Expand Up @@ -169,16 +171,15 @@ object configuracion {
game.addVisual(puntaje)
game.addVisual(administradorDeOleadas)
game.addVisual(casa)

menu.accion()
cursor.accion()

/* menu.accion()
cursor.accion() */
menu.iniciarTienda()
//administradorDeJuego.pausar()

menu.accion()
cursor.accion()



// Tecla "P" para reiniciar el juego
keyboard.p().onPressDo({
Expand Down
10 changes: 5 additions & 5 deletions cursor.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// ===============================

import wollok.game.*

import administradorDeJuego.administradorDeJuego
// ===============================
// Cursor: Controlador de movimiento
// ===============================
Expand All @@ -19,10 +19,10 @@ object cursor {

// Acciones del teclado
method accion() {
keyboard.right().onPressDo({ self.moverseDerecha() })
keyboard.left().onPressDo({ self.moverseIzquierda() })
keyboard.up().onPressDo({ self.moverseArriba() })
keyboard.down().onPressDo({ self.moverseAbajo() })
keyboard.right().onPressDo({ if(!administradorDeJuego.pausado()){self.moverseDerecha()} })
keyboard.left().onPressDo({ if(!administradorDeJuego.pausado()){self.moverseIzquierda()} })
keyboard.up().onPressDo({ if(!administradorDeJuego.pausado()){self.moverseArriba() }})
keyboard.down().onPressDo({ if(!administradorDeJuego.pausado()){self.moverseAbajo()} })
}

// Métodos de movimiento
Expand Down
4 changes: 2 additions & 2 deletions main.wpgm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import wollok.game.*
import administradorDeJuego.*

import menu.*

program juego {

Expand All @@ -16,7 +16,7 @@ program juego {
//

game.removeVisual(pantalla)

configuracion.agregarVisuals()
configuracion.crearTicks()
configuracion.iniciarMusica()
Expand Down
6 changes: 3 additions & 3 deletions menu.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ object menu {

// Acción del menú: Configura las teclas
method accion() {
keyboard.d().onPressDo({ self.moverseDerecha() })
keyboard.a().onPressDo({ self.moverseIzquierda() })
keyboard.enter().onPressDo({ self.seleccionarMenu() })
keyboard.d().onPressDo({ if(!administradorDeJuego.pausado()){self.moverseDerecha() }})
keyboard.a().onPressDo({ if(!administradorDeJuego.pausado()){self.moverseIzquierda()} })
keyboard.enter().onPressDo({ if(!administradorDeJuego.pausado()){self.seleccionarMenu()}})
// cambiar aca para cambiar forma de generar enemigos
}

Expand Down

0 comments on commit dc5d21d

Please sign in to comment.