Complete Asset Audit JAN 12 2026 - 3477 images cataloged, new asset gallery with all images, DNEVNIK and GAME_BIBLE updated
This commit is contained in:
@@ -258,15 +258,22 @@ class DialogueSystem {
|
||||
|
||||
this.dialogueText.setText('');
|
||||
|
||||
const timer = this.scene.time.addEvent({
|
||||
// Store reference to timer so we can clear it if needed
|
||||
this.typewriterTimer = this.scene.time.addEvent({
|
||||
delay: 30,
|
||||
callback: () => {
|
||||
// SAFETY CHECK: Ensure text object still exists
|
||||
if (!this.dialogueText || !this.dialogueText.active) {
|
||||
if (this.typewriterTimer) this.typewriterTimer.remove();
|
||||
return;
|
||||
}
|
||||
|
||||
if (charIndex < text.length) {
|
||||
displayText += text[charIndex];
|
||||
this.dialogueText.setText(displayText);
|
||||
charIndex++;
|
||||
} else {
|
||||
timer.remove();
|
||||
if (this.typewriterTimer) this.typewriterTimer.remove();
|
||||
}
|
||||
},
|
||||
loop: true
|
||||
@@ -474,6 +481,12 @@ class DialogueSystem {
|
||||
endDialogue() {
|
||||
console.log('💬 Dialogue ended');
|
||||
|
||||
// Stop typewriter effect if running
|
||||
if (this.typewriterTimer) {
|
||||
this.typewriterTimer.remove();
|
||||
this.typewriterTimer = null;
|
||||
}
|
||||
|
||||
// Clean up UI
|
||||
if (this.dialogueContainer) {
|
||||
this.dialogueContainer.destroy();
|
||||
|
||||
Reference in New Issue
Block a user