mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Compare commits
9 Commits
e143dd85da
...
95c5173965
Author | SHA1 | Date | |
---|---|---|---|
|
95c5173965 | ||
|
b7635f42c5 | ||
|
a174b52135 | ||
|
e32e425655 | ||
|
b49fd7e855 | ||
|
10f87973af | ||
|
cc1716355e | ||
|
0435aa6e5e | ||
|
9983ccfd18 |
13
src/main.ts
13
src/main.ts
@ -42,8 +42,10 @@ Phaser.GameObjects.Rectangle.prototype.setPositionRelative = setPositionRelative
|
||||
document.fonts.load("16px emerald").then(() => document.fonts.load("10px pkmnems"));
|
||||
// biome-ignore lint/suspicious/noImplicitAnyLet: TODO
|
||||
let game;
|
||||
// biome-ignore lint/suspicious/noImplicitAnyLet: TODO
|
||||
let manifest;
|
||||
|
||||
const startGame = async (manifest?: any) => {
|
||||
const startGame = async () => {
|
||||
await initI18n();
|
||||
const LoadingScene = (await import("./loading-scene")).LoadingScene;
|
||||
const BattleScene = (await import("./battle-scene")).default;
|
||||
@ -107,10 +109,13 @@ const startGame = async (manifest?: any) => {
|
||||
fetch("/manifest.json")
|
||||
.then(res => res.json())
|
||||
.then(jsonResponse => {
|
||||
startGame(jsonResponse.manifest);
|
||||
manifest = jsonResponse.manifest;
|
||||
})
|
||||
.catch(() => {
|
||||
// Manifest not found (likely local build)
|
||||
.catch(err => {
|
||||
// Manifest not found (likely local build or path error on live)
|
||||
console.log(`Manifest not found. ${err}`);
|
||||
})
|
||||
.finally(() => {
|
||||
startGame();
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user