1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Cleanup first game experience

This commit is contained in:
tobspr
2020-06-01 19:58:36 +02:00
parent d09a593f81
commit 5cd4dba54a
9 changed files with 15 additions and 46 deletions

View File

@@ -375,19 +375,6 @@ export class MainMenuState extends GameState {
this.moveToState("SettingsState");
}
doStartNewGame() {
this.app.analytics.trackUiClick("startgame");
this.app.adProvider.showVideoAd().then(() => {
const savegame = this.app.savegameMgr.createNewSavegame();
this.moveToState("InGameState", {
savegame,
});
this.app.analytics.trackUiClick("startgame_adcomplete");
});
}
onPlayButtonClicked() {
if (
IS_DEMO &&
@@ -399,17 +386,15 @@ export class MainMenuState extends GameState {
return;
}
if (IS_DEMO) {
this.app.analytics.trackUiClick("startgame_pre_show");
const { ok } = this.dialogs.showWarning(
T.dialogs.demoExplanation.title,
T.dialogs.demoExplanation.desc
);
ok.add(() => this.doStartNewGame());
return;
}
this.app.analytics.trackUiClick("startgame");
this.app.adProvider.showVideoAd().then(() => {
const savegame = this.app.savegameMgr.createNewSavegame();
this.doStartNewGame();
this.moveToState("InGameState", {
savegame,
});
this.app.analytics.trackUiClick("startgame_adcomplete");
});
}
onLeave() {