Skip to content

Commit

Permalink
cambio la forma de decidir la altura del obstaculo creado
Browse files Browse the repository at this point in the history
  • Loading branch information
joaquin-burgio authored Nov 5, 2024
1 parent 5c878a2 commit fc6f193
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions example.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ object dinosaurio {

}

method otraCosa() {
image = "moneda.png"
method restarPtos() {

}

method terminarJuego() {
Expand Down Expand Up @@ -88,7 +88,9 @@ class Obstaculo {
var property position = game.at(game.width(), self.posY())
var property image

method posY() = 0.randomUpTo(game.height() - 3).truncate(0)
const valores = [0,4,12,16]

method posY() = valores.anyOne()

method teChocoElDino()

Expand All @@ -105,7 +107,7 @@ class Moneda inherits Obstaculo {

class Pera inherits Obstaculo {
override method teChocoElDino() {
dinosaurio.otraCosa()
dinosaurio.restarPtos()
}
}

Expand Down

0 comments on commit fc6f193

Please sign in to comment.