Skip to content

Commit

Permalink
capy solo
Browse files Browse the repository at this point in the history
  • Loading branch information
tfloxolodeiro committed Oct 3, 2023
1 parent cad8177 commit e11c368
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 2 deletions.
14 changes: 14 additions & 0 deletions src/actores/segundoCiclo/Capy/CapySolo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// <reference path="../../ActorAnimado.ts"/>
/// <reference path="../../../comportamientos/ComportamientoAnimado.ts"/>e

class CapySolo extends ActorAnimado {
static _grilla = 'actor.capySolo.png'

constructor() {
super(0,0,{cantColumnas: 10, cantFilas: 12});
this.definirAnimacion("parado", [52,52,52,52,52,52,52,52,52,52,52,51,50,49,49,50,51,52], 5, true);
this.definirAnimacion("correr", [21, 22, 23, 24, 25, 26, 27, 28, 26, 25, 24, 23, 22, 21], 20);
this.definirAnimacion("subirPajarito", [0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 20, 20], 20);
this.definirAnimacion("error", [52], 6);
}
}
11 changes: 11 additions & 0 deletions src/actores/segundoCiclo/Capy/Guyra.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/// <reference path="../../ActorAnimado.ts"/>

class Guyra extends ActorAnimado {
static _grilla = 'actor.guyra.png'

constructor() {
super(0, 0, {cantColumnas: 1, cantFilas: 5});
this.definirAnimacion("parado",new Cuadros(3).repetirVeces(12).concat([0,1,2,2,2,2,2,2,2]),3,true);
this.definirAnimacion("desaparecer",[4],1);
}
}
Binary file modified src/assets/actor.capySolo.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 src/assets/actor.guyra.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions src/comportamientos/SubirPajarito.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/// <reference path = "Interactuar.ts" />
/// <reference path = "../actores/segundoCiclo/Capy/Lata.ts" />

class SubirPajarito extends Interactuar {

protected alInteractuar(): void {
super.alInteractuar()
this.interactuado().eliminar()
}

objetoInteractuado(): any {
return this.interactuado()
}

etiqueta(): string {
return "Guyra"
}

animacionInteractuadoMientras(): string {
return "desaparecer"
}

public nombreAnimacion(): String {
return "subirPajarito"
}
}
4 changes: 2 additions & 2 deletions src/escenas/libroPrimaria/EscenaCapy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
class EscenaCapy extends EscenaDesdeMapa {
automata: Capy;

static clasesDeActoresInvolucrados(): typeof ActorAnimado[] {
clasesDeActoresInvolucrados(): typeof ActorAnimado[] {
return [Capy, Tacho, Lata, Papel];
};

static pathFondo(): string {
return 'fondo.capy.png';
}

static imagenesAdicionales(): string[] {
imagenesAdicionales(): string[] {
return Casilla.imagenesPara('capy').concat(Obstaculo.imagenesPara('capy'));
}

Expand Down
26 changes: 26 additions & 0 deletions src/escenas/libroPrimaria/EscenaCapySolo.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/// <reference path = "../libroPrimaria/EscenaDesdeMapa.ts" />


class EscenaCapySolo extends EscenaCapy {

automata: CapySolo;

clasesDeActoresInvolucrados(): typeof ActorAnimado[] {
return super.clasesDeActoresInvolucrados().concat([CapySolo, Guyra])
};

obtenerAutomata(): CapySolo {
return new CapySolo();
}

estaResueltoElProblema(): boolean {
return super.estaResueltoElProblema() && this.noHay("Guyra")
}

mapearIdentificadorAActor(id: string, nroFila: number, nroColumna: number): ActorAnimado {
if (id === 'G') return new Guyra()

return super.mapearIdentificadorAActor(id,nroFila,nroColumna)
}

}

0 comments on commit e11c368

Please sign in to comment.