-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
agregue para que si una cierta cantidad de
enemigos llegan a el lado izquierdo de la pantalla, el jugador pierda
- Loading branch information
1 parent
5ee18ac
commit 2ba8c95
Showing
5 changed files
with
59 additions
and
4 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
object casa { | ||
var property vida = 3 | ||
method recibirDanio() { | ||
self.vida(self.vida()-1) | ||
} | ||
method terminarJuego() = if (self.vida()==0) { | ||
|
||
game.addVisual(pantallaFinal) | ||
game.schedule(500,{game.stop()}) | ||
} | ||
} | ||
|
||
class HitboxCasa { | ||
const position | ||
method position() = position | ||
method queSoy() = "casa" | ||
} | ||
|
||
const hitbox1 = new HitboxCasa(position = game.at(0, 0)) | ||
const hitbox2 = new HitboxCasa(position = game.at(0, 1)) | ||
const hitbox3 = new HitboxCasa(position = game.at(0, 2)) | ||
const hitbox4 = new HitboxCasa(position = game.at(0, 3)) | ||
const hitbox5 = new HitboxCasa(position = game.at(0, 4)) | ||
|
||
object pantallaFinal { | ||
method position()=game.at(0,0) | ||
method image()= "fin.jpg" | ||
} | ||
/* game.addVisual(hitbox1) | ||
game.addVisual(hitbox2) | ||
game.addVisual(hitbox3) | ||
game.addVisual(hitbox4) | ||
game.addVisual(hitbox5) | ||
game.onCollideDo(hitbox1, {elemento => elemento.daniarCasa()}) | ||
game.onCollideDo(hitbox2, {elemento => elemento.daniarCasa()}) | ||
game.onCollideDo(hitbox3, {elemento => elemento.daniarCasa()}) | ||
game.onCollideDo(hitbox4, {elemento => elemento.daniarCasa()}) | ||
game.onCollideDo(hitbox5, {elemento => elemento.daniarCasa()}) */ |
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
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
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