loading screen disclaimer

This commit is contained in:
Matthew Olker 2024-06-04 21:41:36 -04:00
parent 5464f964c9
commit 7c9e5e9f52
10 changed files with 55 additions and 6 deletions

View File

@ -352,14 +352,17 @@ export class LoadingScene extends SceneBase {
const width = this.cameras.main.width;
const height = this.cameras.main.height;
const logo = this.add.image(width / 2, 240, "");
const midWidth = width / 2;
const midHeight = height / 2;
const logo = this.add.image(midWidth, 240, "");
logo.setVisible(false);
logo.setOrigin(0.5, 0.5);
logo.setScale(4);
const percentText = this.make.text({
x: width / 2,
y: height / 2 - 24,
x: midWidth,
y: midHeight - 24,
text: "0%",
style: {
font: "72px emerald",
@ -369,8 +372,8 @@ export class LoadingScene extends SceneBase {
percentText.setOrigin(0.5, 0.5);
const assetText = this.make.text({
x: width / 2,
y: height / 2 + 48,
x: midWidth,
y: midHeight + 48,
text: "",
style: {
font: "48px emerald",
@ -379,6 +382,32 @@ export class LoadingScene extends SceneBase {
});
assetText.setOrigin(0.5, 0.5);
const disclaimerText = this.make.text({
x: midWidth,
y: assetText.y + 152,
text: i18next.t("menu:disclaimer"),
style: {
font: "72px emerald",
color: "#DA3838",
},
});
disclaimerText.setOrigin(0.5, 0.5);
const disclaimerDescriptionText = this.make.text({
x: midWidth,
y: disclaimerText.y + 120,
text: i18next.t("menu:disclaimerDescription"),
style: {
font: "48px emerald",
color: "#ffffff",
align: "center"
},
});
disclaimerDescriptionText.setOrigin(0.5, 0.5);
disclaimerText.setVisible(false);
disclaimerDescriptionText.setVisible(false);
const intro = this.add.video(0, 0);
intro.setOrigin(0, 0);
intro.setScale(3);
@ -388,7 +417,7 @@ export class LoadingScene extends SceneBase {
percentText.setText(`${Math.floor(parsedValue * 100)}%`);
progressBar.clear();
progressBar.fillStyle(0xffffff, 0.8);
progressBar.fillRect(width / 2 - 320, 360, 640 * parsedValue, 64);
progressBar.fillRect(midWidth - 320, 360, 640 * parsedValue, 64);
});
this.load.on("fileprogress", file => {
@ -423,6 +452,8 @@ export class LoadingScene extends SceneBase {
ease: "Sine.easeIn"
});
loadingGraphics.map(g => g.setVisible(true));
disclaimerText.setVisible(true);
disclaimerDescriptionText.setVisible(true);
});
intro.play();
break;

View File

@ -49,4 +49,6 @@ export const menu: SimpleTranslationEntries = {
"empty":"Leer",
"yes":"Ja",
"no":"Nein",
"disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
} as const;

View File

@ -49,4 +49,6 @@ export const menu: SimpleTranslationEntries = {
"empty":"Empty",
"yes":"Yes",
"no":"No",
"disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
} as const;

View File

@ -49,4 +49,6 @@ export const menu: SimpleTranslationEntries = {
"empty":"Vacío",
"yes":"Sí",
"no":"No",
"disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
} as const;

View File

@ -44,4 +44,6 @@ export const menu: SimpleTranslationEntries = {
"empty":"Vide",
"yes":"Oui",
"no":"Non",
"disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
} as const;

View File

@ -49,4 +49,6 @@ export const menu: SimpleTranslationEntries = {
"empty":"Vuoto",
"yes":"Si",
"no":"No",
"disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
} as const;

View File

@ -49,4 +49,6 @@ export const menu: SimpleTranslationEntries = {
"empty":"빈 슬롯",
"yes":"예",
"no":"아니오",
"disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
} as const;

View File

@ -49,4 +49,6 @@ export const menu: SimpleTranslationEntries = {
"empty": "Vazio",
"yes": "Sim",
"no": "Não",
"disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
} as const;

View File

@ -49,4 +49,6 @@ export const menu: SimpleTranslationEntries = {
"empty": "空",
"yes": "是",
"no": "否",
"disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
} as const;

View File

@ -49,4 +49,6 @@ export const menu: SimpleTranslationEntries = {
"empty":"空",
"yes":"是",
"no":"否",
"disclaimer": "DISCLAIMER",
"disclaimerDescription": "This game is an unfinished product; it might have playability issues (including the potential loss of save data),\n change without notice, and may or may not be updated further or completed."
} as const;