-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into limpiandoElHumedal
- Loading branch information
Showing
30 changed files
with
485 additions
and
186 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/// <reference path="../ActorAnimado.ts"/> | ||
|
||
class MetaFinal extends ActorAnimado { | ||
|
||
static imagenesPara(actor) : string[] { | ||
return [`marcador-${actor}.png`]; | ||
} | ||
|
||
constructor(actor: string) { | ||
super(0, 0, { grilla: `marcador-${actor}.png`, cantColumnas: 1, cantFilas: 1 }); | ||
} | ||
|
||
enviarAtras() { | ||
this.setZ(Math.min(this.getZ() + 1)) | ||
} | ||
|
||
ajustarSegunCuadricula(alto){ | ||
this.setY(this.getY() + alto / 2) | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/// <reference path = "ComportamientoConVelocidad.ts" /> | ||
/// <reference path = "GirarMarquesina.ts" /> | ||
|
||
class CorrerHeroicamente extends ComportamientoConVelocidad { | ||
nombreAnimacion(){ | ||
return 'correr'; | ||
} | ||
|
||
preAnimacion(){ | ||
this.argumentos.velocidad = 100; | ||
this.argumentos.cantPasos = 1; | ||
super.preAnimacion(); | ||
this.receptor.escena.fondo.hacer_luego(GirarMarquesina,{}); | ||
} | ||
|
||
postAnimacion(){ | ||
super.postAnimacion(); | ||
if(this.receptor.fraseAlCorrer) this.receptor.decir(this.receptor.fraseAlCorrer()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/// <reference path = "../../node_modules/pilasweb/dist/pilasweb.d.ts"/> | ||
/// <reference path = "Decir.ts"/> | ||
|
||
/* | ||
Comportamiento que hace decir una | ||
frase definida por la escena | ||
*/ | ||
|
||
class PingPongAnimado extends Decir { | ||
preAnimacion(): void { | ||
this.receptor.escena.antesDeRebotar(); | ||
this.argumentos.mensaje = this.receptor.escena.getFraseAlRebotar() | ||
super.preAnimacion(); | ||
} | ||
|
||
postAnimacion(){ | ||
super.postAnimacion(); | ||
this.receptor.decir(this.receptor.escena.fraseAlRebotar()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/// <reference path = "EscenaActividad.ts" /> | ||
/// <reference path = "../actores/segundoCiclo/Chuy/Chuy.ts" /> | ||
/// <reference path = "../actores/segundoCiclo/Chuy/Pelotas.ts" /> | ||
|
||
class ChuyHaciendoJueguito extends EscenaActividad { | ||
automata; | ||
pulpito; | ||
fondo; | ||
cuadricula; | ||
|
||
iniciar() { | ||
this.fondo = new Fondo('fondo.chuy.png',0,0); | ||
this.colocarCuadricula() | ||
this.construirObjeto(); | ||
this.construirAutomata(); | ||
this.construirFSM(); | ||
} | ||
|
||
colocarCuadricula(){ | ||
this.cuadricula = new Cuadricula(0, 0, 1, 1, | ||
{ alto: 100, ancho: 400 }, | ||
{ grilla: 'invisible.png', cantColumnas: 1 }); | ||
} | ||
|
||
construirAutomata() { | ||
this.automata = new Chuy(); | ||
this.automata.escala *= 1.2; | ||
this.cuadricula.agregarActor(this.automata, 0, 0, false); | ||
this.automata.x -= 50; | ||
} | ||
|
||
construirObjeto() { | ||
this.pulpito = new Pulpito(); | ||
this.pulpito.y = -120; | ||
this.pulpito.escala *= 0.2; | ||
this.pulpito.aprender(Flotar, {Desvio: 4}); | ||
this.cuadricula.agregarActor(this.pulpito, 0, 0, false); | ||
} | ||
|
||
private construirFSM(){ | ||
var builder= new BuilderStatePattern(this, 'inicial',false); | ||
builder.agregarEstado('posCorrecta',false); | ||
builder.agregarEstado('calentar1',false); | ||
builder.agregarEstado('calentar2',false); | ||
builder.agregarEstado('enCalor',false); | ||
builder.agregarEstado('levantarPelota',false); | ||
builder.agregarEstado('tirarAlAire',false); | ||
builder.agregarEstado('jugarConElPie',false); | ||
builder.agregarEstado('resuelto',false); | ||
builder.agregarEstado('noResuelve',false); | ||
builder.agregarEstadoAceptacion('fin'); | ||
|
||
builder.agregarTransicion('inicial', 'posCorrecta', 'avanzar'); | ||
builder.agregarTransicion('posCorrecta','calentar1','retroceder'); | ||
builder.agregarTransicion('posCorrecta','calentar2','avanzar'); | ||
builder.agregarTransicion('calentar1','enCalor','avanzar'); | ||
builder.agregarTransicion('calentar2','enCalor','retroceder'); | ||
builder.agregarTransicion('enCalor','levantarPelota','recoger'); | ||
builder.agregarTransicion('levantarPelota','tirarAlAire','revolearPulpito'); | ||
builder.agregarTransicion('levantarPelota','jugarConElPie','rebotarPiePulpito'); | ||
builder.agregarTransicion('tirarAlAire','resuelto','rebotarPiePulpito'); | ||
builder.agregarTransicion('jugarConElPie','resuelto','revolearPulpito'); | ||
builder.agregarTransicion('resuelto','fin','retroceder'); | ||
|
||
builder.agregarError('inicial', 'recoger', 'Primero hay que entrar en calor'); | ||
builder.agregarError('inicial', 'revolearPulpito', 'Primero hay que entrar en calor y agarrar la pelota'); | ||
builder.agregarError('inicial', 'rebotarPiePulpito', 'Primero hay que entrar en calor y agarrar la pelota'); | ||
builder.agregarError('inicial', 'retroceder', 'Primero hay que avanzar y entrar en calor'); | ||
|
||
builder.agregarError('posCorrecta', 'recoger', 'Primero hay que entrar en calor'); | ||
builder.agregarError('posCorrecta', 'revolearPulpito', 'Primero hay que entrar en calor y agarrar la pelota'); | ||
builder.agregarError('posCorrecta', 'rebotarPiePulpito', 'Primero hay que entrar en calor y agarrar la pelota'); | ||
|
||
builder.agregarError('calentar1', 'revolearPulpito', 'Primero hay que entrar en calor y agarrar la pelota'); | ||
builder.agregarError('calentar1', 'rebotarPiePulpito', 'Primero hay que entrar en calor y agarrar la pelota'); | ||
builder.agregarError('calentar1', 'retroceder', 'Primero hay que avanzar, entrar en calor y agarrar la pelota'); | ||
|
||
builder.agregarError('calentar2', 'revolearPulpito', 'Primero hay que entrar en calor y agarrar la pelota'); | ||
builder.agregarError('calentar2', 'rebotarPiePulpito', 'Primero hay que entrar en calor y agarrar la pelota'); | ||
|
||
builder.agregarError('enCalor', 'revolearPulpito', 'Primero hay que agarrar la pelota'); | ||
builder.agregarError('enCalor', 'rebotarPiePulpito', 'Primero hay que agarrar la pelota'); | ||
builder.agregarError('enCalor', 'retroceder', 'Primero hay que agarrar la pelota'); | ||
|
||
builder.agregarError('levantarPelota', 'retroceder', 'Primero hay que jugar con la pelota'); | ||
|
||
this.estado = builder.estadoInicial(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
/// <reference path = "EscenaActividad.ts" /> | ||
/// <reference path = "../comportamientos/PingPongAnimado.ts"/> | ||
/// <reference path = "../actores/segundoCiclo/Chuy/Paleta.ts" /> | ||
/// <reference path = "../actores/segundoCiclo/Chuy/Pelotas.ts" /> | ||
/// <reference path = "../actores/segundoCiclo/Chuy/Chuy.ts" /> | ||
|
||
|
||
/** | ||
* @class NoMeCansoDeRebotar | ||
* | ||
* Objetivos: Introducir Repetición | ||
* Enunciado: Repetir reboteso. | ||
*/ | ||
class NoMeCansoDeRebotar extends EscenaActividad { | ||
automata | ||
paleta | ||
pingpong | ||
fondo | ||
rebotesFaltantes | ||
cuadricula; | ||
|
||
iniciar() { | ||
this.fondo = new Fondo('fondo.chuy.png',0,0); | ||
this.colocarCuadricula() | ||
this.construirObjetos(); | ||
this.construirAutomata(); | ||
this.rebotesFaltantes=30; | ||
this.automata.decir(" Tengo que hacer " + this.rebotesFaltantes + " rebotes!"); | ||
} | ||
|
||
colocarCuadricula(){ | ||
this.cuadricula = new Cuadricula(70, 0, 1, 1, | ||
{ alto: 100, ancho: 300 }, | ||
{ grilla: 'invisible.png', cantColumnas: 1 }); | ||
} | ||
|
||
construirAutomata() { | ||
this.automata = new Chuy(); | ||
this.automata.escala *= 1.2; | ||
this.cuadricula.agregarActor(this.automata, 0, 0, false); | ||
this.automata.x -= 20; | ||
} | ||
|
||
construirObjetos() { | ||
this.paleta = new Paleta(); | ||
this.paleta.y = -120; | ||
this.paleta.escala *= 0.2; | ||
this.paleta.aprender(Flotar, {Desvio: 4}); | ||
this.cuadricula.agregarActor(this.paleta, 0, 0, false); | ||
this.pingpong = new PingPong(); | ||
this.pingpong.y = -160; | ||
this.pingpong.escala *= 0.2; | ||
this.pingpong.aprender(Flotar, {Desvio: 4}); | ||
this.cuadricula.agregarActor(this.pingpong, 0, 0, false); | ||
} | ||
|
||
antesDeRebotar(){ | ||
//oculto los objetos | ||
this.pingpong.escala = 0; | ||
this.paleta.escala = 0; | ||
} | ||
|
||
getFraseAlRebotar(): string { | ||
if (this.rebotesFaltantes > 0) return " Faltan " + this.rebotesFaltantes + " rebotes"; | ||
if (this.rebotesFaltantes == 0) return " ¡Ya hice los rebotes necesarios!"; | ||
throw new ActividadError(" ¡Uy! Hice muchos rebotes... ¡Me pasé!"); | ||
} | ||
|
||
fraseAlRebotar(){ | ||
this.rebotesFaltantes--; | ||
return this.getFraseAlRebotar(); | ||
} | ||
|
||
estaResueltoElProblema() { | ||
return this.rebotesFaltantes == 0; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/// <reference path = "EscenaActividad.ts" /> | ||
/// <reference path = "Errores.ts" /> | ||
/// <reference path = "../actores/FondoAnimado.ts"/> | ||
/// <reference path = "../actores/segundoCiclo/Chuy/Chuy.ts"/> | ||
|
||
|
||
/** | ||
* @class SuperMaraton | ||
* | ||
*/ | ||
class SuperMaraton extends EscenaActividad { | ||
fondo; | ||
automata; | ||
|
||
iniciar() { | ||
this.fondo = new FondoAnimado('fondo.superMaraton.png', pilas.derecha(), 0); | ||
this.automata = new Chuy(); | ||
this.automata.y = -70; | ||
|
||
this.automata.totalKM = 15 + Math.round(Math.random() * 30); | ||
this.automata.restantesKM = this.automata.totalKM; | ||
|
||
this.automata.kmsTotales = function(){ | ||
return this.totalKM | ||
}; | ||
|
||
this.crearTablero(); | ||
|
||
this.automata.fraseAlCorrer = function() { | ||
this.restantesKM--; | ||
if (this.restantesKM == 0) return "¡Llegué!"; | ||
if (this.restantesKM == 1) return "¡Falta 1 kilometro!"; | ||
if (this.restantesKM < 0) throw new ActividadError("Ya llegué, ¡no debo seguir corriendo!"); | ||
|
||
return "¡Faltan " + this.restantesKM + " kilometros!"; | ||
} | ||
} | ||
|
||
crearTablero(){ | ||
Trait.toObject(Observado, this.automata); | ||
var tablero = new Tablero(0, 210, { texto: "Kilómetros a recorrer" , atributoObservado: 'kmsTotales'}); | ||
this.automata.registrarObservador(tablero); | ||
} | ||
|
||
estaResueltoElProblema(){ | ||
return this.automata.restantesKM === 0; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.