Skip to content

Commit

Permalink
agregados
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanter134 committed Oct 16, 2024
1 parent 529d7a5 commit 4891a9a
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 2 deletions.
Binary file added assets/arena_de_jefe.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/celda_gris.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/celda_roja.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 45 additions & 0 deletions entorno.wlk
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")
7 changes: 6 additions & 1 deletion main.wpgm
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()
}
1 change: 0 additions & 1 deletion morcilla.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ object morcilla {
game.schedule(tiempo * 9.5, { saltando = false })
}
}

}

0 comments on commit 4891a9a

Please sign in to comment.