addPhaserPolygon(key, object) → {Array}
Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body.
The shape data format is based on the output of the
custom phaser exporter for
PhysicsEditor
Parameters
Name | Type | Description |
---|---|---|
key | string | The key of the Physics Data file as stored in Game.Cache. |
object | string | The key of the object within the Physics data file that you wish to load the shape data from. |
Returns
Array -
A list of created fixtures to be used with Phaser.Physics.P2.FixtureList
- Source code: physics/p2/Body.js (Line 1310)
Please login to continue.