new P2(game, config)
This is your main access to the P2 Physics World.
From here you can create materials, listen for events and add bodies into the physics simulation.
Parameters
Name | Type | Argument | Description |
---|---|---|---|
game | Phaser.Game | Reference to the current game instance. | |
config | object | <optional> | Physics configuration object passed in from the game constructor. |
- Source code: physics/p2/World.js (Line 20)
Please login to continue.