phaser/v2/resources/docgen/output/Phaser.Physics.Ninja.Body.json

1 line
14 KiB
JSON
Raw Normal View History

{"class":{"name":"Phaser.Physics.Ninja.Body","extends":"","static":false,"constructor":true,"parameters":[{"name":"system","type":["Phaser.Physics.Ninja"],"help":"The physics system this Body belongs to.","optional":false,"default":null},{"name":"sprite","type":["Phaser.Sprite"],"help":"The Sprite object this physics body belongs to.","optional":false,"default":null},{"name":"type","type":["number"],"help":"The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile.","optional":true,"default":"1"},{"name":"id","type":["number"],"help":"If this body is using a Tile shape, you can set the Tile id here, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc.","optional":true,"default":"1"},{"name":"radius","type":["number"],"help":"If this body is using a Circle shape this controls the radius.","optional":true,"default":"16"},{"name":"x","type":["number"],"help":"The x coordinate of this Body. This is only used if a sprite is not provided.","optional":true,"default":"0"},{"name":"y","type":["number"],"help":"The y coordinate of this Body. This is only used if a sprite is not provided.","optional":true,"default":"0"},{"name":"width","type":["number"],"help":"The width of this Body. This is only used if a sprite is not provided.","optional":true,"default":"0"},{"name":"height","type":["number"],"help":"The height of this Body. This is only used if a sprite is not provided.","optional":true,"default":"0"}],"help":"The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than\\nthe Sprite itself. For example you can set the velocity, bounce values etc all on the Body."},"consts":[],"methods":{"public":[{"name":"deltaAbsX","static":false,"returns":{"types":["number"],"help":"The absolute delta value."},"help":"Returns the absolute delta x value.","line":387,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"deltaAbsY","static":false,"returns":{"types":["number"],"help":"The absolute delta value."},"help":"Returns the absolute delta y value.","line":397,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"deltaX","static":false,"returns":{"types":["number"],"help":"The delta value. Positive if the motion was to the right, negative if to the left."},"help":"Returns the delta x value. The difference between Body.x now and in the previous step.","line":407,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"deltaY","static":false,"returns":{"types":["number"],"help":"The delta value. Positive if the motion was downwards, negative if upwards."},"help":"Returns the delta y value. The difference between Body.y now and in the previous step.","line":417,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"destroy","static":false,"returns":null,"help":"Destroys this body's reference to the sprite and system, and destroys its shape.","line":426,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"moveBackward","static":false,"returns":null,"help":"Moves the Body backwards based on its current angle and the given speed.\\nThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","line":295,"public":true,"protected":false,"private":false,"parameters":[{"name":"speed","type":["number"],"help":"The speed at which it should move backwards.","optional":false,"default":null},{"name":"angle","type":["number"],"help":"The angle in which it should move, given in degrees.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"moveDown","static":false,"returns":null,"help":"If this Body is dynamic then this will move it down by setting its y velocity to the given speed.\\nThe speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).","line":357