Skip to content

Commit

Permalink
Agregamos correcciones
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxiAlexVargas authored Nov 7, 2024
1 parent 089df1d commit 3c84097
Showing 1 changed file with 24 additions and 10 deletions.
34 changes: 24 additions & 10 deletions example.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object juegoDeDinosaurio {
game.width(45)
game.height(20)
game.addVisual(dinosaurio)

game.boardGround("fondoBosque.jpg")

game.onTick(1000, "aparecerObjeto", { generadores.anyOne().generar() })
Expand All @@ -24,19 +24,33 @@ object juegoDeDinosaurio {
}
}

// VER ESTO o HACER ESTO
object normal{
method salta() {
if (dinosaurio.puedeSaltar()) {
dinosaurio.subir()
game.schedule(450, { dinosaurio.bajar() })
}
}
}
//IDEM
object inmune {
method inmune(){
dinosaurio.perderInmunidad()
}
}

object dinosaurio {
var property position = game.origin()
var property image = "Carpincho.png"
var inmunidad = 0
var estado = normal // ver esto

method salta() {
if (inmunidad == 1){
inmunidad = 0
}
if (position == game.origin()) {
self.subir()
game.schedule(450, { self.bajar() })
}
estado.salta()
}

method recibirDanio(){
estado.recibirDanio()
}

method bajar() {
Expand Down

0 comments on commit 3c84097

Please sign in to comment.