phaser/resources/docgen/output/Phaser.Physics.json

1 line
6.2 KiB
JSON
Raw Normal View History

{"class":{"name":"Phaser.Physics","extends":"","static":false,"constructor":true,"parameters":[{"name":"game","type":["Phaser.Game"],"help":"A reference to the currently running game.","optional":false,"default":null},{"name":"physicsConfig","type":["object"],"help":"A physics configuration object to pass to the Physics world on creation.","optional":true,"default":"null"}],"help":"The Physics Manager is responsible for looking after all of the running physics systems.\\nPhaser supports 3 physics systems: Arcade Physics, P2 and Ninja Physics (with Box2D and Chipmunk in development)\\nGame Objects can belong to only 1 physics system, but you can have multiple systems active in a single game.\\n\\nFor example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use the\\nfaster (due to being much simpler) Arcade Physics system."},"consts":[],"methods":{"public":[{"name":"destroy","static":false,"returns":null,"help":"Destroys all active physics systems. Usually only called on a Game Shutdown, not on a State swap.","line":304,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"enable","static":false,"returns":null,"help":"This will create a default physics body on the given game object or array of objects.\\nA game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.\\nIt can be for any of the physics systems that have been started:\\n\\nPhaser.Physics.Arcade - A light weight AABB based collision system with basic separation.\\nPhaser.Physics.P2JS - A full-body advanced physics system supporting multiple object shapes, polygon loading, contact materials, springs and constraints.\\nPhaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. Advanced AABB and Circle vs. Tile collision.\\nPhaser.Physics.BOX2D - A port of https:\/\/code.google.com\/p\/box2d-html5\\nPhaser.Physics.CHIPMUNK is still in development.\\n\\nIf you require more control over what type of body is created, for example to create a Ninja Physics Circle instead of the default AABB, then see the\\nindividual physics systems `enable` methods instead of using this generic one.","line":181,"public":true,"protected":false,"private":false,"parameters":[{"name":"object","type":["object","array"],"help":"The game object to create the physics body on. Can also be an array of objects, a body will be created on every object in the array.","optional":false,"default":null},{"name":"system","type":["number"],"help":"The physics system that will be used to create the body. Defaults to Arcade Physics.","optional":true,"default":"Phaser.Physics.ARCADE"},{"name":"debug","type":["boolean"],"help":"Enable the debug drawing for this body. Defaults to false.","optional":true,"default":"false"}],"inherited":false,"inheritedFrom":""},{"name":"parseConfig","static":false,"returns":null,"help":"Parses the Physics Configuration object passed to the Game constructor and starts any physics systems specified within.","line":100,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"startSystem","static":false,"returns":null,"help":"This will create an instance of the requested physics simulation.\\nPhaser.Physics.Arcade is running by default, but all others need activating directly.\\nYou can start the following physics systems:\\nPhaser.Physics.P2JS - A full-body advanced physics system by Stefan Hedman.\\nPhaser.Physics.NINJA - A port of Metanet Softwares N+ physics system.\\nPhaser.Physics.BOX2D and Phaser.Physics.CHIPMUNK are still in development.","line":137,"public":true,"protected":false,"private":false,"parameters":[{"name":"The","type":["number"],"help":" physics system to start.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"protected":[{"name":"clear","static":false,"returns":null,"help":"Clears down all active physics systems. This doesn't destroy them, it just clears them of objects and i