-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
709efbd
commit 5ed807f
Showing
2 changed files
with
164 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,18 @@ | ||
object helado { | ||
var property position = game.origin() | ||
var property position = game.at(1,1) | ||
method image() = "helado.png" | ||
var puntos = 0 | ||
|
||
method recolectar(fruta){ | ||
game.removeVisual(fruta) | ||
puntos += 1 | ||
} | ||
} | ||
|
||
method puntos() = puntos | ||
|
||
method decirPuntos(){ | ||
var mensaje | ||
if(puntos <=10){ | ||
mensaje = "Recolecté " + self.puntos() + "/10" | ||
|
||
} | ||
if(puntos <= 20 && puntos > 10){ | ||
mensaje = "Recolecté " + self.puntos() + "/20" | ||
} | ||
if(puntos > 20 && puntos <= 25){ | ||
mensaje = "Recolecté " + self.puntos() + "/30" | ||
} | ||
|
||
game.say(self, mensaje) | ||
object points{ | ||
var frutasObtenidas = 0 | ||
method sumarFrutas(){ | ||
frutasObtenidas += 1 | ||
} | ||
method frutasObtenidas() = frutasObtenidas | ||
method position() = game.at(8,9) | ||
method text() ="Puntaje: " + frutasObtenidas + "/30" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters