rope(x, y, key, frame, points, group) → {Phaser.Rope}
Creates a new Rope object.
Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/demo.js
Parameters
Name | Type | Argument | Default | Description |
---|---|---|---|---|
x | number | <optional> | 0 | The x coordinate of the Rope. The coordinate is relative to any parent container this rope may be in. |
y | number | <optional> | 0 | The y coordinate of the Rope. The coordinate is relative to any parent container this rope may be in. |
key | string | Phaser.RenderTexture | Phaser.BitmapData | Phaser.Video | PIXI.Texture | <optional> | The image used as a texture by this display object during rendering. If a string Phaser will get for an entry in the Image Cache. Or it can be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. | |
frame | string | number | <optional> | If a Texture Atlas or Sprite Sheet is used this allows you to specify the frame to be used. Use either an integer for a Frame ID or a string for a frame name. | |
points | Array | An array of {Phaser.Point}. | ||
group | Phaser.Group | <optional> | Optional Group to add the object to. If not specified it will be added to the World group. |
Returns
The newly created Rope object.
- Source code: gameobjects/GameObjectFactory.js (Line 296)
Please login to continue.