import Phaser from 'phaser'; import { loadMetaState } from '../run/persistence'; import { createMetaState } from '../run/meta'; export class BootScene extends Phaser.Scene { constructor() { super({ key: 'BootScene' }); } create(): void { const cx = this.cameras.main.centerX; const cy = this.cameras.main.centerY; // Title this.add .text(cx, cy - 40, 'СИНТЕЗ', { fontSize: '64px', color: '#00ff88', fontFamily: 'monospace', fontStyle: 'bold', }) .setOrigin(0.5); // Subtitle this.add .text(cx, cy + 30, 'Наука — это магия, которая работает', { fontSize: '16px', color: '#557755', fontFamily: 'monospace', }) .setOrigin(0.5); // Version this.add .text(cx, cy + 80, 'v0.6.0 — Phase 6: Run Cycle', { fontSize: '12px', color: '#333333', fontFamily: 'monospace', }) .setOrigin(0.5); // Click to start const startText = this.add .text(cx, cy + 120, '[ Click to start ]', { fontSize: '16px', color: '#00ff88', fontFamily: 'monospace', }) .setOrigin(0.5); this.tweens.add({ targets: startText, alpha: 0.3, duration: 1500, yoyo: true, repeat: -1, ease: 'Sine.easeInOut', }); this.input.once('pointerdown', () => { // Load meta-progression from IndexedDB, then go to Cradle loadMetaState() .then(meta => { this.scene.start('CradleScene', { meta }); }) .catch(() => { // Fallback to fresh meta if persistence fails this.scene.start('CradleScene', { meta: createMetaState() }); }); }); } }