-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creando el actor puntaje, vinculando evento para detectar clicks en l…
…a pantalla y otros arreglos generales.
- Loading branch information
1 parent
91b1692
commit ca45dfe
Showing
17 changed files
with
221 additions
and
113 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
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,26 @@ | ||
class puntaje extends ActorTextoBase { | ||
propiedades = { | ||
imagen: "imagenes:basicos/invisible", | ||
texto: "PUNTAJE: 0", | ||
color: "white", | ||
es_texto: true, | ||
z: -10 | ||
}; | ||
puntaje: number = 0; | ||
|
||
iniciar() { | ||
this._texto.setFontSize(20); | ||
this._texto.setStroke("#fff", 1); | ||
this._texto.setShadow(1, 1, "#333333", 2, true, true); | ||
this.actualizar_texto(); | ||
} | ||
|
||
aumentar(cantidad: number = 1) { | ||
this.puntaje += cantidad; | ||
this.actualizar_texto(); | ||
} | ||
|
||
actualizar_texto() { | ||
this.texto = `PUNTAJE: ${this.puntaje}`; | ||
} | ||
} |
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
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.