mirror of
https://github.com/photonstorm/phaser
synced 2024-12-22 19:13:37 +00:00
1 line
6.8 KiB
JSON
1 line
6.8 KiB
JSON
|
{"class":{"name":"Phaser.Physics.Ninja.Tile","extends":"","static":false,"constructor":true,"parameters":[{"name":"body","type":["Phaser.Physics.Ninja.Body"],"help":"The body that owns this shape.","optional":false,"default":null},{"name":"x","type":["number"],"help":"The x coordinate to create this shape at.","optional":false,"default":null},{"name":"y","type":["number"],"help":"The y coordinate to create this shape at.","optional":false,"default":null},{"name":"width","type":["number"],"help":"The width of this AABB.","optional":false,"default":null},{"name":"height","type":["number"],"help":"The height of this AABB.","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"}],"help":"Ninja Physics Tile constructor.\\nA Tile is defined by its width, height and type. It's type can include slope data, such as 45 degree slopes, or convex slopes.\\nUnderstand that for any type including a slope (types 2 to 29) the Tile must be SQUARE, i.e. have an equal width and height.\\nAlso note that as Tiles are primarily used for levels they have gravity disabled and world bounds collision disabled by default.\\n\\nNote: This class could be massively optimised and reduced in size. I leave that challenge up to you."},"consts":[],"methods":{"public":[{"name":"clear","static":false,"returns":null,"help":"Sets this tile to be empty.","line":295,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"collideWorldBounds","static":false,"returns":null,"help":"Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body.","line":158,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"destroy","static":false,"returns":null,"help":"Destroys this Tiles reference to Body and System.","line":307,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"integrate","static":false,"returns":null,"help":"Updates this objects position.","line":140,"public":true,"protected":false,"private":false,"parameters":[],"inherited":false,"inheritedFrom":""},{"name":"reportCollisionVsWorld","static":false,"returns":null,"help":"Process a world collision and apply the resulting forces.","line":204,"public":true,"protected":false,"private":false,"parameters":[{"name":"px","type":["number"],"help":"The tangent velocity","optional":false,"default":null},{"name":"py","type":["number"],"help":"The tangent velocity","optional":false,"default":null},{"name":"dx","type":["number"],"help":"Collision normal","optional":false,"default":null},{"name":"dy","type":["number"],"help":"Collision normal","optional":false,"default":null},{"name":"obj","type":["number"],"help":"Object this Tile collided with","optional":false,"default":null}],"inherited":false,"inheritedFrom":""},{"name":"setType","static":false,"returns":null,"help":"Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body.","line":274,"public":true,"protected":false,"private":false,"parameters":[{"name":"id","type":["number"],"help":"The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc.","optional":false,"default":null}],"inherited":false,"inheritedFrom":""}],"protected":[],"private":[{"name":"updateType","static":false,"returns":null,"help":"This converts a tile from implicitly-defined (via id), to explicit (via properties).\\nDon't call directly, instead of setType.","line":321,"public":false,"protected":false,"private":true,"parameters":[],"inherited":false,"inheritedFrom":""}],"static":[]},"properties":{"public":[{"name":"bottom","type":["number"],"help":"","inlineHelp":"The bottom value of this Body (same as Body.y + Body.height)","line":706,"default":null,"public":true,"protected":false,"private":false,"readO
|