Skip to content

Commit

Permalink
Reloj resuelto
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazzty committed Oct 1, 2024
1 parent 6ab92a9 commit 77bdcac
Show file tree
Hide file tree
Showing 3 changed files with 559 additions and 6 deletions.
8 changes: 5 additions & 3 deletions dinoGame.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ object juego{
game.addVisual(dino)
game.addVisual(reloj)

keyboard.s().onPressDo{reloj.detener()}
keyboard.space().onPressDo{ self.jugar()}
game.onCollideDo(dino,{ obstaculo => obstaculo.chocar()})

}
}

method iniciar(){
dino.iniciar()
Expand Down Expand Up @@ -56,14 +57,15 @@ object reloj {
method position() = game.at(1, game.height()-1)

method pasarTiempo() {
//COMPLETAR
// Change this Gus
tiempo = tiempo + 1
}
method iniciar(){
tiempo = 0
game.onTick(100,"tiempo",{self.pasarTiempo()})
}
method detener(){
//COMPLETAR
game.removeTickEvent("tiempo")
}
}

Expand Down
Loading

0 comments on commit 77bdcac

Please sign in to comment.