Skip to content

Commit

Permalink
Correccion planteo if de seleccionar mago
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasSchkurko committed Dec 14, 2024
1 parent 353ff4f commit 2756103
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions menu.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,11 @@ object menu {
const objetoCelda = game.colliders(cursor)
const posicionCelda = new MutablePosition(x = cursor.position().x(), y = cursor.position().y())

if (!magoAGenerar.isEmpty() && objetoCelda.all({ objeto => objeto.sePuedeSuperponer() }) && !self.seleccionandoPala()) {
self.generarMago(magoAGenerar.first(), posicionCelda)

}
else if (self.seleccionandoPala()) {

if (self.seleccionandoPala()) {
self.eliminarMago( objetoCelda.find({ objeto => not objeto.sePuedeSuperponer() }))
}else if (objetoCelda.all({ objeto => objeto.sePuedeSuperponer() })) {
self.generarMago(magoAGenerar.first(), posicionCelda)
}
}

Expand Down

0 comments on commit 2756103

Please sign in to comment.