Skip to content

Commit

Permalink
prueba fondo
Browse files Browse the repository at this point in the history
  • Loading branch information
biancapicchio committed Sep 23, 2023
1 parent c3565ed commit a435a51
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 22 deletions.
Binary file modified assets/background2.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 src/juego.wpgm
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import objetosUtiles.*
program juego {
game.title("Harry Potter: Escape de Azkaban")
game.cellSize(50)
game.width(36)
game.width(30)
game.height(18)
game.boardGround("Fondo 2.png")
game.boardGround("background2.png")

game.addVisual(oculto)
game.addVisual(harry)
Expand Down
37 changes: 17 additions & 20 deletions src/personajes.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,16 @@ object harry {
// objeto = objetoUtil
// }
// }

method usarObjeto() {
const colisiones = objetosUsables.losQuePertenecen(game.colliders(self))
self.validarUso(colisiones)
colisiones.head().serUsado(self)
self.validarUso(colisiones)
colisiones.head().serUsado(self)
}
method validarUso(objetos){
if (objetos.isEmpty()){
self.error( "No tengo nada para usar")
}

method validarUso(objetos) {
if (objetos.isEmpty()) {
self.error("No tengo nada para usar")
}
}

method sePuedeMover(direccion) {
Expand All @@ -49,11 +48,10 @@ object harry {
self.position(proxima)
}
}

method colisionasteConHarry() {

}

method colision(objeto) {
objeto.colisionasteConHarry(self)
}
Expand Down Expand Up @@ -117,19 +115,18 @@ object sirius {
// self.validarEquipar(objetoUtil)
// objeto = objetoUtil
// }

method usarObjeto() {
const colisiones = objetosUsables.losQuePertenecen(game.colliders(self))
self.validarUso(colisiones)
colisiones.head().serUsado(self)
self.validarUso(colisiones)
colisiones.head().serUsado(self)
}
method validarUso(objetos){
if (objetos.isEmpty()){
self.error( "No tengo nada para usar")
}

method validarUso(objetos) {
if (objetos.isEmpty()) {
self.error("No tengo nada para usar")
}
}

method puedeOcupar(posicion) {
return tablero.pertenece(posicion)
}
Expand Down

0 comments on commit a435a51

Please sign in to comment.