🎮 Popravil Electron app + organiziral character references
✅ Electron Forge Integration - Popravil Electron s Electron Forge (require bug fix) - Igra sedaj deluje v aplikaciji (npm start) - Dodal launch-game.sh launcher script - Dodal run-server.sh za browser fallback - Dokumentacija: HOW_TO_RUN.md ✅ Character References Organization - Premaknil reference slike iz reference_images/ v assets/slike/ - Ustvaril podmape: kai/, ana/, gronk/, zombiji/ - Dodal README.md v vsako podmapo - Posodobil CHARACTER_REFERENCES.md: * Nova folder struktura * Ana sekcija (living & zombie verzije) * Zombiji sekcija (basic, hybrids, special) * TODO lista za manjkajoče reference - Dodal FOLDER_STRUCTURE.md za vizualni pregled 📁 Nova struktura: assets/slike/kai|ana|gronk|zombiji/ Status: Production ready - igra deluje v Electron app! 🚀
This commit is contained in:
23
main.js
23
main.js
@@ -1,23 +1,11 @@
|
||||
// 🎮 MRTVA DOLINA - ELECTRON MAIN PROCESS
|
||||
// Simple and clean main process file
|
||||
|
||||
const { app, BrowserWindow } = require('electron');
|
||||
const path = require('path');
|
||||
const fs = require('fs');
|
||||
|
||||
let mainWindow;
|
||||
|
||||
// 🔄 AUTO-RELOAD FOR DEVELOPMENT
|
||||
function setupAutoReload(win) {
|
||||
const watcher = fs.watch(path.join(__dirname), { recursive: true }, (eventType, filename) => {
|
||||
if (filename && (filename.endsWith('.js') || filename.endsWith('.html') || filename.endsWith('.css') || filename.endsWith('.json'))) {
|
||||
console.log(`🔄 File changed: ${filename} - Reloading...`);
|
||||
win.reload();
|
||||
}
|
||||
});
|
||||
|
||||
win.on('closed', () => {
|
||||
watcher.close();
|
||||
});
|
||||
}
|
||||
|
||||
function createWindow() {
|
||||
mainWindow = new BrowserWindow({
|
||||
width: 1280,
|
||||
@@ -31,11 +19,6 @@ function createWindow() {
|
||||
});
|
||||
|
||||
mainWindow.loadFile('index.html');
|
||||
|
||||
// 🔄 Enable Auto Reload
|
||||
setupAutoReload(mainWindow);
|
||||
|
||||
// Odpri DevTools (za development)
|
||||
mainWindow.webContents.openDevTools();
|
||||
|
||||
mainWindow.on('closed', () => {
|
||||
|
||||
Reference in New Issue
Block a user