🔧 Jan 8 Fix EnhancedPrologueScene Syntax Error
❌ BUG FIX: - Line 131: Comment and code on same line - Wrong indentation in flyoverVoice.once callback - Caused: SyntaxError: Unexpected token '}' ✅ SOLUTION: - Separated comment to own line - Fixed indentation (4 spaces) - Node syntax check passes ✅ Game now loads without errors!
This commit is contained in:
@@ -128,12 +128,13 @@ class EnhancedPrologueScene extends Phaser.Scene {
|
|||||||
this.showSubtitle("The Valley of Death is not just a place. It's a memory that no one wants to have anymore.");
|
this.showSubtitle("The Valley of Death is not just a place. It's a memory that no one wants to have anymore.");
|
||||||
});
|
});
|
||||||
|
|
||||||
// After flyover, go to awakening flyoverVoice.once('complete', () => {
|
// After flyover, go to awakening
|
||||||
|
flyoverVoice.once('complete', () => {
|
||||||
this.time.delayedCall(1000, () => this.phase3_Awakening());
|
this.time.delayedCall(1000, () => this.phase3_Awakening());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
phase3_Awakening() {
|
phase3_Awakening() {
|
||||||
console.log('🎬 Phase 3: Kai Awakens');
|
console.log('🎬 Phase 3: Kai Awakens');
|
||||||
|
|
||||||
// PHASE 3: Awakening (1:00 - 1:30)
|
// PHASE 3: Awakening (1:00 - 1:30)
|
||||||
@@ -184,9 +185,9 @@ phase3_Awakening() {
|
|||||||
this.time.delayedCall(1500, () => this.phase4_IDCard());
|
this.time.delayedCall(1500, () => this.phase4_IDCard());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
phase4_IDCard() {
|
phase4_IDCard() {
|
||||||
console.log('🎬 Phase 4: ID Card Discovery');
|
console.log('🎬 Phase 4: ID Card Discovery');
|
||||||
|
|
||||||
// PHASE 4: ID Card (1:30 - 2:30)
|
// PHASE 4: ID Card (1:30 - 2:30)
|
||||||
@@ -247,9 +248,9 @@ phase4_IDCard() {
|
|||||||
this.time.delayedCall(1000, () => this.phase5_Determination());
|
this.time.delayedCall(1000, () => this.phase5_Determination());
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
phase5_Determination() {
|
phase5_Determination() {
|
||||||
console.log('🎬 Phase 5: Determination + Quest');
|
console.log('🎬 Phase 5: Determination + Quest');
|
||||||
|
|
||||||
// PHASE 5: Determination (2:30 - 3:00)
|
// PHASE 5: Determination (2:30 - 3:00)
|
||||||
@@ -274,9 +275,9 @@ phase5_Determination() {
|
|||||||
// Fade to game after 3s
|
// Fade to game after 3s
|
||||||
this.time.delayedCall(3000, () => this.endIntro());
|
this.time.delayedCall(3000, () => this.endIntro());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
showQuestNotification() {
|
showQuestNotification() {
|
||||||
const { width, height } = this.cameras.main;
|
const { width, height } = this.cameras.main;
|
||||||
|
|
||||||
// Quest panel
|
// Quest panel
|
||||||
@@ -308,32 +309,32 @@ showQuestNotification() {
|
|||||||
duration: 800,
|
duration: 800,
|
||||||
ease: 'Back.easeOut'
|
ease: 'Back.easeOut'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
showSubtitle(text) {
|
showSubtitle(text) {
|
||||||
this.subtitleText.setText(text);
|
this.subtitleText.setText(text);
|
||||||
this.tweens.add({
|
this.tweens.add({
|
||||||
targets: this.subtitleText,
|
targets: this.subtitleText,
|
||||||
alpha: 1,
|
alpha: 1,
|
||||||
duration: 500
|
duration: 500
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
clearSubtitle() {
|
clearSubtitle() {
|
||||||
this.tweens.add({
|
this.tweens.add({
|
||||||
targets: this.subtitleText,
|
targets: this.subtitleText,
|
||||||
alpha: 0,
|
alpha: 0,
|
||||||
duration: 500,
|
duration: 500,
|
||||||
onComplete: () => this.subtitleText.setText('')
|
onComplete: () => this.subtitleText.setText('')
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
skipIntro() {
|
skipIntro() {
|
||||||
console.log('⏭️ Skipping intro...');
|
console.log('⏭️ Skipping intro...');
|
||||||
this.endIntro();
|
this.endIntro();
|
||||||
}
|
}
|
||||||
|
|
||||||
endIntro() {
|
endIntro() {
|
||||||
console.log('🎬 Intro complete! Launching GameScene...');
|
console.log('🎬 Intro complete! Launching GameScene...');
|
||||||
|
|
||||||
// Fade out music
|
// Fade out music
|
||||||
@@ -350,5 +351,5 @@ endIntro() {
|
|||||||
this.cameras.main.once('camerafadeoutcomplete', () => {
|
this.cameras.main.once('camerafadeoutcomplete', () => {
|
||||||
this.scene.start('GameScene');
|
this.scene.start('GameScene');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user