import * as PREQUEL from "./scenes/prequel.js" import * as GAME from "./scenes/game.js" export const SCENES = { PREQUEL: "prequel", GAME: "game", } export const SCENE = { load: loadScene, update: null, draw: null, } let currentScene function loadScene(scene) { currentScene = scene if (currentScene == SCENES.PREQUEL) { PREQUEL.start() SCENE.update = PREQUEL.update SCENE.draw = PREQUEL.draw } if (currentScene == SCENES.GAME) { GAME.start() SCENE.update = GAME.update SCENE.draw = GAME.draw } }