diff --git a/package-lock.json b/package-lock.json index 215d179..0aaf5e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "pilas-bloques-exercises", - "version": "1.4.18", + "version": "1.4.22", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 54b9363..08b40ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pilas-bloques-exercises", - "version": "1.4.18", + "version": "1.4.22", "description": "Exercises for Pilas Bloques", "homepage": "http://pilasbloques.program.ar", "author": { @@ -27,7 +27,9 @@ "Lucas Alan Silvestri (https://github.com/51lv3str1)", "Diana López Alvas (https://github.com/dlopezalvas)", "Tomás Floxo Lodeiro (https://github.com/tfloxolodeiro)", - "Ezequiel Pereyra (https://github.com/ezequielPereyra)" + "Ezequiel Pereyra (https://github.com/ezequielPereyra)", + "Daniel Ferro (https://github.com/danielferro69)", + "Rocío González (https://github.com/rgonzalezt)" ], "keywords": [ "programar", diff --git a/src/actores/Dibujante.ts b/src/actores/Dibujante.ts index 0d12e7c..2144313 100644 --- a/src/actores/Dibujante.ts +++ b/src/actores/Dibujante.ts @@ -5,6 +5,7 @@ class Dibujante extends ActorAnimado { super(x, y, { grilla: 'dibujante.png', cantColumnas: 5 }); this.definirAnimacion("parado", new Cuadros([0, 1, 2, 1]).repetirVeces(4).concat(new Cuadros([0]).repetirVeces(40)), 4, true); this.definirAnimacion("correr", [3,4,4,4,4,4], 12); + this.definirAnimacion("dibujar", [3,4,4,4,4,4], 12); this.definirAnimacion("rotar", [3], 12); this.definirAnimacion("saltar", [3,4,4,4,4,4], 12); } diff --git a/src/actores/libroPrimaria/Coty.ts b/src/actores/libroPrimaria/Coty.ts index 88ca90b..c556875 100644 --- a/src/actores/libroPrimaria/Coty.ts +++ b/src/actores/libroPrimaria/Coty.ts @@ -17,7 +17,7 @@ class Coty extends ActorAnimado { .concat([20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49]) .concat(new Cuadros(0).repetirVeces(5)), 12, true); - this.definirAnimacion("correrDibujando", [50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62], 12); + this.definirAnimacion("dibujar", [50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62], 12); this.definirAnimacion("saltar", [63, 64, 65, 66, 67, 68, 69, 69, 69, 70, 71, 72, 73, 74, 75, 76, 77], 14); this.definirAnimacion("obstaculo", [78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100], 7.5); this.definirAnimacion("rotar", [0], 1); diff --git a/src/actores/segundoCiclo/Manic/Manic.ts b/src/actores/segundoCiclo/Manic/Manic.ts index ce6c204..86a4d7e 100644 --- a/src/actores/segundoCiclo/Manic/Manic.ts +++ b/src/actores/segundoCiclo/Manic/Manic.ts @@ -5,9 +5,9 @@ class Manic extends ActorAnimado { static _grilla = 'actor.manic.png' constructor() { - super(0,0,{cantColumnas: 10, cantFilas: 9}); + super(0, 0, { cantColumnas: 10, cantFilas: 9 }); this.definirAnimacion("parado", - new Cuadros(32).repetirVeces(18) + new Cuadros(32).repetirVeces(18) .concat([33, 34, 34, 32, 32, 32, 32, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32]) .concat(new Cuadros(32).repetirVeces(18)) .concat([33, 34, 34, 32, 32, 32, 32, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 44, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32]) @@ -20,7 +20,28 @@ class Manic extends ActorAnimado { this.definirAnimacion("error", [47, 48, 49, 50, 51, 51, 52, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53, 53], 12) this.definirAnimacion("recoger", [28, 29, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 31, 28], 12); this.definirAnimacion("usarCatalejo", [54, 55, 56, 57, 58, 59, 60, 61, 61, 62, 62, 62, 63, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 76, 75, 74, 73, 72, 71, 70, 69, 68, 67, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 77, 78, 79, 80, 81, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, 82], 20); - this.definirAnimacion("dibujar", [0, 1, 2, 3, 4, 5, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27], 20); this.definirAnimacion("surfear", [0, 1, 2, 3, 4, 5, 6, 7, 6, 5, 6, 7, 6, 5, 6, 7, 7], 20); } } + +//Usado para ejercicios de Manic dibujando, se necesita tener la grilla con mayor espacio para que no sea vea feo al dibujar y rotar, ya que el dibujo sale desde el centro de la imagen. +class ManicDibujando extends ActorAnimado { + static _grilla = 'actor.manicDibujando.png' + + constructor() { + super(0, 0, { cantColumnas: 10, cantFilas: 4 }); + this.definirAnimacion("parado", + new Cuadros(23).repetirVeces(18) + .concat([24, 25]) + .concat(new Cuadros(23).repetirVeces(45)) + .concat([24, 25]) + .concat(new Cuadros(23).repetirVeces(45)) + .concat([24, 25]) + .concat(new Cuadros(23).repetirVeces(45)) + .concat([26, 27, 28, 29, 30, 31, 32, 33, 34, 35]), + 20, true); + this.definirAnimacion("rotar", [0], 1); + this.definirAnimacion("error", [17, 18, 19, 20, 21, 21, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23], 12) + this.definirAnimacion("dibujar", [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16], 20); + } +} \ No newline at end of file diff --git a/src/assets/actor.manic.png b/src/assets/actor.manic.png index 138b205..70c30cb 100644 Binary files a/src/assets/actor.manic.png and b/src/assets/actor.manic.png differ diff --git a/src/assets/actor.manicDibujando.png b/src/assets/actor.manicDibujando.png new file mode 100644 index 0000000..f0cede9 Binary files /dev/null and b/src/assets/actor.manicDibujando.png differ diff --git a/src/assets/fondo.dibujando.manic.png b/src/assets/fondo.dibujando.manic.png new file mode 100644 index 0000000..d9c7e83 Binary files /dev/null and b/src/assets/fondo.dibujando.manic.png differ diff --git a/src/comportamientos/DibujarLinea.ts b/src/comportamientos/DibujarLinea.ts index d2ac0dd..47920f0 100644 --- a/src/comportamientos/DibujarLinea.ts +++ b/src/comportamientos/DibujarLinea.ts @@ -3,7 +3,7 @@ // Está pensado para iniciar la línea en el centro del receptor. // Esto hace que no haya que hacer cálculos ni aprender qué significa Shape.regX ó cómo lo usa pilas. -// Llámenme cobarde, sí. Perdón. +// Llámenme cobarde, sí. Perdón. (x2) class DibujarLinea extends MovimientoAnimado { iniciar(receptor) { diff --git a/src/escenas/libroPrimaria/DibujandoManic.ts b/src/escenas/libroPrimaria/DibujandoManic.ts new file mode 100644 index 0000000..e84d71d --- /dev/null +++ b/src/escenas/libroPrimaria/DibujandoManic.ts @@ -0,0 +1,48 @@ +abstract class DibujandoManic extends DibujandoFiguras { + + xManic: number; + yManic: number; + + static clasesDeActoresInvolucrados(): typeof ActorAnimado[] { + return [ManicDibujando] + } + + static pathFondo(): string { + return 'fondo.dibujando.manic.png'; + } + + iniciar() { + super.iniciar(); + this.automata.aprender(EstallarAlSalirDePantalla, {}); + } + + crearAutomata() { + this.automata = new ManicDibujando(); + this.automata.escala = 0.8; + this.automata.x = this.coordenadasAutomata().x; + this.automata.y = this.coordenadasAutomata().y; + } + + colorDibujo() { + return pilas.colores.rgb(230, 240, 6); + } + + colorDibujoEsperado(){ + return pilas.colores.gris; + } + + coordenadasAutomata() { + return {x: 0, y: 0} + } +} + +class DibujandoCuadradoManic extends DibujandoManic { + + coordenadasAutomata() { + return { x: -50, y: 50 } + } + + puntosEsperados() { + return [{ x: -50, y: 50 }, { x: -40, y: 50 }, { x: -30, y: 50 }, { x: -20, y: 50 }, { x: -10, y: 50 }, { x: 0, y: 50 }, { x: 10, y: 50 }, { x: 20, y: 50 }, { x: 30, y: 50 }, { x: 40, y: 50 }, { x: 50, y: 50 }, { x: 50, y: 40 }, { x: 50, y: 30 }, { x: 50, y: 20 }, { x: 50, y: 10 }, { x: 50, y: 0 }, { x: 50, y: -10 }, { x: 50, y: -20 }, { x: 50, y: -30 }, { x: 50, y: -40 }, { x: 50, y: -50 }, { x: 40, y: -50 }, { x: 30, y: -50 }, { x: 20, y: -50 }, { x: 10, y: -50 }, { x: 0, y: -50 }, { x: -10, y: -50 }, { x: -20, y: -50 }, { x: -30, y: -50 }, { x: -40, y: -50 }, { x: -50, y: -50 }, { x: -50, y: -40 }, { x: -50, y: -30 }, { x: -50, y: -20 }, { x: -50, y: -10 }, { x: -50, y: 0 }, { x: -50, y: 10 }, { x: -50, y: 20 }, { x: -50, y: 30 }, { x: -50, y: 40 }, { x: -50, y: 50 }]; + } +} \ No newline at end of file