From 0d4b43b5d6eee8637d4df8a27c59eb0d430dc0f7 Mon Sep 17 00:00:00 2001 From: Nahuel Marek Date: Wed, 2 Oct 2024 15:14:21 -0300 Subject: [PATCH] hice un generador de enemigos --- assets/zombie.png | Bin 0 -> 12721 bytes fantasma.wlk | 16 ++++++++++++++++ generadorDeEnemigos.wlk | 22 ++++++++++++++++++++++ main.wpgm | 24 +++++++++++++++++++----- pepita.wlk | 18 +++++++++++------- zombie.wlk | 18 ++++++++++++++++++ 6 files changed, 86 insertions(+), 12 deletions(-) create mode 100644 assets/zombie.png create mode 100644 fantasma.wlk create mode 100644 generadorDeEnemigos.wlk create mode 100644 zombie.wlk diff --git a/assets/zombie.png b/assets/zombie.png new file mode 100644 index 0000000000000000000000000000000000000000..992ace26335aa133cf63195cc77360fb1ddb6b03 GIT binary patch literal 12721 zcmY+rV{~Or)GZv_I-wdI@*6W5?ul7*^$VCqm%7&vCh|bxW6CC9^6M7m(k;OUjbs#?`F&q^i;kY8X797YHCs? zl$Ml~jf{*8GJhT!k?CtBPBrdQDE*n2%HGHhotKnEF*ae=sH&nu@e~t-r1baw;De+7 zo6g?{HnzO%Y{sYLWGu%CRZUI0r~ZC1N1uZUyyN~*#Gt9MF$`1nN;RMKLuUoXfd&Pg zwDDg6%-eMs%$Ct%1)dwOwOXh|v3wC%*FR5YM!93qQ(Hb0l;fiklV~IvtqSE>^!^$b zX134I&+xhT%O`M1NP`c$0yRYMtEp9&Qt$6w%_n1{CJe)a!|UoBLMtZ*Mjz^H6+h!- z`x?*jKhrSW$3{otk2R04oE}Sd^tQ3k@1A**AosoaU_EXxZ!I|-5T zIl)5Vr*AMiv$C>43s!%4CnqMLnB@CzZ4TKVJtO!Q}b8;1OpC;$dw9mCGgYLOB#= zum$sseb?=UN?7Su4RX(o-zNn4`4RZMy}cb33?ZnfsDcgyQ(yOvkLf&eM|~!2ufsis zhD{jSR%Cb?@McDtnbHq@^Re3jR9A03gG*UP<`ZC|)@sT`kEkGrq4V?d5r zF~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fThSXx?)J^MnQPG4_)*!s5NPH=sl`Bgp((1lwRJaMSr;L?5C%v%lIZ!Lgbw0ho%wVLhbFOUuNbA`|DkGnzY62j;D{qjeN<=q4a_d_a}xGI%6`-J*jJ0Sd14L#vMoYsPu}KZYkS8j=6yG^KUhi zzsE-P@cF!o?$&Q_DV>0I;gRRjF)>&^nwl&3LXK_f=8purZ11%Dv9d z&&T>*MLQ2Lyxi2U`&hf*d9GdNsP}j&H=l0sWT@{?w_9M==4-2d**iJK1bagT=cPNu VWFH>-`pp7NR`Q2LjhI2u{|BFr_MZR% literal 0 HcmV?d00001 diff --git a/fantasma.wlk b/fantasma.wlk new file mode 100644 index 0000000..0ee25fd --- /dev/null +++ b/fantasma.wlk @@ -0,0 +1,16 @@ +class Fantasmas { + const position = new MutablePosition() + var property estado= "movil" + var property zombie = "zombie" + + method position() = position + + method movete() { + if(self.estado()=="movil") + position.goLeft(1) + else zombie.moveteDerecha() + } + method moveteDerecha() { + position.goRight(1) + } +} \ No newline at end of file diff --git a/generadorDeEnemigos.wlk b/generadorDeEnemigos.wlk new file mode 100644 index 0000000..cc222a9 --- /dev/null +++ b/generadorDeEnemigos.wlk @@ -0,0 +1,22 @@ +import zombie.* +object generadorDeEnemigos { + var nombreEnemigo = 0 + const enemigo = #{} + + method nombre() = nombreEnemigo + method sumarEnemigo() { + nombreEnemigo+=1 + } + method generarEnemigo(numero){ + if (numero==1) { + var nombreParaEnemigo = self.nombre() + nombreParaEnemigo = new ZombiesNormales() + enemigo.add(nombreParaEnemigo) + return game.addVisual(nombreParaEnemigo) + } + return 0 + } + method moverEnemigos() { + enemigo.forEach({zombie => zombie.movete()}) + } +} \ No newline at end of file diff --git a/main.wpgm b/main.wpgm index 4337325..879d5f2 100644 --- a/main.wpgm +++ b/main.wpgm @@ -1,16 +1,30 @@ import wollok.game.* import pepita.* - +import zombie.* +import fantasma.* +import generadorDeEnemigos.* program PepitaGame { game.title("Pepita") - game.height(10) - game.width(10) + game.height(5) + game.width(15) game.cellSize(100) - + /*game.addVisual(Fantasmas)*/ game.addVisual(pepita) + + keyboard.d().onPressDo({ pepita.moverseDerecha(1) }) + keyboard.a().onPressDo({ pepita.moverseIzquierda(1) }) + keyboard.w().onPressDo({ pepita.moverseArriba(1) }) + keyboard.s().onPressDo({ pepita.moverseAbajo(1) }) + game.onTick(7000, "generar nuevo Enemigo", {generadorDeEnemigos.generarEnemigo(1) + generadorDeEnemigos.sumarEnemigo()}) + game.onTick(7000, "mover enemigo", {generadorDeEnemigos.moverEnemigos()}) - keyboard.w().onPressDo({ pepita.fly(1) }) + game.whenCollideDo(pepita, { elemento => + elemento.estado("frenado") + }) + + game.start() } diff --git a/pepita.wlk b/pepita.wlk index 8763973..2dbb4dc 100644 --- a/pepita.wlk +++ b/pepita.wlk @@ -1,16 +1,20 @@ object pepita { - var energy = 100 const position = new MutablePosition(x=0, y=0) method image() = "golondrina.png" method position() = position - method energy() = energy - - method fly(minutes) { - energy = energy - minutes * 3 - position.goRight(minutes) - position.goUp(minutes) + method moverseDerecha(casillas) { + position.goRight(casillas) + } + method moverseIzquierda(casillas) { + position.goLeft(casillas) + } + method moverseArriba(casillas) { + position.goUp(casillas) + } + method moverseAbajo(casillas) { + position.goDown(casillas) } } \ No newline at end of file diff --git a/zombie.wlk b/zombie.wlk new file mode 100644 index 0000000..e2ab9be --- /dev/null +++ b/zombie.wlk @@ -0,0 +1,18 @@ + +class ZombiesNormales { + const position = new MutablePosition(x=10, y=0.randomUpTo(5).truncate(0)) + var property estado= "movil" + method position() = position + var property imagen = "golondrina.png" + method image() = imagen + + method movete() { + if(self.estado()=="movil") + return position.goLeft(1) + else self.estado("frenado") + } + method moveteDerecha() { + return position.goRight(1) + } +} +