The namespace containing the main functions of the game engine.
- Source:
Methods
(static) create(config)
Create the game object and initialize the Phaser framework. This function must be called before PP.game.start is executed.
- Source:
Parameters:
Name | Type | Description | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
config |
The object containing the game configuration.
|
Returns:
A game object. The user should not directly manipulate it, but pass it to other functions.
(static) get_physics_fps(scene)
Get the fixed value for the physics FPS. Note: this is only the FPS of the physics engine,
not the rendering engine!
- Source:
Parameters:
Name | Type | Description |
---|---|---|
scene |
object
|
The scene object |
(static) set_physics_fps(scene, fps)
Enforce a fixed value for the physics FPS. Note: this is only the FPS of the physics engine,
not the rendering engine!
- Source:
Parameters:
Name | Type | Description |
---|---|---|
scene |
object
|
The scene object |
fps |
number
|
The FPS to set |
(static) time_delta()
Return the delta time between the current frame and the previous one of
the rendering engine. This value may be averaged with a moving window.
- Source:
(static) time_frame_nr()
Return the number of the current frame starting from 0.
- Source: