MainMenuState
Extends:
Constructor Summary
| Public Constructor | ||
| public |
|
|
Member Summary
| Public Members | ||
| public |
dialogs: * |
|
| public get |
savedGames: * |
|
| public |
videoElement: * |
|
Method Summary
| Public Methods | ||
| public |
deleteGame(game: SavegameMetadata) |
|
| public |
downloadGame(game: SavegameMetadata) |
|
| public |
getExtraTopButtons(): * |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
onEnter(payload: *) |
|
| public |
|
|
| public |
|
|
| public |
onLeave() |
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
|
|
| public |
Asks the user to import a savegame |
|
| public |
requestRenameSavegame(game: SavegameMetadata) |
|
| public |
resumeGame(game: SavegameMetadata) |
|
| public |
Shows a hint that the slot limit has been reached |
|
Inherited Summary
| From class GameState | ||
| public |
|
|
| public |
asyncChannel: * |
|
| public |
|
|
| public |
|
|
| public |
htmlElement: * |
|
| public |
|
|
| public |
key: * |
|
| public |
|
|
| public |
Cancels all promises on the api as well as our async channel |
|
| public |
getDivElement(): HTMLElement Returns the html element of the state |
|
| public |
Should return whether to fade in the game state. |
|
| public |
Should return whether to fade out the game state. |
|
| public |
Returns if the state has an unload confirmation, this is the "Are you sure you want to leave the page" message. |
|
| public |
Should return how many mulliseconds to fade in / out the state. |
|
| public |
Should return the html code of the state. |
|
| public |
Returns the states key |
|
| public |
Returns if this state should get paused if it does not have focus |
|
| public |
getThemeMusic(): string | null Should return the theme music for this state |
|
| public |
Cleans up all click detectors |
|
| public |
internalEnterCallback(payload: any, callCallback: boolean) Internal callback when entering the state. |
|
| public |
Internal method to compute the time to fade in / out |
|
| public |
Internal method to get the HTML of the game state. |
|
| public |
Internal callback when the state is left. |
|
| public |
Internal app pause callback |
|
| public |
Internal app resume callback |
|
| public |
Internal callback before the state is left. |
|
| public |
internalRegisterCallback(stateManager: StateManager) Internal callback from the manager. |
|
| public |
moveToState(stateKey: string) Transfers to a new state |
|
| public |
Callback when the app got paused (on android, this means in background) |
|
| public |
Callback when the app got resumed (on android, this means in foreground again) |
|
| public |
Internal backbutton handler, called when the hardware back button is pressed or the escape key is pressed |
|
| public |
onBackgroundTick(dt: number) Background tick callback, called while the game is inactiev |
|
| public |
Callback before leaving the game state or when the page is unloaded |
|
| public |
onEnter(payload: any) Callback when entering the state, to be overriddemn |
|
| public |
onLeave() Callback when leaving the state |
|
| public |
Render callback |
|
| public |
Called when the screen resized |
|
| public |
trackClicks(element: Element, handler: function(): void, args: import("./click_detector").ClickDetectorConstructorArgs=) Tracks clicks on a given element and calls the given callback on this state. |
|
| public |
watchAdAndMoveToState(nextStateId: string, nextStatePayload: object=) |
|
Public Constructors
Public Members
public dialogs: * source
public get savedGames: * source
public videoElement: * source
Public Methods
public deleteGame(game: SavegameMetadata) source
Params:
| Name | Type | Attribute | Description |
| game | SavegameMetadata |
public downloadGame(game: SavegameMetadata) source
Params:
| Name | Type | Attribute | Description |
| game | SavegameMetadata |
public getInnerHTML(): string source
Should return the html code of the state.
Override:
GameState#getInnerHTMLpublic onBackButton() source
Internal backbutton handler, called when the hardware back button is pressed or the escape key is pressed
Override:
GameState#onBackButtonpublic onChangelogClicked() source
public onContinueButtonClicked() source
public onEnter(payload: *) source
Callback when entering the state, to be overriddemn
Override:
GameState#onEnterParams:
| Name | Type | Attribute | Description |
| payload | * |
public onExitAppButtonClicked() source
public onLanguageChooseClicked() source
public onPlayButtonClicked() source
public onRedditClicked() source
public onSettingsButtonClicked() source
public onTranslationHelpLinkClicked() source
public renderMainMenu() source
public renderSavegames() source
public requestRenameSavegame(game: SavegameMetadata) source
Params:
| Name | Type | Attribute | Description |
| game | SavegameMetadata |
public resumeGame(game: SavegameMetadata) source
Params:
| Name | Type | Attribute | Description |
| game | SavegameMetadata |
