feat: CradleScene + UIScene + GameScene cycle integration
Scene integration for the Great Cycle system: - CradleScene: shows "Великий Цикл N: Тема | Ран X/7", narrative quote - UIScene: cycle info bar and run phase display below health - GameScene: world trace spawning (ruins/markers from past runs), trace glow rendering, death position recording, cycle info to registry, biomeId + worldSeed passed to RunState - Scene flow: Fractal → RenewalScene (on 7th run) → Cradle Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -51,6 +51,12 @@ export class UIScene extends Phaser.Scene {
|
||||
// Controls hint
|
||||
private controlsText!: Phaser.GameObjects.Text;
|
||||
|
||||
// Cycle info (top-left, below health)
|
||||
private cycleText!: Phaser.GameObjects.Text;
|
||||
|
||||
// Run phase (top-left, below cycle)
|
||||
private phaseText!: Phaser.GameObjects.Text;
|
||||
|
||||
constructor() {
|
||||
super({ key: 'UIScene' });
|
||||
}
|
||||
@@ -135,6 +141,20 @@ export class UIScene extends Phaser.Scene {
|
||||
});
|
||||
this.invText.setOrigin(1, 1);
|
||||
|
||||
// === Cycle info (top-left, below health bar) ===
|
||||
this.cycleText = this.add.text(12, 32, '', {
|
||||
fontSize: '10px',
|
||||
color: '#446644',
|
||||
fontFamily: 'monospace',
|
||||
});
|
||||
|
||||
// === Run phase (below cycle) ===
|
||||
this.phaseText = this.add.text(12, 46, '', {
|
||||
fontSize: '10px',
|
||||
color: '#557755',
|
||||
fontFamily: 'monospace',
|
||||
});
|
||||
|
||||
// === Controls hint (top-right) ===
|
||||
this.controlsText = this.add.text(w - 12, 12, 'WASD move | E collect | F throw | 1-4 slots | scroll zoom', {
|
||||
fontSize: '10px',
|
||||
@@ -192,5 +212,15 @@ export class UIScene extends Phaser.Scene {
|
||||
|
||||
// === Update inventory ===
|
||||
this.invText.setText(`${Math.round(invWeight)}/${invMaxWeight} AMU | ${invSlots} items`);
|
||||
|
||||
// === Update cycle info ===
|
||||
const cycleNumber = (this.registry.get('cycleNumber') as number) ?? 1;
|
||||
const runInCycle = (this.registry.get('runInCycle') as number) ?? 1;
|
||||
const cycleTheme = (this.registry.get('cycleThemeRu') as string) ?? '';
|
||||
this.cycleText.setText(`Цикл ${cycleNumber}: ${cycleTheme} | Ран ${runInCycle}/7`);
|
||||
|
||||
// === Update run phase ===
|
||||
const runPhaseRu = (this.registry.get('runPhaseRu') as string) ?? '';
|
||||
this.phaseText.setText(runPhaseRu);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user