Skip to content

Commit

Permalink
assets
Browse files Browse the repository at this point in the history
  • Loading branch information
brisabrussa28 committed Oct 14, 2024
1 parent eaa7e82 commit 00fc447
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 40 deletions.
Binary file added assets/FondoSeleccion.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 removed assets/FondoSeleccion2.png
Binary file not shown.
Binary file added assets/TERMINO.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 modified assets/banana.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 removed assets/bloque_slime.png
Binary file not shown.
Binary file added assets/bloque_slime2.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/fondo slime.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 removed assets/helado.png
Binary file not shown.
Binary file added assets/heladon.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 removed assets/no.png
Binary file not shown.
Binary file removed assets/pausa.png
Binary file not shown.
Binary file added assets/piopio.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 modified assets/sandia.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 modified assets/si.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 modified assets/uva2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions jugador.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,15 @@ object jugador {
}
}

var valor = 0
method valor(numero){
valor = numero
}
var property valor = 0

method image(){
if(valor == 0){
return "goku2.png"
return "heladon.png"
} else if (valor == 1){
return "piopio.png"
} else {
return "helado.png"
return "goku2.png"
}
}

Expand Down
52 changes: 27 additions & 25 deletions mainExample.wpgm
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@ import miscelaneos.*

program BadIceCreamGame {
game.cellSize(40) //ancho del helado
var fondo = "fondo slime.png"
game.boardGround(fondo)
game.title("Bad Ice Cream")
game.height(18)
game.width(18)
//dibujar menu de personajes
game.addVisual(menuPersonajes)
game.addVisual(noSeleccionado)
game.addVisual(siSeleccionado)
//Personalización
//Mundo
//Inicio menu
juego.menuPersonajes()
//inicio
game.start()
Expand All @@ -43,7 +40,10 @@ program BadIceCreamGame {

object juego{
var inicio = false
method menuNiveles(){
var seleccionado = 0
method menuNiveles(){ //SELECCION DE NIVELES
game.addVisual(menuNiveles)
game.addVisual(seleccion)
keyboard.a().onPressDo({
if(seleccion.position().x() > 1){
seleccion.position(game.at(seleccion.position().x()-2,seleccion.position().y()))
Expand Down Expand Up @@ -80,31 +80,33 @@ object juego{
})
}

method menuPersonajes(){
method menuPersonajes(){ //SELECCION DE PERSONAJES
game.addVisual(menuPersonajes)
game.addVisual(siSeleccionado)
keyboard.a().onPressDo({
noSeleccionado.position(game.at(10,5))
siSeleccionado.position(game.at(2,5))
if(siSeleccionado.position().x() > 2) siSeleccionado.position(game.at(siSeleccionado.position().x()-5,5))
})
keyboard.d().onPressDo({
noSeleccionado.position(game.at(2,5))
siSeleccionado.position(game.at(10,5))
if(siSeleccionado.position().x() < 12) siSeleccionado.position(game.at(siSeleccionado.position().x()+5,5))
})
keyboard.enter().onPressDo({
if(noSeleccionado.position() == game.at(2,5)){
jugador.valor(0)
} else {
jugador.valor(1)
if(seleccionado == 0){
if(siSeleccionado.position() == game.at(2,5)){
jugador.valor(0)
} else if (siSeleccionado.position() == game.at(7,5)){
jugador.valor(1)
} else if (siSeleccionado.position() == game.at(12,5)){
jugador.valor(2)
}
game.removeVisual(menuPersonajes)
game.removeVisual(siSeleccionado)
seleccionado = 1
self.menuNiveles()
}
game.removeVisual(menuPersonajes)
game.removeVisual(noSeleccionado)
game.removeVisual(siSeleccionado)
game.addVisual(menuNiveles)
game.addVisual(seleccion)
self.menuNiveles()
})
}

method jugar(){
method jugar(){ //DIBUJO DE LOS ELEMENTOS DEL MUNDO
if(!inicio){
//dibujar muros
muros.crearLaterales()
Expand All @@ -121,7 +123,7 @@ object juego{
}
}

method bloquear(){
method bloquear(){ //DIBUJAR MENSAJE DE "NIVEL NO DESBLOQUEADO"
if(!inicio){
if(bloqueados.any({bloqueado => bloqueado == seleccion.position()})){
game.addVisual(bloqueado)
Expand All @@ -130,7 +132,7 @@ object juego{
}
}
}
const bloqueados = [game.at(1,3),game.at(1,5),game.at(1,7),game.at(1,9),
const bloqueados = [game.at(1,3),game.at(1,5),game.at(1,7),game.at(1,9), //lista de niveles a los que no se puede acceder
game.at(3,3),game.at(3,5),game.at(3,7),game.at(3,9),
game.at(5,3),game.at(5,5),game.at(5,7),game.at(5,9),game.at(5,11),
game.at(7,3),game.at(7,5),game.at(7,7),game.at(7,9),game.at(7,11),
Expand Down
9 changes: 2 additions & 7 deletions miscelaneos.wlk
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@ object ganaste{

object menuPersonajes{
var property position = game.origin()
method image() = "FondoSeleccion2.png"
}

object noSeleccionado{
var property position = game.at(2,5)
method image() = "no.png"
method image() = "FondoSeleccion.png"
}

object siSeleccionado{
var property position = game.at(10,5)
var property position = game.at(2,5)
method image() = "si.png"
}

Expand Down
4 changes: 2 additions & 2 deletions muros.wlk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class Bloque{
var property position = game.center() //habrá que posicionar los limites
method image() = "bloque_slime.png"
method image() = "bloque_slime2.png"
method soyBloque() = true
method ubicarYDibujar(posicion){
self.position(posicion)
Expand Down Expand Up @@ -48,7 +48,7 @@ object escenario{
[game.at(2,12), game.at(2,13), game.at(2,14), game.at(2,15), game.at(3,15), game.at(4,12), game.at(4,13), game.at(4,14), game.at(4,15), //ojo I
game.at(13,12), game.at(13,13), game.at(13,14), game.at(13,15), game.at(14,15), game.at(15,12), game.at(15,13), game.at(15,14), game.at(15,15), //ojo D
game.at(7,10), game.at(8,10), game.at(9,10), game.at(10,10), game.at(8,9), game.at(9,9), //nariz
game.at(3,5), game.at(4,4), game.at(5,4), game.at(6,3), game.at(7,3), game.at(8,4), game.at(9,4), game.at(10,3), game.at(11,3), game.at(12,4), game.at(13,4), game.at(14,5), game.at(8,5), game.at(8,6), game.at(8,7), game.at(9,5), game.at(9,6), game.at(9,7)], //boca]
game.at(3,5), game.at(4,4), game.at(5,4), game.at(6,3), game.at(7,3), game.at(8,4), game.at(9,4), game.at(10,3), game.at(11,3), game.at(12,4), game.at(13,4), game.at(14,5), game.at(8,5), game.at(8,6), game.at(8,7), game.at(9,5), game.at(9,6), game.at(9,7)], //boca
//Nivel 2
[game.at(2,13), game.at(3,13), game.at(4,14), game.at(5,14), game.at(6,15), game.at(7,15), game.at(8,15), game.at(9,15), game.at(10,15), game.at(11,15), game.at(12,15), game.at(13,15), game.at(14,14), game.at(15,12),
game.at(2,12), game.at(3,4), game.at(4,11), game.at(5,11), game.at(6,12), game.at(7,13), game.at(8,13), game.at(9,13), game.at(10,13), game.at(11,13), game.at(12,13), game.at(13,11), game.at(14,13), game.at(15,11),
Expand Down

0 comments on commit 00fc447

Please sign in to comment.