<ahref="global.html#Phaser.Path#numPointsreturn%257Bnumber%257DThetotalnumberofPathPointsinthisPath.">Phaser.Path#numPoints
return {number} The total number of PathPoints in this Path.</a>
<p>The GameObjectFactory is a quick way to create many common game objects<br>using <ahref="Phaser.Game.html#add"><code><code>game.add</code></code></a>.</p>
<tdclass="description last"><p>The Game.cache key of the sound that this object will use.</p></td>
</tr>
<tr>
<tdclass="name"><code>volume</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
1
</td>
<tdclass="description last"><p>The volume at which the sound will be played.</p></td>
</tr>
<tr>
<tdclass="name"><code>loop</code></td>
<tdclass="type">
<spanclass="param-type">boolean</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
false
</td>
<tdclass="description last"><p>Whether or not the sound will loop.</p></td>
</tr>
<tr>
<tdclass="name"><code>connect</code></td>
<tdclass="type">
<spanclass="param-type">boolean</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
true
</td>
<tdclass="description last"><p>Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.</p></td>
<p>BitmapText objects work by taking a texture file and an XML file that describes the font structure.<br>It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to<br>match the font structure.</p>
<p>BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability<br>to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by<br>processing the font texture in an image editor first, applying fills and any other effects required.</p>
<tdclass="description last"><p>The x coordinate of the Button. The coordinate is relative to any parent container this button may be in.</p></td>
</tr>
<tr>
<tdclass="name"><code>y</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>The y coordinate of the Button. The coordinate is relative to any parent container this button may be in.</p></td>
</tr>
<tr>
<tdclass="name"><code>key</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The image key as defined in the Game.Cache to use as the texture for this button.</p></td>
</tr>
<tr>
<tdclass="name"><code>callback</code></td>
<tdclass="type">
<spanclass="param-type">function</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The function to call when this button is pressed</p></td>
</tr>
<tr>
<tdclass="name"><code>callbackContext</code></td>
<tdclass="type">
<spanclass="param-type">object</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The context in which the callback will be called (usually 'this')</p></td>
</tr>
<tr>
<tdclass="name"><code>overFrame</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name.</p></td>
</tr>
<tr>
<tdclass="name"><code>outFrame</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name.</p></td>
</tr>
<tr>
<tdclass="name"><code>downFrame</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name.</p></td>
</tr>
<tr>
<tdclass="name"><code>upFrame</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name.</p></td>
<p>Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.</p>
<p>It allows you to display animated Game Objects that were created with the <ahref="http://www.kestrelmoon.com/creature/">Creature Automated Animation Tool</a>.</p>
<p>Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.</p>
<p>Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them<br>loaded before your Phaser game boots.</p>
<tdclass="description last"><p>The image used as a texture by this creature object during rendering. If a string Phaser will get for an entry in the Image Cache. Or it can be an instance of a PIXI.Texture.</p></td>
<p>A particle emitter can be used for one-time explosions or for<br>continuous effects like rain and fire. All it really does is launch Particle objects out<br>at set intervals, and fixes their positions and velocities accordingly.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>x</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>The x coordinate within the Emitter that the particles are emitted from.</p></td>
</tr>
<tr>
<tdclass="name"><code>y</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>The y coordinate within the Emitter that the particles are emitted from.</p></td>
</tr>
<tr>
<tdclass="name"><code>maxParticles</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
50
</td>
<tdclass="description last"><p>The total number of particles in this emitter.</p></td>
<p>A Group is a container for display objects that allows for fast pooling, recycling and collision checks.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>parent</code></td>
<tdclass="type">
<spanclass="param-type">any</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The parent Group or DisplayObjectContainer that will hold this group, if any. If set to null the Group won't be added to the display list. If undefined it will be added to World by default.</p></td>
</tr>
<tr>
<tdclass="name"><code>name</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
'group'
</td>
<tdclass="description last"><p>A name for this Group. Not used internally but useful for debugging.</p></td>
</tr>
<tr>
<tdclass="name"><code>addToStage</code></td>
<tdclass="type">
<spanclass="param-type">boolean</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
false
</td>
<tdclass="description last"><p>If set to true this Group will be added directly to the Game.Stage instead of Game.World.</p></td>
</tr>
<tr>
<tdclass="name"><code>enableBody</code></td>
<tdclass="type">
<spanclass="param-type">boolean</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
false
</td>
<tdclass="description last"><p>If true all Sprites created with <code>Group.create</code> or <code>Group.createMulitple</code> will have a physics body created on them. Change the body type with physicsBodyType.</p></td>
</tr>
<tr>
<tdclass="name"><code>physicsBodyType</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc.</p></td>
<p>It can still rotate, scale, crop and receive input events.<br>This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>x</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>The x coordinate of the Image. The coordinate is relative to any parent container this Image may be in.</p></td>
</tr>
<tr>
<tdclass="name"><code>y</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in.</p></td>
<tdclass="description last"><p>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.</p></td>
</tr>
<tr>
<tdclass="name"><code>frame</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>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.</p></td>
<p>A Physics Group is the same as an ordinary Group except that is has enableBody turned on by default, so any Sprites it creates<br>are automatically given a physics body.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>physicsBodyType</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
Phaser.Physics.ARCADE
</td>
<tdclass="description last"><p>If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2JS, Phaser.Physics.NINJA, etc.</p></td>
</tr>
<tr>
<tdclass="name"><code>parent</code></td>
<tdclass="type">
<spanclass="param-type">any</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The parent Group or DisplayObjectContainer that will hold this group, if any. If set to null the Group won't be added to the display list. If undefined it will be added to World by default.</p></td>
</tr>
<tr>
<tdclass="name"><code>name</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
'group'
</td>
<tdclass="description last"><p>A name for this Group. Not used internally but useful for debugging.</p></td>
</tr>
<tr>
<tdclass="name"><code>addToStage</code></td>
<tdclass="type">
<spanclass="param-type">boolean</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
false
</td>
<tdclass="description last"><p>If set to true this Group will be added directly to the Game.Stage instead of Game.World.</p></td>
<p>The Plugin must have 2 properties: <code>game</code> and <code>parent</code>. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager.</p>
<p>A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache.<br>A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set.<br>If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText<br>is that a RetroFont creates a single texture that you can apply to a game object, where-as a BitmapText creates one Sprite object per letter of text.<br>The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all,<br>i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>font</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
</td>
<tdclass="attributes">
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The key of the image in the Game.Cache that the RetroFont will use.</p></td>
</tr>
<tr>
<tdclass="name"><code>characterWidth</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The width of each character in the font set.</p></td>
</tr>
<tr>
<tdclass="name"><code>characterHeight</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The height of each character in the font set.</p></td>
</tr>
<tr>
<tdclass="name"><code>chars</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
</td>
<tdclass="attributes">
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements.</p></td>
</tr>
<tr>
<tdclass="name"><code>charsPerRow</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The number of characters per row in the font set.</p></td>
</tr>
<tr>
<tdclass="name"><code>xSpacing</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>If the characters in the font set have horizontal spacing between them set the required amount here.</p></td>
</tr>
<tr>
<tdclass="name"><code>ySpacing</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>If the characters in the font set have vertical spacing between them set the required amount here.</p></td>
</tr>
<tr>
<tdclass="name"><code>xOffset</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.</p></td>
</tr>
<tr>
<tdclass="name"><code>yOffset</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.</p></td>
<tdclass="description last"><p>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.</p></td>
</tr>
<tr>
<tdclass="name"><code>frame</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>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.</p></td>
</tr>
<tr>
<tdclass="name"><code>points</code></td>
<tdclass="type">
<spanclass="param-type">Array</span>
</td>
<tdclass="attributes">
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>An array of {Phaser.Point}.</p></td>
<tdclass="description last"><p>The Game.cache key of the sound that this object will use.</p></td>
</tr>
<tr>
<tdclass="name"><code>volume</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
1
</td>
<tdclass="description last"><p>The volume at which the sound will be played.</p></td>
</tr>
<tr>
<tdclass="name"><code>loop</code></td>
<tdclass="type">
<spanclass="param-type">boolean</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
false
</td>
<tdclass="description last"><p>Whether or not the sound will loop.</p></td>
</tr>
<tr>
<tdclass="name"><code>connect</code></td>
<tdclass="type">
<spanclass="param-type">boolean</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
true
</td>
<tdclass="description last"><p>Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio.</p></td>
<p>At its most basic a Sprite consists of a set of coordinates and a texture that is used when rendered.<br>They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input),<br>events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>x</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>The x coordinate of the sprite. The coordinate is relative to any parent container this sprite may be in.</p></td>
</tr>
<tr>
<tdclass="name"><code>y</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
0
</td>
<tdclass="description last"><p>The y coordinate of the sprite. The coordinate is relative to any parent container this sprite may be in.</p></td>
<tdclass="description last"><p>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.</p></td>
</tr>
<tr>
<tdclass="name"><code>frame</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>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.</p></td>
<p>A SpriteBatch is a really fast version of a Phaser Group built solely for speed.<br>Use when you need a lot of sprites or particles all sharing the same texture.<br>The speed gains are specifically for WebGL. In Canvas mode you won't see any real difference.</p>
<tdclass="description last"><p>The parent Group that will hold this Sprite Batch. Set to <code>undefined</code> or <code>null</code> to add directly to game.world.</p></td>
</tr>
<tr>
<tdclass="name"><code>name</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
'group'
</td>
<tdclass="description last"><p>A name for this Sprite Batch. Not used internally but useful for debugging.</p></td>
</tr>
<tr>
<tdclass="name"><code>addToStage</code></td>
<tdclass="type">
<spanclass="param-type">boolean</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
false
</td>
<tdclass="description last"><p>If set to true this Sprite Batch will be added directly to the Game.Stage instead of the parent.</p></td>
<p>The map can either be populated with data from a Tiled JSON file or from a CSV file.<br>To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key.<br>When using CSV data you must provide the key and the tileWidth and tileHeight parameters.<br>If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use <code>Tilemap.create</code> or pass the map and tile dimensions here.<br>Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>key</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass <code>null</code>.</p></td>
</tr>
<tr>
<tdclass="name"><code>tileWidth</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
32
</td>
<tdclass="description last"><p>The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.</p></td>
</tr>
<tr>
<tdclass="name"><code>tileHeight</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
32
</td>
<tdclass="description last"><p>The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data.</p></td>
</tr>
<tr>
<tdclass="name"><code>width</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
10
</td>
<tdclass="description last"><p>The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.</p></td>
</tr>
<tr>
<tdclass="name"><code>height</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
10
</td>
<tdclass="description last"><p>The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this.</p></td>
id="tileSprite"><spanclass="type-signature"></span>tileSprite<spanclass="signature">(x, y, width, height, key, <spanclass="optional">frame</span>, <spanclass="optional">group</span>)</span><spanclass="type-signature">→ {<ahref="Phaser.TileSprite.html">Phaser.TileSprite</a>}</span></h4>
</dt>
<dd>
<divclass="description">
<p>Creates a new TileSprite object.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>x</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
</td>
<tdclass="description last"><p>The x coordinate of the TileSprite. The coordinate is relative to any parent container this TileSprite may be in.</p></td>
</tr>
<tr>
<tdclass="name"><code>y</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
</td>
<tdclass="description last"><p>The y coordinate of the TileSprite. The coordinate is relative to any parent container this TileSprite may be in.</p></td>
</tr>
<tr>
<tdclass="name"><code>width</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
</td>
<tdclass="description last"><p>The width of the TileSprite.</p></td>
</tr>
<tr>
<tdclass="name"><code>height</code></td>
<tdclass="type">
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
</td>
<tdclass="description last"><p>The height of the TileSprite.</p></td>
<tdclass="description last"><p>This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Phaser Image Cache entry, or an instance of a PIXI.Texture or BitmapData.</p></td>
</tr>
<tr>
<tdclass="name"><code>frame</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="description last"><p>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.</p></td>
<p>This will return a Phaser.Video object which you can pass to a Sprite to be used as a texture.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>key</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">null</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
null
</td>
<tdclass="description last"><p>The key of the video file in the Phaser.Cache that this Video object will play. Set to <code>null</code> or leave undefined if you wish to use a webcam as the source. See <code>startMediaStream</code> to start webcam capture.</p></td>
</tr>
<tr>
<tdclass="name"><code>url</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">null</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
null
</td>
<tdclass="description last"><p>If the video hasn't been loaded then you can provide a full URL to the file here (make sure to set key to null)</p></td>
<p>Weapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties.<br>The Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.</p>
<p>The Bullets are created inside of <code>Weapon.bullets</code>, which is a Phaser.Group instance. Anything you<br>can usually do with a Group, such as move it around the display list, iterate it, etc can be done<br>to the bullets Group too.</p>
<p>Bullets can have textures and even animations. You can control the speed at which they are fired,<br>the firing rate, the firing angle, and even set things like gravity for them.</p>
</div>
<h5>Parameters:</h5>
<tableclass="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<thclass="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<tdclass="name"><code>quantity</code></td>
<tdclass="type">
<spanclass="param-type">integer</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
1
</td>
<tdclass="description last"><p>The quantity of bullets to seed the Weapon with. If -1 it will set the pool to automatically expand.</p></td>
<tdclass="description last"><p>The image used as a texture by the bullets 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.</p></td>
</tr>
<tr>
<tdclass="name"><code>frame</code></td>
<tdclass="type">
<spanclass="param-type">string</span>
|
<spanclass="param-type">number</span>
</td>
<tdclass="attributes">
<optional><br>
</td>
<tdclass="default">
</td>
<tdclass="description last"><p>If a Texture Atlas or Sprite Sheet is used this allows you to specify the frame to be used by the bullets. Use either an integer for a Frame ID or a string for a frame name.</p></td>