-
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.
- Loading branch information
1 parent
529d7a5
commit 4891a9a
Showing
6 changed files
with
51 additions
and
2 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.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,45 @@ | ||
class Colisiones { | ||
const property position | ||
|
||
method image() = "celda_gris.png" | ||
} | ||
const colision0 = new Colisiones(position = new Position(x=0, y=1)) | ||
const colision1 = new Colisiones(position = new Position(x=1, y=1)) | ||
const colision2 = new Colisiones(position = new Position(x=2, y=1)) | ||
const colision3 = new Colisiones(position = new Position(x=3, y=1)) | ||
const colision4 = new Colisiones(position = new Position(x=4, y=1)) | ||
const colision5 = new Colisiones(position = new Position(x=5, y=1)) | ||
const colision6 = new Colisiones(position = new Position(x=6, y=1)) | ||
const colision7 = new Colisiones(position = new Position(x=7, y=1)) | ||
const colision8 = new Colisiones(position = new Position(x=8, y=1)) | ||
const colision9 = new Colisiones(position = new Position(x=9, y=1)) | ||
const colision10 = new Colisiones(position = new Position(x=10, y=1)) | ||
const colision11 = new Colisiones(position = new Position(x=11, y=1)) | ||
const colision12 = new Colisiones(position = new Position(x=12, y=1)) | ||
const colision13 = new Colisiones(position = new Position(x=13, y=1)) | ||
const colision14 = new Colisiones(position = new Position(x=14, y=1)) | ||
const colision15 = new Colisiones(position = new Position(x=15, y=1)) | ||
const colision16 = new Colisiones(position = new Position(x=16, y=1)) | ||
const colision17 = new Colisiones(position = new Position(x=17, y=1)) | ||
const colision18 = new Colisiones(position = new Position(x=18, y=1)) | ||
const colision19 = new Colisiones(position = new Position(x=19, y=1)) | ||
const colision20 = new Colisiones(position = new Position(x=20, y=1)) | ||
const colision21 = new Colisiones(position = new Position(x=21, y=1)) | ||
const colision22 = new Colisiones(position = new Position(x=22, y=1)) | ||
const colision23 = new Colisiones(position = new Position(x=23, y=1)) | ||
const colision24 = new Colisiones(position = new Position(x=24, y=1)) | ||
const colision25 = new Colisiones(position = new Position(x=25, y=1)) | ||
const colision26 = new Colisiones(position = new Position(x=26, y=1)) | ||
const colision27 = new Colisiones(position = new Position(x=27, y=1)) | ||
const colision28 = new Colisiones(position = new Position(x=28, y=1)) | ||
const colision29 = new Colisiones(position = new Position(x=29, y=1)) | ||
const colision30 = new Colisiones(position = new Position(x=30, y=1)) | ||
const colision31 = new Colisiones(position = new Position(x=31, y=1)) | ||
|
||
object jefeInteractuable{ | ||
const property position = new Position(x=16, y=2) | ||
|
||
method image() = "celda_roja.png" | ||
} | ||
|
||
// const jefeDePrueba = new JefeInteractuable(position = new Position(x=16, y=2), image() = "celda_roja.png") |
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,19 +1,24 @@ | ||
import wollok.game.* | ||
|
||
import morcilla.* | ||
import entorno.* | ||
|
||
program MorcillaGame { | ||
game.title("La Bizarra Aventura de MORCILLA") | ||
game.height(32) | ||
game.width(64) | ||
game.width(32) | ||
game.cellSize(100) | ||
|
||
game.addVisual(jefeInteractuable) | ||
|
||
game.addVisual(morcilla) | ||
|
||
// Mover a morcilla | ||
keyboard.d().onPressDo({ morcilla.caminarDerecha(1) }) | ||
keyboard.a().onPressDo({ morcilla.caminarIzquierda(1) }) | ||
keyboard.space().onPressDo({ morcilla.saltar(2000) }) | ||
|
||
game.whenCollideDo(morcilla, {nose => game.say(morcilla, "Estas colisionando")}) | ||
|
||
game.start() | ||
} |
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 |
---|---|---|
|
@@ -34,5 +34,4 @@ object morcilla { | |
game.schedule(tiempo * 9.5, { saltando = false }) | ||
} | ||
} | ||
|
||
} |