parent
5d82fa2cb2
commit
5d9a60571f
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>I Love X Engine</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1>I Love X Engine (Electron)</h1>
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -0,0 +1,20 @@
|
|||||||
|
const { app, BrowserWindow } = require('electron');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
function createWindow() {
|
||||||
|
const win = new BrowserWindow({
|
||||||
|
width: 1024,
|
||||||
|
height: 768,
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
contextIsolation: false,
|
||||||
|
}
|
||||||
|
});
|
||||||
|
win.loadFile('index.html');
|
||||||
|
}
|
||||||
|
|
||||||
|
app.whenReady().then(createWindow);
|
||||||
|
|
||||||
|
app.on('window-all-closed', () => {
|
||||||
|
if (process.platform !== 'darwin') app.quit();
|
||||||
|
});
|
@ -1,26 +0,0 @@
|
|||||||
const ConfigLoader = require('./core/config-loader');
|
|
||||||
const AssetManager = require('./core/asset-manager');
|
|
||||||
const EventBus = require('./core/event-bus');
|
|
||||||
const GameLoop = require('./core/game-loop');
|
|
||||||
|
|
||||||
// Config pad kan via argumenten komen, standaard default.json
|
|
||||||
const configPath = process.argv[2] || '../configs/default.json';
|
|
||||||
const config = ConfigLoader.load(configPath);
|
|
||||||
|
|
||||||
const assetManager = new AssetManager(config.assetsDir || '../assets/default');
|
|
||||||
assetManager.loadAssets();
|
|
||||||
|
|
||||||
const eventBus = new EventBus();
|
|
||||||
|
|
||||||
const gameLoop = new GameLoop({
|
|
||||||
onUpdate: () => {
|
|
||||||
// Hier komt de game logica per tick
|
|
||||||
console.log('Game update');
|
|
||||||
},
|
|
||||||
onEnd: () => {
|
|
||||||
console.log('Game ended');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
console.log('Engine gestart met config:', configPath);
|
|
||||||
gameLoop.start();
|
|
Loading…
Reference in new issue