mirror of
https://git.leinelab.org/Mal/mr-crocs-adventures.git
synced 2025-09-11 02:57:36 +02:00
Tilorswift levels can now be loaded into the running game
This commit is contained in:
@@ -2,9 +2,10 @@ import TextAlignment from "./TextAlignment.js";
|
||||
|
||||
export default class TextLine
|
||||
{
|
||||
constructor(text)
|
||||
constructor(text, paused)
|
||||
{
|
||||
this.text = text;
|
||||
this.paused = paused;
|
||||
this.estimatedTextWidth = null;
|
||||
this.colorText = 'red';
|
||||
this.colorShadow = 'black';
|
||||
@@ -24,6 +25,10 @@ export default class TextLine
|
||||
|
||||
let process = setInterval(
|
||||
() => {
|
||||
if (this.paused) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.chars++;
|
||||
|
||||
if (this.chars === this.text.length) {
|
||||
@@ -83,4 +88,4 @@ export default class TextLine
|
||||
context.fillText(this.text.substr(0, this.chars), x + 2, y + this.size + 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user