Pre-release
AdventureJS Docs Downloads Bundler Devlog
Score: 0 Moves: 0

Class:RestartManager

Defined in: Adventure/RestartManager.js, line 6

Description

RestartManager manages the job of restarting games. It contains all the methods needed to create the Restart pop-up screen.

RestartManager is created automatically by Game. This is an internal class that authors should not need to construct or modify. However, if you'd like to try, you can find styles for the Restart pop-up in adventurejs.css. All relevant styles are prefixed with '.restart_'.

Private Constructor:

var foo = new AdventureJS.RestartManager(game)

Parameters:

  • game Game
    A reference to the game instance.
Inherited Overrides

Methods Collapse all  |  Expand all

clickRestart
clickRestart()

Defined in: Adventure/RestartManager.js, line 189

Restart.
closeDialog
closeDialog()

Defined in: Adventure/RestartManager.js, line 138

Close the Restart modal dialog.
openDialog
openDialog()

Defined in: Adventure/RestartManager.js, line 105

Open the Restart modal dialog.
set
set(props) → {AdventureJS.RestartManager}

Defined in: Adventure/RestartManager.js, line 199

Parameters:

  • props Object
    A generic object containing properties to copy to the DisplayObject instance.
Provides a chainable shortcut method for setting a number of properties on the instance.

Returns:

AdventureJS.RestartManager Returns the instance the method is called on (useful for chaining calls.)

Properties  | 

game
game :Object

Defined in: Adventure/RestartManager.js, line 29

Default value: {}

A reference back to the main Game object.
restart_dialog
restart_dialog :HTMLElement

Defined in: Adventure/RestartManager.js, line 36

Default value: {}

Div element to contain the Restart dialog.