🎬 VIDEO FILES
Lokacija: assets/videos/
📁 KAM DATI MP4 VIDEO:
1. Kopiraj MP4 file sem:
c:\novafarma\assets\videos\
Primeri:
intro.mp4- Intro cutsceneboss_intro.mp4- Boss encounterbackground.mp4- Background looptutorial.mp4- Tutorial video
🎮 KAKO UPORABITI:
1. Preload (v GameScene.js ali PreloadScene.js):
preload() {
this.load.video('intro', 'assets/videos/intro.mp4');
}
2. Play (v create()):
create() {
const video = this.add.video(400, 300, 'intro');
video.play();
}
📝 PRIMERI:
Fullscreen Intro:
const video = this.add.video(
this.cameras.main.centerX,
this.cameras.main.centerY,
'intro'
);
video.setDisplaySize(
this.cameras.main.width,
this.cameras.main.height
);
video.play();
Background Loop:
const bg = this.add.video(0, 0, 'background');
bg.setOrigin(0, 0);
bg.setDisplaySize(800, 600);
bg.setDepth(-1000);
bg.setLoop(true);
bg.play();
Skip on Click:
this.input.on('pointerdown', () => {
video.stop();
this.scene.start('GameScene');
});
⚠️ POMEMBNO:
File Format:
- MP4 (H.264 codec)
- Resolution: 720p ali 1080p
- File size: < 50 MB
Performance:
- Ne uporabljaj preveč video hkrati
- Mobile: Lower resolution
✅ QUICK START:
- Kopiraj MP4 v:
assets/videos/intro.mp4 - Dodaj v code: Glej zgoraj
- Test: Zaženi igro
Mapa je pripravljena! 🎬
Kopiraj MP4 file v:
c:\novafarma\assets\videos\