Global

Members

sounds

Json array with all the sounds.
Source:

Methods

checkMobileDevice()

Checks if the device is a mobile device and adjusts the UI accordingly.
Source:

checkOrientation()

Checks the orientation of the device and adjusts the UI accordingly.
Source:

clearAllGameIntervals()

Clears all intervals in the game.
Source:

hideRestartGameElements()

Hides game-related UI elements.
Source:

hideToTheMenuElements()

Hides game-related UI elements.
Source:

init()

Initializes the game.
Source:

isMobileDevice() → {boolean}

Checks if the device is a mobile device.
Source:
Returns:
True if the device is a mobile device, false otherwise.
Type
boolean

lostGame()

Handles the game over scenario.
Source:

lostGameSound()

Plays and Stop the sound for losing the game.
Source:

muteSounds()

Mute sound and save the status in localStorage.
Source:

playSound(category)

Play sound if it is not already playing.
Parameters:
Name Type Description
category string Category of the sound in json array.
Source:

playWinSounds()

Plays the sounds for winning the game.
Source:

restartGame()

Restarts the game.
Source:

restoreSoundButtonState()

Restore the mute status and button state from localStorage.
Source:

returnMenu()

Returns to the main menu.
Source:

showCanvasScreen()

Switches to the canvas screen and hides the start screen.
Source:

showImpressum()

Shows the impressum menu.
Source:

showStartScreen()

Switches to the start screen and hides the canvas screen.
Source:

showSteering()

Shows the steering menu.
Source:

soundButton()

Button for muting the sound in the canvas.
Source:

startGame()

Starts the game.
Source:

stopGameSoundsMenu()

Stops all game sounds for the Menu.
Source:

stopSound(category)

Stop sound if it is playing.
Parameters:
Name Type Description
category string Category of the sound in json array.
Source:

totheMenu()

Handles the transition to the menu.
Source:

unmuteSounds()

Unmute sound and save the status in localStorage.
Source:

winGame()

Handles the game win scenario.
Source: