Skip to content

Commit

Permalink
Agregado sonido de hit botella
Browse files Browse the repository at this point in the history
  • Loading branch information
jdesimone03 committed Nov 15, 2024
1 parent ebe0ed5 commit 6e4317f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Binary file added assets/hit_botella.mp3
Binary file not shown.
2 changes: 2 additions & 0 deletions eventos.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ object eventos {
if (enemigos == []) pantallas.youwin()
}
else if (elemento.soyProyectil()){
elemento.golpe()
elemento.destruir()
game.removeVisual(proyectil)
game.removeVisual(elemento)
Expand Down Expand Up @@ -119,6 +120,7 @@ object eventos {
}
}
else if (elemento.soyProyectil()) {
elemento.golpe()
game.removeVisual(proyectiles.get(0))
game.removeVisual(elemento)
elemento.destruir()
Expand Down
6 changes: 4 additions & 2 deletions proyectil.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ class Proyectil inherits Entidad {
var i_rotacion = 0
const sonido = game.sound("lanzar.mp3")

override method hitSound() = game.sound("hit_botella.mp3")

method reproducir() {
sonido.play()
game.schedule(500, { sonido.stop() })
Expand All @@ -22,7 +24,7 @@ class Proyectil inherits Entidad {
}

method lanzar() {
self.position(self.position().up(4))
self.position(self.position().up(2))
}

method image() = imagen
Expand All @@ -41,6 +43,6 @@ class Proyectil inherits Entidad {

class ProyectilEnemigo inherits Proyectil {
override method lanzar() {
self.position(self.position().down(4))
self.position(self.position().down(2))
}
}

0 comments on commit 6e4317f

Please sign in to comment.