phaser/v2-community/resources/docgen/output/Phaser.Physics.json
2016-11-23 00:17:46 +00:00

1 line
No EOL
6.2 KiB
JSON
Executable file

{"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 is called when the State changes.","line":285,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"preUpdate","static":false,"returns":null,"help":"preUpdate checks.","line":211,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"setBoundsToWorld","static":false,"returns":null,"help":"Updates the physics bounds to match the world dimensions.","line":255,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"update","static":false,"returns":null,"help":"Updates all running physics systems.","line":233,"public":false,"protected":true,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""}],"private":[],"static":[]},"properties":{"public":[{"name":"arcade","type":["Phaser.Physics.Arcade"],"help":"","inlineHelp":"The Arcade Physics system.","line":37,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"box2d","type":["Phaser.Physics.Box2D"],"help":"","inlineHelp":"The Box2D Physics system (to be done).","line":52,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"chipmunk","type":["Phaser.Physics.Chipmunk"],"help":"","inlineHelp":"The Chipmunk Physics system (to be done).","line":57,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"config","type":["object"],"help":"","inlineHelp":"The physics configuration object as passed to the game on creation.","line":32,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"game","type":["Phaser.Game"],"help":"","inlineHelp":"Local reference to game.","line":27,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"ninja","type":["Phaser.Physics.Ninja"],"help":"","inlineHelp":"The N+ Ninja Physics System.","line":47,"default":null,"public":true,"protected":false,"private":false,"readOnly":false},{"name":"p2","type":["Phaser.Physics.P2"],"help":"","inlineHelp":"The P2.JS Physics system.","line":42,"default":null,"public":true,"protected":false,"private":false,"readOnly":false}],"protected":[],"private":[]}}