new Rope(game, x, y, key, frame, points)
A Rope is a Sprite that has a repeating texture.
The texture will automatically wrap on the edges as it moves.
Please note that Ropes cannot have an input handler.
Parameters
Name | Type | Description |
---|---|---|
game | Phaser.Game | A reference to the currently running game. |
x | number | The x coordinate (in world space) to position the Rope at. |
y | number | The y coordinate (in world space) to position the Rope at. |
key | string | Phaser.RenderTexture | Phaser.BitmapData | PIXI.Texture | This is the image or texture used by the Rope during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. |
frame | string | number | If this Rope is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. |
points | Array | An array of {Phaser.Point}. |
- Source code: gameobjects/Rope.js (Line 42)
Please login to continue.