Skip to content

Commit

Permalink
sonido golpe
Browse files Browse the repository at this point in the history
  • Loading branch information
tobias-albornoz committed Nov 28, 2024
1 parent 546ab98 commit 2389992
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 5 additions & 2 deletions src/ataques.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ class Ataque {
const danioTotal = self.calcularEfecto(pokemonAtacante, pokemonOponente)
pokemonOponente.recibirDanio(danioTotal)

/* Aca podriamos meter visuales */
// game.say(pokemonOponente, "AUCH")
// Reproducir sonido del ataque
if(nombre != "curarse"){
const ataqueSound = game.sound("sound_golpe.mp3")
ataqueSound.play()
}

// Volver a la posicion inicial
game.schedule(300, {pokemonAtacante.volverDeAtacar()})
Expand Down
6 changes: 0 additions & 6 deletions src/masterBatalla.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,6 @@ class ControladorDeBatalla {
const pokemonJugador = self.pokemonActivoJugador()
const pokemonComputadora = self.pokemonActivoComputadora()

// Reproducir sonido del ataque
const ataqueSound = game.sound("sound_golpe.mp3")
ataqueSound.play()

if (pokemonJugador.vida() > 0 && indiceAtaque < pokemonJugador.ataques().size()) {
const ataque = pokemonJugador.ataques().get(indiceAtaque)
Expand All @@ -93,9 +90,6 @@ class ControladorDeBatalla {
const pokemonComputadora = self.pokemonActivoComputadora()
const pokemonJugador = self.pokemonActivoJugador()

// Reproducir sonido del ataque
const ataqueSound = game.sound("sound_golpe.mp3")
ataqueSound.play()

if (pokemonComputadora.vida() > 0) {
const ataque = pokemonComputadora.elegirAtaque(pokemonJugador)
Expand Down

0 comments on commit 2389992

Please sign in to comment.