Skip to content

Commit

Permalink
Mismos problemas que antes pero algunos arreglos
Browse files Browse the repository at this point in the history
  • Loading branch information
tomassagrada committed Nov 1, 2024
1 parent 4c5128c commit 9f44f2c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Binary file added assets/E_horizontal_gate_long.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions elements.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -273,15 +273,15 @@ class PlataformaMovimientoHorizontal inherits PlataformaBase{

override method move(movimiento) {
super(movimiento)
platAsocs.forEach { x => x.move("up")}
platAsocs.forEach { x => x.move("Left")}
}

override method moveBack(movimiento) {
super(movimiento)
platAsocs.forEach { x => x.moveBack("down")}
platAsocs.forEach { x => x.moveBack("Right")}
}

method image() = "E_horizontal_gate.png"
method image() = "E_horizontal_gate_long.png"
}

// ------------------ Nuevo fondo
Expand Down
10 changes: 6 additions & 4 deletions level_2.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ object level2 inherits Level {
const puertaWatergirl1 = new Puerta(posX = 2, posY = 24, tipo = agua)
const puertaWatergirl2 = new Puerta(posX = 3, posY = 24, tipo = agua)

const extensionPlatVioleta1 = new PlataformaBase(position = new MutablePosition(x=21, y=23))
const extensionPlatVioleta2 = new PlataformaBase(position = new MutablePosition(x=20, y=23))
const extensionPlatVioleta1 = new PlataformaBase(position = new MutablePosition(x=23, y=23))
const extensionPlatVioleta2 = new PlataformaBase(position = new MutablePosition(x=24, y=23))
const extensionPlatVioleta3 = new PlataformaBase(position = new MutablePosition(x=25, y=23))
const extensionPlatVioleta4 = new PlataformaBase(position = new MutablePosition(x=26, y=23))

const plataformaVioleta = new PlataformaMovimientoHorizontal(
position = new MutablePosition(x=22, y=23),
maxPosicion = 17,
minPosicion = 22,
platAsocs = [extensionPlatVioleta1, extensionPlatVioleta2]
platAsocs = [extensionPlatVioleta1, extensionPlatVioleta2,extensionPlatVioleta3,extensionPlatVioleta4]
)

const botonVioletaA = new Boton(posX = 12, posY = 24, plataformaAsoc = plataformaVioleta,movimiento = "Left",vuelta = "Right") // Boton izquierda
Expand Down Expand Up @@ -141,6 +143,6 @@ object level2 inherits Level {
// Agregamos los elementos del nivel

override method agregarElementosNivel (){
[fireboy, watergirl, puertaFireboy1, puertaFireboy2, puertaWatergirl1, puertaWatergirl2, extensionPlatVioleta1, extensionPlatVioleta2, plataformaVioleta,botonVioletaA, botonVioletaB,extensionPlatAmarilla1,extensionPlatAmarilla2,extensionPlatAmarilla3,plataformaAmarilla,botonAmarilloA,botonAmarilloB].forEach({x => elementosNivel.add(x)})
[fireboy, watergirl, puertaFireboy1, puertaFireboy2, puertaWatergirl1, puertaWatergirl2, extensionPlatVioleta1, extensionPlatVioleta2,extensionPlatVioleta3,extensionPlatVioleta4, plataformaVioleta,botonVioletaA, botonVioletaB,extensionPlatAmarilla1,extensionPlatAmarilla2,extensionPlatAmarilla3,plataformaAmarilla,botonAmarilloA,botonAmarilloB].forEach({x => elementosNivel.add(x)})
}
}

0 comments on commit 9f44f2c

Please sign in to comment.