Skip to content

Commit

Permalink
agregue muchas imagenes
Browse files Browse the repository at this point in the history
  • Loading branch information
MateoGiuffra committed Nov 22, 2023
1 parent 92d1a7c commit 473685a
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 24 deletions.
Binary file modified assets/fondoB.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fondoMenu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/fondoReglas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/harryCongelado.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/puertaAbierto.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/puertaCerrado.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/siriusCongelado.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/nivelx.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ object menu inherits Nivel{
}

object reglas inherits Nivel{
override method image() = "background.png"
override method image() = "fondoReglas.png"

override method terminar(){
game.clear()
Expand Down
1 change: 1 addition & 0 deletions src/objetosUtiles.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ class Varita inherits Objeto{
}

object llave inherits Varita{

override method image() = "llave.png"
override method esLlave() = true
override method esVarita() = false
Expand Down
40 changes: 17 additions & 23 deletions src/personajes.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ class Personaje {
const property llavesRotas = #{}
var property tieneVarita = false
var property nivel = nivelM
var property objAnterior = nada
var property puedeAgarrarVarita = false
var property ultimoObjGuardado = nada
var property objetoActual = nada

method transformacion()

Expand All @@ -24,17 +22,17 @@ class Personaje {

method entrarEnZonaGuardias()

method image() = "" + estado + "Con" + self.ultimoObjGuardado() + "" + ".png"
method image() = "" + estado + "Con" + self.objetoActual() + "" + ".png"

method colisionarCon(personaje) {
}

method tieneLlave() = ultimoObjGuardado.esLlave() // o objeto == llave
method tieneVarita() = ultimoObjGuardado.esVarita()
method tieneNada() = ultimoObjGuardado.esNada()
method tieneLlave() = objetoActual.esLlave()
method tieneVarita() = objetoActual.esVarita()
method tieneNada() = objetoActual.esNada()

method guardar(objeto){
ultimoObjGuardado = objeto
objetoActual = objeto
}


Expand All @@ -58,15 +56,17 @@ class Personaje {
}

method soltar(){

if (not self.tieneNada()){
ultimoObjGuardado.generar(position)
ultimoObjGuardado = nada
objetoActual.generar(position)
objetoActual = nada
}
}



method usarHechizo(){
self.validarHechizo()
nivel.hechizoNivel(self)
}

method validarAbrir(objetos) {
if (objetos.isEmpty()) {
self.error("No tengo nada para abrir")
Expand All @@ -80,10 +80,7 @@ class Personaje {
}


method usarHechizo(){
self.validarHechizo()
nivel.hechizoNivel(self)
}


method validarHechizo(){
if (not self.tieneVarita()){
Expand All @@ -94,7 +91,7 @@ class Personaje {
method repararLlave() {
self.validarReparar()
self.soltar()
ultimoObjGuardado = llave
objetoActual = llave
llavesRotas.clear()

}
Expand Down Expand Up @@ -169,14 +166,11 @@ class Personaje {
}
}

method contenidoPermitido(){
puedeAgarrarVarita = true
}



method estaEnLaMismaPosicionQue(obstaculo){
return self.position() == obstaculo.position()
}

method elGuardiaEsSolido() = false

}
Expand Down

0 comments on commit 473685a

Please sign in to comment.