class StoryScene extends Phaser.Scene { constructor() { super({ key: 'StoryScene' }); } create() { const width = this.cameras.main.width; const height = this.cameras.main.height; // Black background this.add.rectangle(0, 0, width, height, 0x000000).setOrigin(0); const storyText = `LETO 2084. SVET JE PADEL V TEMO. Virus je večino spremenil v pošasti. Mesta so grobnice. Toda našel si upanje. Zapuščeno kmetijo na robu divjine. Zadnje varno zatočišče. Tvoja naloga: 1. Obnovi kmetijo in preživi. 2. Zgradi obrambo pred hordo. 3. Najdi zdravilo in reši svet. Pripravi se... NOČ PRIHAJA.`; const textObj = this.add.text(width / 2, height, storyText, { fontFamily: 'Courier New', fontSize: '28px', fill: '#00ff41', align: 'center', lineSpacing: 15, stroke: '#000000', strokeThickness: 4 }); textObj.setOrigin(0.5, 0); // Scroll animation this.tweens.add({ targets: textObj, y: 50, duration: 15000, // 15s scroll ease: 'Linear', onComplete: () => { this.time.delayedCall(2000, () => { this.scene.start('GameScene'); }); } }); // Skip instructions const skip = this.add.text(width - 20, height - 20, '[SPACE] Skip', { fontSize: '16px', fill: '#666' }).setOrigin(1); // Input to skip this.input.keyboard.on('keydown-SPACE', () => { this.scene.start('GameScene'); }); this.input.on('pointerdown', () => { this.scene.start('GameScene'); }); } }