Skip to content

Commit

Permalink
Termino todos los tutoriales
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanalgo1 committed Sep 19, 2024
1 parent 3980aae commit 6d26969
Show file tree
Hide file tree
Showing 5 changed files with 92 additions and 6 deletions.
2 changes: 1 addition & 1 deletion comidas.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import wollok.game.*

class Comida{
var property fueComido = false

method teEncontro(ave){}
}

object manzana inherits Comida(){
Expand Down
7 changes: 6 additions & 1 deletion extras.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object nido {
method image() = "nido.png"

method teEncontro(ave) {
game.say(ave, "GANASTE! WIII")
game.say(ave, "¡GANÉ!")
game.schedule(2000, { game.stop() })
}
}
Expand All @@ -17,4 +17,9 @@ object nido {
object silvestre {
method position() = game.at(pepita.position().x().max(3), 0)
method image() = "silvestre.png"

method teEncontro(ave) {
game.say(ave, "¡PERDÍ!")
game.schedule(2000, { game.stop() })
}
}
65 changes: 65 additions & 0 deletions log/wollok2.log

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions niveles.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object tutorial2 {
}

}
/*

object tutorial3 {

method iniciar() {
Expand All @@ -37,10 +37,10 @@ object tutorial3 {
game.addVisual(pepita)
config.configurarTeclas()
config.configurarColisiones()
// config.configurarGravedad()
config.configurarGravedad()
}

}*/
}

object config {

Expand All @@ -57,7 +57,9 @@ object config {
}

method configurarGravedad(){
game.onTick(800, "Cae 1", {pepita.cae()})
if (!pepita.estaEnElNido()){
game.onTick(800, "Cae 1", {pepita.cae()})
}
}
}

14 changes: 14 additions & 0 deletions pepitaGame.wpgm
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,17 @@ program PepitaGame2 {

game.start()
}

program PepitaGame3 {
game.title("Pepita")
game.height(10)
game.width(10)
game.boardGround("Captura de pantalla 2024-06-30 175630.png")

tutorial3.iniciar()

game.showAttributes(pepita) //Debug
game.showAttributes(silvestre) //Debug

game.start()
}

0 comments on commit 6d26969

Please sign in to comment.