Fixed bundle bug.

This commit is contained in:
YourWishes committed 2021-09-25 21:42:43 -07:00
1 parent 631c3a78b1
commit 029a4fccec
4 files changed
+44 -47

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
export abstract class Game {
constructor() {
}
init() {
print("init");
}
update() {
print("update");
}
dispose() {
print("Disposed");
}
}
let GAME_MAIN:Game|null = null;
export const gameSetMain = (game:Game) => {
print("setting", game);
GAME_MAIN = game;
}
const init = () => {
if(!GAME_MAIN) return;
GAME_MAIN.init();
}
const update = () => {
if(!GAME_MAIN) return;
GAME_MAIN.update();
}
const dispose = () => {
if(!GAME_MAIN) return;
GAME_MAIN.dispose();
}