-
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.
- Loading branch information
1 parent
2929e0b
commit 642f0ed
Showing
4 changed files
with
57 additions
and
3 deletions.
There are no files selected for viewing
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,18 @@ | ||
/// <reference path="../../ActorAnimado.ts"/> | ||
class Celular extends ActorAnimado { | ||
static _grilla = 'actor.celular.png' | ||
|
||
constructor() { | ||
super(0, 0, {cantColumnas: 2}); | ||
this.definirAnimacion("cargado", [1], 1); | ||
this.definirAnimacion("descargado", [0], 1); | ||
} | ||
} | ||
|
||
class Cargador extends ActorAnimado { | ||
static _grilla = 'actor.cargador.png' | ||
|
||
constructor() { | ||
super(0, 0, { cantColumnas:1, cantFilas: 1}); | ||
} | ||
} |
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,32 @@ | ||
/// <reference path = "../../node_modules/pilasweb/dist/pilasweb.d.ts"/> | ||
/// <reference path = "Encender.ts" /> | ||
|
||
class CargarCelular extends Encender { | ||
|
||
public nombreAnimacion(): String { | ||
return "usarCelu" | ||
} | ||
|
||
public nombreProximaAnimacion(): string { | ||
return "cargado" | ||
} | ||
|
||
configurarVerificaciones() { | ||
super.configurarVerificaciones() | ||
|
||
const escena = pilas.escena_actual() | ||
|
||
this.verificacionesPre.push(new Verificacion(() => escena.noHayCargadores(), | ||
'¡Todavía no recogí el cargador!')) | ||
|
||
} | ||
|
||
postAnimacion() { | ||
super.postAnimacion() | ||
if (pilas.escena_actual().celularesCargados()) { | ||
pilas.escena_actual().estado = new Estado(() => | ||
true | ||
) | ||
} | ||
} | ||
} |
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