49 lines
1.4 KiB
JavaScript
49 lines
1.4 KiB
JavaScript
// Game Scene - Glavna igralna scena
|
|
class GameScene extends Phaser.Scene {
|
|
constructor() {
|
|
super({ key: 'GameScene' });
|
|
}
|
|
|
|
create() {
|
|
console.log('🎮 GameScene: Initialized!');
|
|
window.gameState.currentScene = 'GameScene';
|
|
|
|
const width = this.cameras.main.width;
|
|
const height = this.cameras.main.height;
|
|
|
|
// Testno besedilo - potrditev da scena deluje
|
|
const testText = this.add.text(width / 2, height / 2, 'FAZA 0: Setup Complete!\n\nGame Scene Active', {
|
|
fontFamily: 'Courier New',
|
|
fontSize: '32px',
|
|
fill: '#00ff41',
|
|
align: 'center'
|
|
});
|
|
testText.setOrigin(0.5);
|
|
|
|
// Debug info
|
|
const debugText = this.add.text(10, 10, 'FAZA 0 TEST\nElectron + Phaser OK', {
|
|
fontFamily: 'Courier New',
|
|
fontSize: '14px',
|
|
fill: '#ffffff',
|
|
backgroundColor: '#000000',
|
|
padding: { x: 10, y: 5 }
|
|
});
|
|
|
|
// FPS counter
|
|
this.fpsText = this.add.text(10, height - 30, 'FPS: 60', {
|
|
fontFamily: 'Courier New',
|
|
fontSize: '14px',
|
|
fill: '#00ff41'
|
|
});
|
|
|
|
console.log('✅ Faza 0 setup complete - ready for manual testing!');
|
|
}
|
|
|
|
update() {
|
|
// Update FPS
|
|
if (this.fpsText) {
|
|
this.fpsText.setText(`FPS: ${Math.round(this.game.loop.actualFps)}`);
|
|
}
|
|
}
|
|
}
|