new GameLoop(p_config)
Parameters:
| Name | Type | Description | |||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
p_config |
Object |
Properties
|
- Source:
Members
-
<static> CONTINUE :string
-
The action to continue the game loop.
Type:
- string
- Source:
-
<static> EVENT_CONTINUED :string
-
The name of the event
GameLoop.EVENT_CONTINUED.Type:
- string
- Source:
-
<static> EVENT_PAUSED :string
-
The name of the event
GameLoop.EVENT_PAUSED.Type:
- string
- Source:
-
<static> EVENT_RUNNING :string
-
The name of the event
GameLoop.EVENT_RUNNING.Type:
- string
- Source:
-
<static> EVENT_STARTED :string
-
The name of the event
GameLoop.EVENT_STARTED.Type:
- string
- Source:
-
<static> EVENT_STOPPED :string
-
The name of the event
GameLoop.EVENT_STOPPED.Type:
- string
- Source:
-
<static> PAUSE :string
-
The action to pause the game loop.
Type:
- string
- Source:
-
<static> PAUSED :string
-
The state of the game loop when the game loop has been paused by means of the method
pause.Type:
- string
- Source:
-
<static> RUNNING :string
-
The state of the game loop when the game loop has been started or continued by means one of the methods
startandcontinue.Type:
- string
- Source:
-
<static> START :string
-
The action to start the game.
Type:
- string
- Source:
-
<static> STOP :string
-
The action to stop the game loop.
Type:
- string
- Source:
-
<static> STOPPED :string
-
The state of the game loop when the game loop has been stopped by means of the method
stop. This is the default state, after the game loop has been initialized.Type:
- string
- Source:
-
<static> TOGGLE_PAUSE_CONTINUE :string
-
The action to toggle between the states
GameLoop.PAUSEDandGameLoop.RUNNING.Type:
- string
- Source:
-
<static> TOGGLE_START_STOP :string
-
The action to toggle between the states
GameLoop.RUNNINGandGameLoop.STOPPED.Type:
- string
- Source:
-
state :string
-
The current state of the game loop.
Type:
- string
- Source:
Methods
-
continue()
-
Method to continue the game loop. A call of this method has only an effect, if the current state of the game loop is
GameLoop.PAUSED.- Source:
-
panicDefault()
-
The default panic function. It pauses the game loop.
- Source:
-
pause()
-
Method to pause the game loop. A call of this method has only an effect, if the current state of the game loop is
GameLoop.RUNNING.- Source:
-
start()
-
Method to start the game loop. A call of this method has only an effect, if the current state of the game loop is
GameLoop.STOPPED.- Source:
-
stop()
-
Method to stop the game loop. A call of this method has only an effect if the current state of the game loop is not already
GameLoop.STOPPED.- Source:
-
togglePauseContinue()
-
Method to toggle between the states
GameLoop.PAUSEDandGameLoop.RUNNING.- Source:
-
toggleStartStop()
-
Method to toggle between the states
GameLoop.RUNNINGandGameLoop.STOPPED.- Source: