

Phaser
======

 Phaser 2.6.2
------------

 **"Via":** If a class has an entry in the *via* column it means you can quickly access it through a local reference. I.e. you can control the camera via `this.camera` from any state, or `game.camera` if game has been globally defined.

 ### Game States

 

| Class | Via | Description |
| --- | --- | --- |
| [StateManager](phaser.statemanager) | `state` | Creates, manages and swaps your Game States. |
| [State](phaser.state) |  | A base Game State object you can extend. |

 ### Loader

 

| Class | Via | Description |
| --- | --- | --- |
| [Cache](phaser.cache) | `cache` | The Cache is where all loaded assets are stored and retrieved from. |
| [Loader](phaser.loader) | `load` | Loads all external asset types (images, audio, json, xml, txt) and adds them to the Cache. Automatically invoked by a States `preload` method. |
| [LoaderParser](phaser.loaderparser) |  | A Static Class used by the Loader to handle parsing of complex asset types. |

 ### Game Scaling

 

| Class | Via | Description |
| --- | --- | --- |
| [ScaleManager](phaser.scalemanager) | `scale` | Manages the sizing and scaling of your game across devices. |
| [FlexGrid](phaser.flexgrid) | `scale.grid` | A responsive layout grid (still in testing) |
| [FlexLayer](phaser.flexlayer) |  | A responsive grid layer (still in testing) |

 ### Signals

 

| Class | Description |
| --- | --- |
| [Signal](phaser.signal) | Signals are Phasers internal Event system. |
| [SignalBinding](phaser.signalbinding) | Manages which callbacks are bound to a Signal. |

 ### Plugins

 

| Class | Via | Description |
| --- | --- | --- |
| [PluginManager](phaser.pluginmanager) | `plugins` | Installs, updates and destroys Plugins. |
| [Plugin](phaser.plugin) |  | A base Plugin object you can extend. |

 Game Objects
------------

 

| Class | Via | Description |
| --- | --- | --- |
| [GameObjectFactory](phaser.gameobjectfactory) | `add` | A helper class that can create any of the Phaser Game Objects and adds them to the Game World. |
| [GameObjectCreator](phaser.gameobjectcreator) | `make` | A helper class that can creates and returns any Phaser Game Object. |
| [Group](phaser.group) |  | Groups can contain multiple Game Objects and have the ability to search, sort, call, update and filter them. |
| [InputHandler](phaser.inputhandler) | `*object*.input` | If a Game Object is enabled for input this class controls all input related events, including clicks and drag. |
| [Events](phaser.events) | `*object*.events` | All of the Game Object level events. |
| [Create](phaser.create) | `create` | Dynamic Sprite and Texture generation methods. |

 ### Display

 

| Class | Description |
| --- | --- |
| [Sprite](phaser.sprite) | A Game Object with a texture, capable of running animation, input events and physics. |
| [Image](phaser.image) | A lighter Game Object with a texture and input, but no physics or animation handlers. |
| [TileSprite](phaser.tilesprite) | A Game Object with a repeating texture that can be scrolled and scaled. |
| [Button](phaser.button) | An Image Game Object with helper methods and events to turn it into a UI Button. |
| [SpriteBatch](phaser.spritebatch) | A custom Sprite Batch. Can render multiple Sprites significantly faster if they share the same texture. |
| [Rope](phaser.rope) | A jointed Game Object with a strip-based texture. |

 ### Graphics

 

| Class | Description |
| --- | --- |
| [Graphics](phaser.graphics) | Allows you to draw primitive shapes (lines, rects, circles), setting color, stroke and fills. |
| [BitmapData](phaser.bitmapdata) | Provides a powerful interface to a blank Canvas object. Can be used as a Sprite texture. |
| [RenderTexture](phaser.rendertexture) | A special kind of texture you can draw Sprites to extremely quickly. |

 ### Text

 

| Class | Description |
| --- | --- |
| [Text](phaser.text) | Displays text using system fonts or Web Fonts, with optional fills, shadows and strokes. |
| [BitmapText](phaser.bitmaptext) | A texture based text object that uses a Bitmap Font file. |
| [RetroFont](phaser.retrofont) | Similar to a BitmapText object but uses a classic sprite sheet. Each character is a fixed-width. |

 ### Animation

 

| Class | Via | Description |
| --- | --- | --- |
| [AnimationManager](phaser.animationmanager) | `*sprite*.animations` | Adds, plays and updates animations on Sprite Game Objects. |
| [Animation](phaser.animation) |  | The base Animation object that the Animation Manager creates. |
| [AnimationParser](phaser.animationparser) |  | Used internally by the Phaser Loader to parse animation data from external files. |
| [FrameData](phaser.framedata) |  | A collection of Frame objects that comprise an animation. |
| [Frame](phaser.frame) |  | A single Frame of an Animation. Stored inside of a FrameData object. |

 Geometry
--------

 

| Class | Description |
| --- | --- |
| [Circle](phaser.circle) | A Circle object consisting of a position and diameter. |
| [Ellipse](phaser.ellipse) | An Ellipse object consisting of a position, width and height. |
| [Line](phaser.line) | A Line object consisting of two points at the start and end of the Line. |
| [Point](phaser.point) | A Point object consisting of an x and y position. |
| [Polygon](phaser.polygon) | A Polygon object consisting of a series of Points. |
| [Rectangle](phaser.rectangle) | A Rectangle object consisting of an x, y, width and height. |
| [RoundedRectangle](phaser.roundedrectangle) | A Rectangle object consisting of an x, y, width, height and corner radius. |

 Time
----

 

| Class | Via | Description |
| --- | --- | --- |
| [Time](phaser.time) | `time` | The core internal clock on which all Phaser time related operations rely. |
| [Timer](phaser.timer) | `time.create` | A custom Timer that contains one or more TimerEvents. Can be used either once or be set to repeat. |
| [TimerEvent](phaser.timerevent) | `time.add` | A single time related event object. Belongs to a Phaser.Timer. |

 Tilemaps
--------

 

| Class | Description |
| --- | --- |
| [Tilemap](phaser.tilemap) | A Tilemap consists of one or more TilemapLayers and associated tile data. Contains methods for tile data manipulation and TilemapLayer generation. |
| [TilemapLayer](phaser.tilemaplayer) | A single layer within a Tilemap. Extends from Phaser.Sprite and is responsible for rendering itself. |
| [Tileset](phaser.tileset) | An object containing a texture and data used for rendering tiles by a TilemapLayer. |
| [Tile](phaser.tile) | A single Tile object with related properties. One of these exists for every tile in a map. |
| [TilemapParser](phaser.tilemapparser) | A Static class used to parse externally loaded map data. Typically called directly by Phaser.Loader. |

 Math
----

 

| Class | Via | Description |
| --- | --- | --- |
| [Math](phaser.math) | `math` | Contains lots of math related helper methods including fuzzy logic and interpolation. |
| [QuadTree](phaser.quadtree) |  | A stand-alone QuadTree implementation. Used by Arcade Physics but can also be used directly. |
| [RandomDataGenerator](phaser.randomdatagenerator) | `rnd` | A seedable repeatable random data generator. |

 Network
-------

 

| Class | Via | Description |
| --- | --- | --- |
| [Net](phaser.net) | `net` | Browser URL and query string related methods. |

 Particles
---------

 

| Class | Via | Description |
| --- | --- | --- |
| [Particles](phaser.particles) | `particles` | The Phaser Particle Manager. Called during the game loop and updates any associated Particle Emitters. |
| [Emitter](phaser.particles.arcade.emitter) |  | An Arcade Physics based Particle Emitter. Created via `add.emitter` in the GameObjectFactory. |
| [Particle](phaser.particle) |  | A single Particle object as emitted by the Emitter. Extends Phaser.Sprite. |

 Physics
-------

 

| Class | Via | Description |
| --- | --- | --- |
| [Physics](phaser.physics) | `physics` | The core Physics Manager. Provides access to all of the physics sub-systems. |

 ### Arcade Physics

 

| Class | Via | Description |
| --- | --- | --- |
| [Arcade](phaser.physics.arcade) | `physics.arcade` | The Arcade Physics handler. Contains collision, overlap and movement related methods. |
| [Body](phaser.physics.arcade.body) | `*sprite*.body` | An Arcade Physics Body. Contains velocity, acceleration, drag and other related properties. |
| [Weapon](phaser.weapon) | `game.add.weapon` | An Arcade Physics powered Weapon plugin, for easy bullet pool management. |

 ### Ninja Physics

 Ninja Physics is not bundled in Phaser by default. Please see the README custom build details section.

 

| Class | Via | Description |
| --- | --- | --- |
| [Ninja](phaser.physics.ninja) | `physics.ninja` | The Ninja Physics handler. Contains collision, overlap and movement related methods. |
| [Body](phaser.physics.ninja.body) | `*sprite*.body` | A Ninja Physics Body. Contains velocity, acceleration, drag and other related properties. |
| [AABB](phaser.physics.ninja.aabb) |  | An AABB Ninja Physics Body type. |
| [Circle](phaser.physics.ninja.circle) |  | A Circle Ninja Physics Body type. |
| [Tile](phaser.physics.ninja.tile) |  | A Tile Ninja Physics Body type. |

 ### P2 Physics

 

| Class | Via | Description |
| --- | --- | --- |
| [P2](phaser.physics.p2) | `phyiscs.p2` | The P2 Physics World. Contains collision, overlap and movement related methods. |
| [Body](phaser.physics.p2.body) | `*sprite*.body` | A P2 Physics Body. Contains velocity, acceleration, drag and other related properties. |
| [BodyDebug](phaser.physics.p2.bodydebug) |  | A Debug specific version of a P2 Body object. Renders out its shape for visual debugging. |
| [Material](phaser.physics.p2.material) |  | A P2 Material used for world responses, such as friction and restitution. |
| [ContactMaterial](phaser.physics.p2.contactmaterial) |  | A P2 Contact Material used for contact responses. |
| [CollisionGroup](phaser.physics.p2.collisiongroup) |  | A P2 Collision Group. |
| [FixtureList](phaser.physics.p2.fixturelist) |  | The P2 Fixture List handler. |
| **Constraints:** |  | [Distance Constraint](phaser.physics.p2.distanceconstraint), [GearConstraint](phaser.physics.p2.gearconstraint), [LockConstraint](phaser.physics.p2.lockconstraint), [PrismaticConstraint](phaser.physics.p2.prismaticconstraint), [RevoluteConstraint](phaser.physics.p2.revoluteconstraint) |
| [PointProxy](phaser.physics.p2.pointproxy) |  | Responsible for proxing Phaser Game World to P2 Physics values. |
| [InversePointProxy](phaser.physics.p2.inversepointproxy) |  | Responsible for proxing Phaser Game World to inversed P2 Physics values. |
| [Spring](phaser.physics.p2.spring) |  | A P2 Spring object. |
| [RotationalSpring](phaser.physics.p2.rotationalspring) |  | A P2 Rotational Spring object. |

 Input
-----

 

| Class | Via | Description |
| --- | --- | --- |
| [Input](phaser.input) | `input` | The Input Manager. Responsible for handling all Input sub-systems. Also looks after Input enabled Game Objects. |
| [Pointer](phaser.pointer) | `input.pointer` | Pointers encapsulate all mouse or touch related input, regardless of how it was generated. On multi-touch systems more than one Pointer can be active at any one time. In Input related events a reference to the corresponding Pointer is passed. |
| [DeviceButton](phaser.devicebutton) | `pointer.leftButton` | Represents a button on a mouse or pen / stylus. |
| [Keyboard](phaser.keyboard) | `input.keyboard` | The Keyboard input handler. Listens for device related events. Can also create Key objects. |
| [Key](phaser.key) |  | A Key object is responsible for listening to a specific Key. Created by the Keyboard class. |
| [KeyCode](phaser.keycode) |  | The KeyCode consts are used when creating new Key objects. |
| [Mouse](phaser.mouse) | `input.mouse` | A Mouse event handler. Listens for device related events and passes them on to the active Pointer. |
| [MSPointer](phaser.mspointer) | `input.mspointer` | An MSPointer event handler. Listens for device related events and passes them on to the active Pointer. |
| [Touch](phaser.touch) | `input.touch` | A Touch event handler. Listens for device related events and passes them on to the active Pointer. |

 ### Gamepads

 

| Class | Via | Description |
| --- | --- | --- |
| [Gamepad](phaser.gamepad) | `input.gamepad` | The Gamepad Manager looks after all connected Gamepads to the device. Creates SinglePad instances. |
| [SinglePad](phaser.singlepad) | `input.gamepad.pad<1,4>` | Represents a single connected gamepad. |
| [DeviceButton](phaser.devicebutton) |  | Represents a button on a SinglePad instance. |

 Tweens
------

 

| Class | Via | Description |
| --- | --- | --- |
| [TweenManager](phaser.tweenmanager) | `tweens` | The Tween Manager creates, updates and destroys all active tweens. |
| [Tween](phaser.tween) |  | A Tween object. Created via `game.add.tween`. Consists of TweenData objects that represent the tween and any child tweens. |
| [TweenData](phaser.tweendata) |  | A TweenData object contains all the information related to a tween. Created by and belongs to a Phaser.Tween object. |
| [Easing](phaser.easing) |  | A static class containing all of the easing functions available to Tweens. |

 Sound
-----

 

| Class | Via | Description |
| --- | --- | --- |
| [SoundManager](phaser.soundmanager) | `sound` | The Sound Manager controls all Sound objects and can play, loop, fade and stop Sounds. |
| [Sound](phaser.sound) |  | A Sound object. Can be played, paused and stopped directly, and have its volume adjusted. |
| [AudioSprite](phaser.audiosprite) |  | An Audio Sprite is a Sound object with related marker data representing sections of the audio. |

 System
------

 

| Class | Via | Description |
| --- | --- | --- |
| [Canvas](phaser.canvas) |  | A static class containing Canvas creation and manipulation methods. Such as adding to the dom, setting touch actions, smoothing and image rendering. |
| [Device](phaser.device) | `game.device` | The Device class checks system capabilities and settings on boot and stores them for later access. |
| [DOM](phaser.dom) |  | A static class containing DOM specific methods including offset handling, viewport calibration and bounds checks. |
| [RequestAnimationFrame](phaser.requestanimationframe) | `game.raf` | Abstracts away the use of RAF or setTimeOut for the core game update loop. |

 Utils
-----

 

| Class | Via | Description |
| --- | --- | --- |
| [ArraySet](phaser.arrayset) |  | ArraySet is a Set data structure (items must be unique within the set) that also maintains order. |
| [ArrayUtils](phaser.arrayutils) |  | Array specific methods such as getRandomItem, shuffle, transposeMatrix, rotate and numberArray. |
| [Color](phaser.color) |  | Phaser.Color is a set of static methods that assist in color manipulation and conversion. |
| [Debug](phaser.utils.debug) | `game.debug` | A collection of methods for displaying debug information about game objects. |
| [LinkedList](phaser.linkedlist) |  | A basic Linked List data structure. |
| [Utils](phaser.utils) |  | Utility methods for Object and String inspection and modification. Including getProperty, pad, isPlainObject, extend and mixin. |



 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/index>

Class: Phaser.Game
==================

 Constructor
-----------

 ### 
new Game(width, height, renderer, parent, state, transparent, antialias, physicsConfig)

  This is where the magic happens. The Game object is the heart of your game,  
providing quick access to common functions and handling the boot process.

 "Hell, there are no rules here - we're trying to accomplish something."  
 Thomas A. Edison

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | number | string |  <optional> |  800  | The width of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage width of the parent container, or the browser window if no parent is given. |
| `height` | number | string |  <optional> |  600  | The height of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage height of the parent container, or the browser window if no parent is given. |
| `renderer` | number |  <optional> |  Phaser.AUTO  | Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all). |
| `parent` | string | HTMLElement |  <optional> |  ''  | The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself. |
| `state` | object |  <optional> |  null  | The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null. |
| `transparent` | boolean |  <optional> |  false  | Use a transparent canvas background or not. |
| `antialias` | boolean |  <optional> |  true  | Draw all image textures anti-aliased or not. The default is for smooth textures, but disable if your game features pixel art. |
| `physicsConfig` | object |  <optional> |  null  | A physics configuration object to pass to the Physics world on creation. |

  Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L25))   Public Properties
-----------------

  ### 
add : [Phaser.GameObjectFactory](phaser.gameobjectfactory)

  Reference to the Phaser.GameObjectFactory.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L156))   ### 
antialias : boolean

  Anti-alias graphics. By default scaled images are smoothed in Canvas and WebGL, set anti-alias to false to disable this globally.

   Default Value * true
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L102))   ### 
cache : [Phaser.Cache](phaser.cache)

  Reference to the assets cache.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 166](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L166))   ### 
camera : [Phaser.Camera](phaser.camera)

  A handy reference to world.camera.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 241](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L241))   ### 
canvas :HTMLCanvasElement

  A handy reference to renderer.view, the canvas that the game is being rendered in to.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L246))   ### 
clearBeforeRender : boolean

  Clear the Canvas each frame before rendering the display list.  
You can set this to `false` to gain some performance if your game always contains a background that completely fills the display.

   Default Value * true
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 116](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L116))   ### 
config : Object

  The Phaser.Game configuration object.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L36))   ### 
context :CanvasRenderingContext2D

  A handy reference to renderer.context (only set for CANVAS games, not WebGL)

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 251](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L251))   ### 
create : [Phaser.Create](phaser.create)

  The Asset Generator.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 266](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L266))   ### 
<internal> currentUpdateID : integer

  The ID of the current/last logic update applied this render frame, starting from 0.  
The first update is `currentUpdateID === 0` and the last update is `currentUpdateID === updatesThisFrame.`

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 336](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L336))   ### 
debug : [Phaser.Utils.Debug](phaser.utils.debug)

  A set of useful debug utilities.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 256](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L256))   ### 
device : [Phaser.Device](phaser.device)

  Contains device information and capabilities.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 236](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L236))   ### 
forceSingleUpdate : boolean

  Should the game loop force a logic update, regardless of the delta timer? Set to true if you know you need this. You can toggle it on the fly.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 380](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L380))   ### 
fpsProblemNotifier : [Phaser.Signal](phaser.signal)

  If the game is struggling to maintain the desired FPS, this signal will be dispatched.  
The desired/chosen FPS should probably be closer to the [Phaser.Time#suggestedFps](phaser.time#suggestedFps) value.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 375](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L375))   ### 
[readonly] height : integer

  The current Game Height in pixels.

 *Do not modify this property directly:* use [Phaser.ScaleManager#setGameSize](phaser.scalemanager#setGameSize) - eg. `game.scale.setGameSize(width, height)` - instead.

   Default Value * 600
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L69))   ### 
[readonly] id : number

  Phaser Game ID (for when Pixi supports multiple instances).

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L31))   ### 
input : [Phaser.Input](phaser.input)

  Reference to the input manager

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L171))   ### 
[readonly] isBooted : boolean

  Whether the game engine is booted, aka available.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L139))   ### 
[readonly] isRunning : boolean

  Is game running or paused?

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 145](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L145))   ### 
load : [Phaser.Loader](phaser.loader)

  Reference to the assets loader.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 176](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L176))   ### 
lockRender : boolean

  If `false` Phaser will automatically render the display list every update. If `true` the render loop will be skipped.  
You can toggle this value at run-time to gain exact control over when Phaser renders. This can be useful in certain types of game or application.  
Please note that if you don't render the display list then none of the game object transforms will be updated, so use this value carefully.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 275](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L275))   ### 
make : [Phaser.GameObjectCreator](phaser.gameobjectcreator)

  Reference to the GameObject Creator.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L161))   ### 
math : [Phaser.Math](phaser.math)

  Reference to the math helper.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 181](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L181))   ### 
net : [Phaser.Net](phaser.net)

  Reference to the network class.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L186))   ### 
onBlur : [Phaser.Signal](phaser.signal)

  This event is fired when the game no longer has focus (typically on page hide).

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 311](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L311))   ### 
onFocus : [Phaser.Signal](phaser.signal)

  This event is fired when the game has focus (typically on page show).

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 316](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L316))   ### 
onPause : [Phaser.Signal](phaser.signal)

  This event is fired when the game pauses.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 301](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L301))   ### 
onResume : [Phaser.Signal](phaser.signal)

  This event is fired when the game resumes from a paused state.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 306](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L306))   ### 
parent : string | HTMLElement

  The Games DOM parent.

  ##### Type

 * string | HTMLElement

  Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 47](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L47))   ### 
particles : [Phaser.Particles](phaser.particles)

  The Particle Manager.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 261](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L261))   ### 
paused : boolean

  The paused state of the Game. A paused game doesn't update any of its subsystems.  
When a game is paused the onPause event is dispatched. When it is resumed the onResume event is dispatched. Gets and sets the paused state of the Game.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 1154](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L1154))   ### 
[readonly] pendingStep : boolean

  An internal property used by enableStep, but also useful to query from your own game objects.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 289](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L289))   ### 
physics : [Phaser.Physics](phaser.physics)

  Reference to the physics manager.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L221))   ### 
physicsConfig : Object

  The Phaser.Physics.World configuration object.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 41](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L41))   ### 
plugins : [Phaser.PluginManager](phaser.pluginmanager)

  Reference to the plugin manager.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 226](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L226))   ### 
preserveDrawingBuffer : boolean

  The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 108](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L108))   ### 
<internal> raf : [Phaser.RequestAnimationFrame](phaser.requestanimationframe)

  Automatically handles the core game loop via requestAnimationFrame or setTimeout

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 151](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L151))   ### 
<internal> renderer : [PIXI.CanvasRenderer](pixi.canvasrenderer) | [PIXI.WebGLRenderer](pixi.webglrenderer)

  The Pixi Renderer.

  ##### Type

 * [PIXI.CanvasRenderer](pixi.canvasrenderer) | [PIXI.WebGLRenderer](pixi.webglrenderer)

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 122](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L122))   ### 
[readonly] renderType : number

  The Renderer this game will use. Either Phaser.AUTO, Phaser.CANVAS, Phaser.WEBGL, or Phaser.HEADLESS.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 128](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L128))   ### 
[readonly] resolution : integer

  The resolution of your game. This value is read only, but can be changed at start time it via a game configuration object.

   Default Value * 1
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L78))   ### 
rnd : [Phaser.RandomDataGenerator](phaser.randomdatagenerator)

  Instance of repeatable random data generator helper.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 231](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L231))   ### 
scale : [Phaser.ScaleManager](phaser.scalemanager)

  The game scale manager.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L191))   ### 
sound : [Phaser.SoundManager](phaser.soundmanager)

  Reference to the sound manager.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 196](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L196))   ### 
stage : [Phaser.Stage](phaser.stage)

  Reference to the stage.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 201](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L201))   ### 
state : [Phaser.StateManager](phaser.statemanager)

  The StateManager.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 133](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L133))   ### 
[readonly] stepCount : number

  When stepping is enabled this contains the current step cycle.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 296](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L296))   ### 
[readonly] stepping : boolean

  Enable core loop stepping with Game.enableStep().

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 282](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L282))   ### 
time : [Phaser.Time](phaser.time)

  Reference to the core game clock.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 206](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L206))   ### 
transparent : boolean

  Use a transparent canvas background or not.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 96](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L96))   ### 
tweens : [Phaser.TweenManager](phaser.tweenmanager)

  Reference to the tween manager.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L211))   ### 
<internal> updatesThisFrame : integer

  Number of logic updates expected to occur this render frame; will be 1 unless there are catch-ups required (and allowed).

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 343](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L343))   ### 
[readonly] width : integer

  The current Game Width in pixels.

 *Do not modify this property directly:* use [Phaser.ScaleManager#setGameSize](phaser.scalemanager#setGameSize) - eg. `game.scale.setGameSize(width, height)` - instead.

   Default Value * 800
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L58))   ### 
world : [Phaser.World](phaser.world)

  Reference to the world.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 216](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L216))    Public Methods
--------------

  ### 
<internal> boot()

  Initialize engine sub modules and start the game.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 520](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L520))   ### 
destroy()

  Nukes the entire game from orbit.

 Calls destroy on Game.state, Game.sound, Game.scale, Game.stage, Game.input, Game.physics and Game.plugins.

 Then sets all of those local handlers to null, destroys the renderer, removes the canvas from the DOM  
and resets the PIXI default renderer.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 1001](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L1001))   ### 
disableStep()

  Disables core game loop stepping.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 976](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L976))   ### 
enableStep()

  Enable core game loop stepping. When enabled you must call game.step() directly (perhaps via a DOM button?)  
Calling step will advance the game loop by one frame. This is extremely useful for hard to track down errors!

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 962](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L962))   ### 
<internal> focusGain(event)

  Called by the Stage visibility handler.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | object | The DOM event that caused the game to pause, if any. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 1132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L1132))   ### 
<internal> focusLoss(event)

  Called by the Stage visibility handler.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | object | The DOM event that caused the game to pause, if any. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 1114](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L1114))   ### 
<internal> gamePaused(event)

  Called by the Stage visibility handler.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | object | The DOM event that caused the game to pause, if any. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 1048](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L1048))   ### 
<internal> gameResumed(event)

  Called by the Stage visibility handler.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | object | The DOM event that caused the game to pause, if any. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 1080](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L1080))   ### 
<internal> parseConfig()

  Parses a Game configuration object.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 440](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L440))   ### 
<internal> setUpRenderer()

  Checks if the device is capable of using the requested renderer and sets it up or an alternative if not.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 676](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L676))   ### 
<internal> showDebugHeader()

  Displays a Phaser version debug header in the console.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 609](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L609))   ### 
step()

  When stepping is enabled you must call this function directly (perhaps via a DOM button?) to advance the game loop by one frame.  
This is extremely useful to hard to track down errors! Use the internal stepCount property to monitor progress.

   Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 988](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L988))   ### 
<internal> update(time)

  The core game loop.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `time` | number | The current time as provided by RequestAnimationFrame. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 777](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L777))   ### 
<internal> updateLogic(timeStep)

  Updates all logic subsystems in Phaser. Called automatically by Game.update.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `timeStep` | number | The current timeStep value as determined by Game.update. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 877](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L877))   ### 
<internal> updateRender(elapsedTime)

  Runs the Render cycle.  
It starts by calling State.preRender. In here you can do any last minute adjustments of display objects as required.  
It then calls the renderer, which renders the entire display list, starting from the Stage object and working down.  
It then calls plugin.render on any loaded plugins, in the order in which they were enabled.  
After this State.render is called. Any rendering that happens here will take place on-top of the display list.  
Finally plugin.postRender is called on any loaded plugins, in the order in which they were enabled.  
This method is called automatically by Game.update, you don't need to call it directly.  
Should you wish to have fine-grained control over when Phaser renders then use the `Game.lockRender` boolean.  
Phaser will only render when this boolean is `false`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `elapsedTime` | number | The time elapsed since the last update. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Game.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js) ([Line 925](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Game.js#L925))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Game.html>

Class: Phaser.State
===================

 Constructor
-----------

 ### 
new State()

  This is a base State class which can be extended if you are creating your own game.  
It provides quick access to common functions such as the camera, cache, input, match, sound and more.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L14))   Public Properties
-----------------

  ### 
add : [Phaser.GameObjectFactory](phaser.gameobjectfactory)

  A reference to the GameObjectFactory which can be used to add new objects to the World.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L29))   ### 
cache : [Phaser.Cache](phaser.cache)

  A reference to the game cache which contains any loaded or generated assets, such as images, sound and more.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L44))   ### 
camera : [Phaser.Camera](phaser.camera)

  A handy reference to World.camera.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L39))   ### 
game : [Phaser.Game](phaser.game)

  This is a reference to the currently running Game.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L19))   ### 
input : [Phaser.Input](phaser.input)

  A reference to the Input Manager.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L49))   ### 
key : string

  The string based identifier given to the State when added into the State Manager.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L24))   ### 
load : [Phaser.Loader](phaser.loader)

  A reference to the Loader, which you mostly use in the preload method of your state to load external assets.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L54))   ### 
make : [Phaser.GameObjectCreator](phaser.gameobjectcreator)

  A reference to the GameObjectCreator which can be used to make new objects.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L34))   ### 
math : [Phaser.Math](phaser.math)

  A reference to Math class with lots of helpful functions.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L59))   ### 
particles : [Phaser.Particles](phaser.particles)

  The Particle Manager. It is called during the core gameloop and updates any Particle Emitters it has created.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 99](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L99))   ### 
physics : [Phaser.Physics](phaser.physics)

  A reference to the physics manager which looks after the different physics systems available within Phaser.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L104))   ### 
rnd : [Phaser.RandomDataGenerator](phaser.randomdatagenerator)

  A reference to the seeded and repeatable random data generator.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L109))   ### 
scale : [Phaser.ScaleManager](phaser.scalemanager)

  A reference to the Scale Manager which controls the way the game scales on different displays.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L69))   ### 
sound : [Phaser.SoundManager](phaser.soundmanager)

  A reference to the Sound Manager which can create, play and stop sounds, as well as adjust global volume.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L64))   ### 
stage : [Phaser.Stage](phaser.stage)

  A reference to the Stage.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 74](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L74))   ### 
state

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `stage` | [Phaser.StateManager](phaser.statemanager) | A reference to the State Manager, which controls state changes. |

  Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L79))   ### 
time : [Phaser.Time](phaser.time)

  A reference to the game clock and timed events system.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L84))   ### 
tweens : [Phaser.TweenManager](phaser.tweenmanager)

  A reference to the tween manager.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L89))   ### 
world : [Phaser.World](phaser.world)

  A reference to the game world. All objects live in the Game World and its size is not bound by the display resolution.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L94))    Public Methods
--------------

  ### 
create()

  create is called once preload has completed, this includes the loading of any assets from the Loader.  
If you don't have a preload method then create is the first method called in your State.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 152](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L152))   ### 
init()

  init is the very first function called when your State starts up. It's called before preload, create or anything else.  
If you need to route the game away to another State you could do so here, or if you need to prepare a set of variables  
or objects before the preloading starts.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L115))   ### 
loadRender()

  loadRender is called during the Loader process. This only happens if you've set one or more assets to load in the preload method.  
The difference between loadRender and render is that any objects you render in this method you must be sure their assets exist.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 143](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L143))   ### 
loadUpdate()

  loadUpdate is called during the Loader process. This only happens if you've set one or more assets to load in the preload method.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L135))   ### 
paused()

  This method will be called if the core game loop is paused.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 197](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L197))   ### 
pauseUpdate()

  pauseUpdate is called while the game is paused instead of preUpdate, update and postUpdate.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L213))   ### 
preload()

  preload is called first. Normally you'd use this to load your game assets (or those needed for the current State)  
You shouldn't create any objects in this method that require assets that you're also loading in this method, as  
they won't yet be available.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L125))   ### 
preRender()

  The preRender method is called after all Game Objects have been updated, but before any rendering takes place.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L171))   ### 
render()

  Nearly all display objects in Phaser render automatically, you don't need to tell them to render.  
However the render method is called AFTER the game renderer and plugins have rendered, so you're able to do any  
final post-processing style effects here. Note that this happens before plugins postRender takes place.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 179](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L179))   ### 
resize()

  If your game is set to Scalemode RESIZE then each time the browser resizes it will call this function, passing in the new width and height.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 189](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L189))   ### 
resumed()

  This method will be called when the core game loop resumes from a paused state.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 205](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L205))   ### 
shutdown()

  This method will be called when the State is shutdown (i.e. you switch to another state from this one).

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L221))   ### 
update()

  The update method is left empty for your own use.  
It is called during the core game loop AFTER debug, physics, plugins and the Stage have had their preUpdate methods called.  
It is called BEFORE Stage, Tweens, Sounds, Input, Physics, Particles and Plugins have had their postUpdate methods called.

   Source code: [core/State.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/State.js#L161))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.State.html>

Class: Phaser.StateManager
==========================

 Constructor
-----------

 ### 
new StateManager(game, pendingState)

  The State Manager is responsible for loading, setting up and switching game states.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `pendingState` | [Phaser.State](phaser.state) | Object |  <optional> |  null  | A State object to seed the manager with. |

  Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L17))   Public Properties
-----------------

  ### 
[readonly] created : boolean

  True if the current state has had its `create` method run (if it has one, if not this is true by default).

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 774](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L774))   ### 
current : string

  The current active State object.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L68))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L22))   ### 
onCreateCallback : Function

  This is called when the state preload has finished and creation begins.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L100))   ### 
onInitCallback : Function

  This is called when the state is set as the active state.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 88](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L88))   ### 
onLoadRenderCallback : Function

  This is called when the State is rendered during the preload phase.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 136](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L136))   ### 
onLoadUpdateCallback : Function

  This is called when the State is updated during the preload phase.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L130))   ### 
onPausedCallback : Function

  This is called when the game is paused.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L142))   ### 
onPauseUpdateCallback : Function

  This is called every frame while the game is paused.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 154](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L154))   ### 
onPreloadCallback : Function

  This is called when the state starts to load assets.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L94))   ### 
onPreRenderCallback : Function

  This is called before the state is rendered and before the stage is cleared but after all game objects have had their final properties adjusted.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L124))   ### 
onRenderCallback : Function

  This is called post-render. It doesn't happen during preload (see onLoadRenderCallback).

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L112))   ### 
onResizeCallback : Function

  This is called if ScaleManager.scalemode is RESIZE and a resize event occurs. It's passed the new width and height.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 118](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L118))   ### 
onResumedCallback : Function

  This is called when the game is resumed from a paused state.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 148](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L148))   ### 
onShutDownCallback : Function

  This is called when the state is shut down (i.e. swapped to another state).

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L160))   ### 
onStateChange : [Phaser.Signal](phaser.signal)

  onStateChange is a Phaser.Signal that is dispatched whenever the game changes state.

 It is dispatched only when the new state is started, which isn't usually at the same time as StateManager.start  
is called because state swapping is done in sync with the game loop. It is dispatched *before* any of the new states  
methods (such as preload and create) are called, and *after* the previous states shutdown method has been run.

 The callback you specify is sent two parameters: the string based key of the new state,  
and the second parameter is the string based key of the old / previous state.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L82))   ### 
onUpdateCallback : Function

  This is called when the state is updated, every game loop. It doesn't happen during preload (@see onLoadUpdateCallback).

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L106))   ### 
states : Object

  The object containing Phaser.States.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L27))    Public Methods
--------------

  ### 
add(key, state, autoStart)

  Adds a new State into the StateManager. You must give each State a unique key by which you'll identify it.  
The State can be either a Phaser.State object (or an object that extends it), a plain JavaScript object or a function.  
If a function is given a new state object will be created by calling it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | A unique key you use to reference this state, i.e. "MainMenu", "Level1". |
| `state` | [Phaser.State](phaser.state) | object | function |  |  | The state you want to switch to. |
| `autoStart` | boolean |  <optional> |  false  | If true the State will be started immediately after adding it. |

  Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 183](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L183))   ### 
checkState(key) → {boolean}

  Checks if a given phaser state is valid. A State is considered valid if it has at least one of the core functions: preload, create, update or render.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the state you want to check. |

 ##### Returns

   boolean -   true if the State has the required functions, otherwise false.

    Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 423](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L423))   ### 
clearCurrentState()

  This method clears the current State, calling its shutdown callback. The process also removes any active tweens,  
resets the camera, resets input, clears physics, removes timers and if set clears the world and cache too.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 378](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L378))   ### 
destroy()

  Removes all StateManager callback references to the State object, nulls the game reference and clears the States object.  
You don't recover from this without rebuilding the Phaser instance again.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 736](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L736))   ### 
getCurrentState() → {[Phaser.State](phaser.state)}

  Gets the current State.

  ##### Returns

   [Phaser.State](phaser.state) -    Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 569](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L569))   ### 
<internal> link(key)

  Links game properties to the State given by the key.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | State key. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 452](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L452))   ### 
<internal> loadComplete()

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 580](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L580))   ### 
<internal> pause()

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 604](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L604))   ### 
<internal> pauseUpdate()

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 653](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L653))   ### 
<internal> preRender(elapsedTime)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `elapsedTime` | number | The time elapsed since the last update. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 676](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L676))   ### 
preUpdate()

  preUpdate is called right at the start of the game loop. It is responsible for changing to a new state that was requested previously.

   Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 324](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L324))   ### 
remove(key)

  Delete the given state.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | A unique key you use to reference this state, i.e. "MainMenu", "Level1". |

  Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 231](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L231))   ### 
<internal> render()

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 703](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L703))   ### 
<internal> resize()

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 690](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L690))   ### 
restart(clearWorld, clearCache, parameter)

  Restarts the current State. State.shutDown will be called (if it exists) before the State is restarted.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `clearWorld` | boolean |  <optional> |  true  | Clear everything in the world? This clears the World display list fully (but not the Stage, so if you've added your own objects to the Stage they will need managing directly) |
| `clearCache` | boolean |  <optional> |  false  | Clear the Game.Cache? This purges out all loaded assets. The default is false and you must have clearWorld=true if you want to clearCache as well. |
| `parameter` | \* |  <repeatable> |  | Additional parameters that will be passed to the State.init function if it has one. |

  Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 291](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L291))   ### 
<internal> resume()

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 617](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L617))   ### 
start(key, clearWorld, clearCache, parameter)

  Start the given State. If a State is already running then State.shutDown will be called (if it exists) before switching to the new State.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The key of the state you want to start. |
| `clearWorld` | boolean |  <optional> |  true  | Clear everything in the world? This clears the World display list fully (but not the Stage, so if you've added your own objects to the Stage they will need managing directly) |
| `clearCache` | boolean |  <optional> |  false  | Clear the Game.Cache? This purges out all loaded assets. The default is false and you must have clearWorld=true if you want to clearCache as well. |
| `parameter` | \* |  <repeatable> |  | Additional parameters that will be passed to the State.init function (if it has one). |

  Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 262](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L262))   ### 
<internal> unlink(key)

  Nulls all State level Phaser properties, including a reference to Game.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | State key. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 483](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L483))   ### 
<internal> update()

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/StateManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js) ([Line 630](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/StateManager.js#L630))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.StateManager.html>

Class: Phaser.Camera
====================

 Constructor
-----------

 ### 
new Camera(game, id, x, y, width, height)

  A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view.  
The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Game reference to the currently running game. |
| `id` | number | Not being used at the moment, will be when Phaser supports multiple camera |
| `x` | number | Position of the camera on the X axis |
| `y` | number | Position of the camera on the Y axis |
| `width` | number | The width of the view rectangle |
| `height` | number | The height of the view rectangle |

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L20))   Public Properties
-----------------

  ### 
[static] ENABLE\_FX : boolean

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 231](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L231))   ### 
[static] FOLLOW\_LOCKON : number

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 189](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L189))   ### 
[static] FOLLOW\_PLATFORMER : number

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 195](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L195))   ### 
[static] FOLLOW\_TOPDOWN : number

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 201](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L201))   ### 
[static] FOLLOW\_TOPDOWN\_TIGHT : number

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 207](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L207))   ### 
[static] SHAKE\_BOTH : number

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L213))   ### 
[static] SHAKE\_HORIZONTAL : number

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 219](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L219))   ### 
[static] SHAKE\_VERTICAL : number

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L225))   ### 
atLimit : boolean

  Whether this camera is flush with the World Bounds or not.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 76](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L76))   ### 
bounds : [Phaser.Rectangle](phaser.rectangle)

  The Camera is bound to this Rectangle and cannot move outside of it. By default it is enabled and set to the size of the World.  
The Rectangle can be located anywhere in the world and updated as often as you like. If you don't wish the Camera to be bound  
at all then set this to null. The values can be anything and are in World coordinates, with 0,0 being the top-left of the world. The Rectangle in which the Camera is bounded. Set to null to allow for movement anywhere.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L54))   ### 
deadzone : [Phaser.Rectangle](phaser.rectangle)

  Moving inside this Rectangle will not cause the camera to move.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L59))   ### 
displayObject :PIXI.DisplayObject

  The display object to which all game objects are added. Set by World.boot.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L87))   ### 
<internal> fx : [Phaser.Graphics](phaser.graphics)

  The Graphics object used to handle camera fx such as fade and flash.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L135))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L25))   ### 
height : number

  The Cameras height. By default this is the same as the Game size and should not be adjusted for now. Gets or sets the cameras height.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 898](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L898))   ### 
id : number

  Reserved for future multiple camera set-ups.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L36))   ### 
lerp : [Phaser.Point](phaser.point)

  The linear interpolation value to use when following a target.  
The default values of 1 means the camera will instantly snap to the target coordinates.  
A lower value, such as 0.1 means the camera will more slowly track the target, giving  
a smooth transition. You can set the horizontal and vertical values independently, and also  
adjust this value in real-time during your game.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L109))   ### 
onFadeComplete : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the camera fade effect completes.  
When the fade effect completes you will be left with the screen black (or whatever  
color you faded to). In order to reset this call `Camera.resetFX`. This is called  
automatically when you change State.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 128](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L128))   ### 
onFlashComplete : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the camera flash effect completes.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L119))   ### 
onShakeComplete : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the camera shake effect completes.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 114](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L114))   ### 
position : [Phaser.Point](phaser.point)

  The Cameras position. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras xy position using Phaser.Point object.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 849](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L849))   ### 
roundPx : boolean

  If a Camera has roundPx set to `true` it will call `view.floor` as part of its update loop, keeping its boundary to integer values. Set this to `false` to disable this from happening.

   Default Value * true
 Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 71](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L71))   ### 
scale : [Phaser.Point](phaser.point)

  The scale of the display object to which all game objects are added. Set by World.boot.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L92))   ### 
shakeIntensity : number

  The Cameras shake intensity. Gets or sets the cameras shake intensity.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 920](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L920))   ### 
target : [Phaser.Sprite](phaser.sprite)

  If the camera is tracking a Sprite, this is a reference to it, otherwise null.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L82))   ### 
[readonly] totalInView : number

  The total number of Sprites with `autoCull` set to `true` that are visible by this Camera.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L98))   ### 
view : [Phaser.Rectangle](phaser.rectangle)

  Camera view.  
The view into the world we wish to render (by default the game dimensions).  
The x/y values are in world coordinates, not screen coordinates, the width/height is how many pixels to render.  
Sprites outside of this view are not rendered if Sprite.autoCull is set to `true`. Otherwise they are always rendered.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L45))   ### 
visible : boolean

  Whether this camera is visible or not.

   Default Value * true
 Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L65))   ### 
width : number

  The Cameras width. By default this is the same as the Game size and should not be adjusted for now. Gets or sets the cameras width.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 877](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L877))   ### 
world : [Phaser.World](phaser.world)

  A reference to the game world.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L30))   ### 
x : number

  The Cameras x coordinate. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras x position.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 799](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L799))   ### 
y : number

  The Cameras y coordinate. This value is automatically clamped if it falls outside of the World bounds. Gets or sets the cameras y position.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 824](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L824))    Public Methods
--------------

  ### 
<internal> checkBounds()

  Method called to ensure the camera doesn't venture outside of the game world.  
Called automatically by Camera.update.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 657](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L657))   ### 
fade(color, duration, force) → {boolean}

  This creates a camera fade effect. It works by filling the game with the  
color specified, over the duration given, ending with a solid fill.

 You can use this for things such as transitioning to a new scene.

 The game will be left 'filled' at the end of this effect, likely obscuring  
everything. In order to reset it you can call `Camera.resetFX` and it will clear the  
fade. Or you can call `Camera.flash` with the same color as the fade, and it will  
reverse the process, bringing the game back into view again.

 When the effect ends the signal Camera.onFadeComplete is dispatched.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `color` | numer |  <optional> |  0x000000  | The color the game will fade to. I.e. 0x000000 for black, 0xff0000 for red, etc. |
| `duration` | number |  <optional> |  500  | The duration of the fade in milliseconds. |
| `force` | boolean |  <optional> |  false  | If a camera flash or fade effect is already running and force is true it will replace the previous effect, resetting the duration. |

 ##### Returns

   boolean -   True if the effect was started, otherwise false.

    Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 441](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L441))   ### 
flash(color, duration, force) → {boolean}

  This creates a camera flash effect. It works by filling the game with the solid fill  
color specified, and then fading it away to alpha 0 over the duration given.

 You can use this for things such as hit feedback effects.

 When the effect ends the signal Camera.onFlashComplete is dispatched.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `color` | numer |  <optional> |  0xffffff  | The color of the flash effect. I.e. 0xffffff for white, 0xff0000 for red, etc. |
| `duration` | number |  <optional> |  500  | The duration of the flash effect in milliseconds. |
| `force` | boolean |  <optional> |  false  | If a camera flash or fade effect is already running and force is true it will replace the previous effect, resetting the duration. |

 ##### Returns

   boolean -   True if the effect was started, otherwise false.

    Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 401](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L401))   ### 
focusOn(displayObject)

  Move the camera focus on a display object instantly.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | any | The display object to focus the camera on. Must have visible x/y properties. |

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 335](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L335))   ### 
focusOnXY(x, y)

  Move the camera focus on a location instantly.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | X position. |
| `y` | number | Y position. |

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 346](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L346))   ### 
follow(target, style, lerpX, lerpY)

  Tell the camera which sprite to follow.

 You can set the follow type and a linear interpolation value.  
Use low lerp values (such as 0.1) to automatically smooth the camera motion.

 If you find you're getting a slight "jitter" effect when following a Sprite it's probably to do with sub-pixel rendering of the Sprite position.  
This can be disabled by setting `game.renderer.renderSession.roundPixels = true` to force full pixel rendering.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `target` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) |  |  | The object you want the camera to track. Set to null to not follow anything. |
| `style` | number |  <optional> |  | Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow(). |
| `lerpX` | float |  <optional> |  1  | A value between 0 and 1. This value specifies the amount of linear interpolation to use when horizontally tracking the target. The closer the value to 1, the faster the camera will track. |
| `lerpY` | float |  <optional> |  1  | A value between 0 and 1. This value specifies the amount of linear interpolation to use when vertically tracking the target. The closer the value to 1, the faster the camera will track. |

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 269](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L269))   ### 
preUpdate()

  Camera preUpdate. Sets the total view counter to zero.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 258](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L258))   ### 
reset()

  Resets the camera back to 0,0 and un-follows any object it may have been tracking.  
Also immediately resets any camera effects that may have been running such as  
shake, flash or fade.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 759](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L759))   ### 
resetFX()

  Resets any active FX, such as a fade or flash and immediately clears it.  
Useful to calling after a fade in order to remove the fade from the Stage.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 779](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L779))   ### 
setBoundsToWorld()

  Update the Camera bounds to match the game world.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 643](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L643))   ### 
setPosition(x, y)

  A helper function to set both the X and Y properties of the camera at once  
without having to use game.camera.x and game.camera.y.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | X position. |
| `y` | number | Y position. |

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 725](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L725))   ### 
setSize(width, height)

  Sets the size of the view rectangle given the width and height in parameters.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | The desired width. |
| `height` | number | The desired height. |

  Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 745](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L745))   ### 
shake(intensity, duration, force, direction, shakeBounds) → {boolean}

  This creates a camera shake effect. It works by applying a random amount of additional  
spacing on the x and y axis each frame. You can control the intensity and duration  
of the effect, and if it should effect both axis or just one.

 When the shake effect ends the signal Camera.onShakeComplete is dispatched.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `intensity` | float |  <optional> |  0.05  | The intensity of the camera shake. Given as a percentage of the camera size representing the maximum distance that the camera can move while shaking. |
| `duration` | number |  <optional> |  500  | The duration of the shake effect in milliseconds. |
| `force` | boolean |  <optional> |  true  | If a camera shake effect is already running and force is true it will replace the previous effect, resetting the duration. |
| `direction` | number |  <optional> |  Phaser.Camera.SHAKE\_BOTH  | The directions in which the camera can shake. Either Phaser.Camera.SHAKE\_BOTH, Phaser.Camera.SHAKE\_HORIZONTAL or Phaser.Camera.SHAKE\_VERTICAL. |
| `shakeBounds` | boolean |  <optional> |  true  | Is the effect allowed to shake the camera beyond its bounds (if set?). |

 ##### Returns

   boolean -   True if the shake effect was started, otherwise false.

    Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 358](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L358))   ### 
unfollow()

  Sets the Camera follow target to null, stopping it from following an object if it's doing so.

   Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 324](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L324))   ### 
<internal> update()

  The camera update loop. This is called automatically by the core game loop.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Camera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js) ([Line 486](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Camera.js#L486))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Camera.html>

Class: Phaser.Events
====================

 Constructor
-----------

 ### 
new Events(sprite)

  The Events component is a collection of events fired by the parent Game Object.

 Phaser uses what are known as 'Signals' for all event handling. All of the events in  
this class are signals you can subscribe to, much in the same way you'd "listen" for  
an event.

 For example to tell when a Sprite has been added to a new group, you can bind a function  
to the `onAddedToGroup` signal:

 `sprite.events.onAddedToGroup.add(yourFunction, this);`

 Where `yourFunction` is the function you want called when this event occurs.

 For more details about how signals work please see the Phaser.Signal class.

 The Input-related events will only be dispatched if the Sprite has had `inputEnabled` set to `true`  
and the Animation-related events only apply to game objects with animations like [Phaser.Sprite](phaser.sprite).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | A reference to the game object / Sprite that owns this Events object. |

  Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L30))   Public Properties
-----------------

  ### 
onAddedToGroup : [Phaser.Signal](phaser.signal)

  This signal is dispatched when this Game Object is added to a new Group.  
It is sent two arguments:  
{any} The Game Object that was added to the Group.  
{Phaser.Group} The Group it was added to.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L84))   ### 
onAnimationComplete : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Game Object has the AnimationManager component,  
and an Animation has been stopped (via `animation.stop()` and the `dispatchComplete` argument has been set.  
You can also listen to `Animation.onComplete` rather than via the Game Objects events.  
It is sent two arguments:  
{any} The Game Object that received the event.  
{Phaser.Animation} The Phaser.Animation that was stopped.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L249))   ### 
onAnimationLoop : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Game Object has the AnimationManager component,  
and an Animation has looped playback.  
You can also listen to `Animation.onLoop` rather than via the Game Objects events.  
It is sent two arguments:  
{any} The Game Object that received the event.  
{Phaser.Animation} The Phaser.Animation that looped.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 260](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L260))   ### 
onAnimationStart : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Game Object has the AnimationManager component,  
and an Animation has been played.  
You can also listen to `Animation.onStart` rather than via the Game Objects events.  
It is sent two arguments:  
{any} The Game Object that received the event.  
{Phaser.Animation} The Phaser.Animation that was started.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 238](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L238))   ### 
onDestroy : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the Game Object is destroyed.  
This happens when `Sprite.destroy()` is called, or `Group.destroy()` with `destroyChildren` set to true.  
It is sent one argument:  
{any} The Game Object that was destroyed.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L109))   ### 
onDragStart : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set.  
It is sent when a Phaser.Pointer starts to drag the Game Object, taking into consideration the various  
drag limitations that may be set.  
It is sent four arguments:  
{any} The Game Object that received the event.  
{Phaser.Pointer} The Phaser.Pointer object that caused the event.  
{number} The x coordinate that the drag started from.  
{number} The y coordinate that the drag started from.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 202](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L202))   ### 
onDragStop : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set.  
It is sent when a Phaser.Pointer stops dragging the Game Object.  
It is sent two arguments:  
{any} The Game Object that received the event.  
{Phaser.Pointer} The Phaser.Pointer object that caused the event.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 227](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L227))   ### 
onDragUpdate : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Game Object has been `inputEnabled` and `enableDrag` has been set.  
It is sent when a Phaser.Pointer is actively dragging the Game Object.  
Be warned: This is a high volume Signal. Be careful what you bind to it.  
It is sent six arguments:  
{any} The Game Object that received the event.  
{Phaser.Pointer} The Phaser.Pointer object that caused the event.  
{number} The new x coordinate of the Game Object.  
{number} The new y coordinate of the Game Object.  
{Phaser.Point} A Point object that contains the point the Game Object was snapped to, if `snapOnDrag` has been enabled.  
{boolean} The `fromStart` boolean, indicates if this is the first update immediately after the drag has started.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L217))   ### 
onEnterBounds : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the Game Object returns within the Phaser.World bounds, having previously been outside of them.  
This signal is only if `Sprite.checkWorldBounds` is set to `true`.  
It is sent one argument:  
{any} The Game Object that entered the World bounds.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L146))   ### 
onInputDown : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Game Object has `inputEnabled` set to `true`,  
and receives a down event from a Phaser.Pointer. This effectively means the Pointer has been  
pressed down (but not yet released) on the Game Object.  
It is sent two arguments:  
{any} The Game Object that received the event.  
{Phaser.Pointer} The Phaser.Pointer object that caused the event.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L177))   ### 
onInputOut : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Game Object has `inputEnabled` set to `true`,  
and receives an out event from a Phaser.Pointer, which was previously over it.  
It is sent two arguments:  
{any} The Game Object that received the event.  
{Phaser.Pointer} The Phaser.Pointer object that caused the event.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 166](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L166))   ### 
onInputOver : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Game Object has `inputEnabled` set to `true`,  
and receives an over event from a Phaser.Pointer.  
It is sent two arguments:  
{any} The Game Object that received the event.  
{Phaser.Pointer} The Phaser.Pointer object that caused the event.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L156))   ### 
onInputUp : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Game Object has `inputEnabled` set to `true`,  
and receives an up event from a Phaser.Pointer. This effectively means the Pointer had been  
pressed down, and was then released on the Game Object.  
It is sent three arguments:  
{any} The Game Object that received the event.  
{Phaser.Pointer} The Phaser.Pointer object that caused the event.  
{boolean} isOver - Is the Pointer still over the Game Object?

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 189](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L189))   ### 
onKilled : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the Game Object is killed.  
This happens when `Sprite.kill()` is called.  
Please understand the difference between `kill` and `destroy` by looking at their respective methods.  
It is sent one argument:  
{any} The Game Object that was killed.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L119))   ### 
onOutOfBounds : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the Game Object leaves the Phaser.World bounds.  
This signal is only if `Sprite.checkWorldBounds` is set to `true`.  
It is sent one argument:  
{any} The Game Object that left the World bounds.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 137](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L137))   ### 
onRemovedFromGroup : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the Game Object is removed from a Group.  
It is sent two arguments:  
{any} The Game Object that was removed from the Group.  
{Phaser.Group} The Group it was removed from.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L93))   ### 
onRemovedFromWorld : [Phaser.Signal](phaser.signal)

  This method is *deprecated* and should not be used. It may be removed in the future.   This Signal is never used internally by Phaser and is now deprecated.

   Deprecated: * Yes
 Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L100))   ### 
onRevived : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the Game Object is revived from a previously killed state.  
This happens when `Sprite.revive()` is called.  
It is sent one argument:  
{any} The Game Object that was revived.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 128](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L128))   ### 
parent : [Phaser.Sprite](phaser.sprite)

  The Sprite that owns these events.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L35))    Public Methods
--------------

  ### 
destroy()

  Removes all events.

   Source code: [gameobjects/components/Events.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Events.js#L43))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Events.html>

Class: Phaser.Create
====================

 Constructor
-----------

 ### 
new Create(game)

  The Phaser.Create class is a collection of smaller helper methods that allow you to generate game content  
quickly and easily, without the need for any external files. You can create textures for sprites and in  
coming releases we'll add dynamic sound effect generation support as well (like sfxr).

 Access this via `Game.create` (`this.game.create` from within a State object)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Game reference to the currently running game. |

  Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 18](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L18))   Public Properties
-----------------

  ### 
[static] PALETTE\_ARNE : number

  A 16 color palette by [Arne](http://androidarts.com/palette/16pal.htm)

   Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L58))   ### 
[static] PALETTE\_C64 : number

  A 16 color C64 inspired palette.

   Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L79))   ### 
[static] PALETTE\_CGA : number

  A 16 color CGA inspired palette.

   Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L72))   ### 
[static] PALETTE\_JAPANESE\_MACHINE : number

  A 16 color palette inspired by Japanese computers like the MSX.

   Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L86))   ### 
[static] PALETTE\_JMP : number

  A 16 color JMP inspired palette.

   Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L65))   ### 
bmd : [Phaser.BitmapData](phaser.bitmapdata)

  The internal BitmapData Create uses to generate textures from.

   Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L28))   ### 
canvas :HTMLCanvasElement

  The canvas the BitmapData uses.

   Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L33))   ### 
ctx

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `context` | CanvasRenderingContext2D | The 2d context of the canvas. |

  Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L38))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L23))   ### 
palettes :array

  A range of 16 color palettes for use with sprite generation.

   Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L43))    Public Methods
--------------

  ### 
grid(key, width, height, cellWidth, cellHeight, color) → {[PIXI.Texture](pixi.texture)}

  Creates a grid texture based on the given dimensions.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key used to store this texture in the Phaser Cache. |
| `width` | integer | The width of the grid in pixels. |
| `height` | integer | The height of the grid in pixels. |
| `cellWidth` | integer | The width of the grid cells in pixels. |
| `cellHeight` | integer | The height of the grid cells in pixels. |
| `color` | string | The color to draw the grid lines in. Should be a Canvas supported color string like `#ff5500` or `rgba(200,50,3,0.5)`. |

 ##### Returns

   [PIXI.Texture](pixi.texture) -   The newly generated texture.

    Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 162](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L162))   ### 
texture(key, data, pixelWidth, pixelHeight, palette) → {[PIXI.Texture](pixi.texture)}

  Generates a new PIXI.Texture from the given data, which can be applied to a Sprite.

 This allows you to create game graphics quickly and easily, with no external files but that use actual proper images  
rather than Phaser.Graphics objects, which are expensive to render and limited in scope.

 Each element of the array is a string holding the pixel color values, as mapped to one of the Phaser.Create PALETTE consts.

 For example:

 `var data = [
 ' 333 ',
 ' 777 ',
 'E333E',
 ' 333 ',
 ' 3 3 '
];`

 `game.create.texture('bob', data);`

 The above will create a new texture called `bob`, which will look like a little man wearing a hat. You can then use it  
for sprites the same way you use any other texture: `game.add.sprite(0, 0, 'bob');`

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The key used to store this texture in the Phaser Cache. |
| `data` | array |  |  | An array of pixel data. |
| `pixelWidth` | integer |  <optional> |  8  | The width of each pixel. |
| `pixelHeight` | integer |  <optional> |  8  | The height of each pixel. |
| `palette` | integer |  <optional> |  0  | The palette to use when rendering the texture. One of the Phaser.Create.PALETTE consts. |

 ##### Returns

   [PIXI.Texture](pixi.texture) -   The newly generated texture.

    Source code: [core/Create.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Create.js#L90))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Create.html>

Class: Phaser.LoaderParser
==========================

 Constructor
-----------

 ### 
new LoaderParser()

  Phaser.LoaderParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into the Cache.

   Source code: [loader/LoaderParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/LoaderParser.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/LoaderParser.js#L12))   Public Methods
--------------

  ### 
<static> bitmapFont(xml, baseTexture, xSpacing, ySpacing) → {object}

  Alias for xmlBitmapFont, for backwards compatibility.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `xml` | object |  |  | XML data you want to parse. |
| `baseTexture` | [PIXI.BaseTexture](pixi.basetexture) |  |  | The BaseTexture this font uses. |
| `xSpacing` | number |  <optional> |  0  | Additional horizontal spacing between the characters. |
| `ySpacing` | number |  <optional> |  0  | Additional vertical spacing between the characters. |

 ##### Returns

   object -   The parsed Bitmap Font data.

    Source code: [loader/LoaderParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/LoaderParser.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/LoaderParser.js#L14))   ### 
<static> jsonBitmapFont(json, baseTexture, xSpacing, ySpacing) → {object}

  Parse a Bitmap Font from a JSON file.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `json` | object |  |  | JSON data you want to parse. |
| `baseTexture` | [PIXI.BaseTexture](pixi.basetexture) |  |  | The BaseTexture this font uses. |
| `xSpacing` | number |  <optional> |  0  | Additional horizontal spacing between the characters. |
| `ySpacing` | number |  <optional> |  0  | Additional vertical spacing between the characters. |

 ##### Returns

   object -   The parsed Bitmap Font data.

    Source code: [loader/LoaderParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/LoaderParser.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/LoaderParser.js#L84))   ### 
<static> xmlBitmapFont(xml, baseTexture, xSpacing, ySpacing) → {object}

  Parse a Bitmap Font from an XML file.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `xml` | object |  |  | XML data you want to parse. |
| `baseTexture` | [PIXI.BaseTexture](pixi.basetexture) |  |  | The BaseTexture this font uses. |
| `xSpacing` | number |  <optional> |  0  | Additional horizontal spacing between the characters. |
| `ySpacing` | number |  <optional> |  0  | Additional vertical spacing between the characters. |

 ##### Returns

   object -   The parsed Bitmap Font data.

    Source code: [loader/LoaderParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/LoaderParser.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/LoaderParser.js#L30))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.LoaderParser.html>

Class: Phaser.Cache
===================

 Constructor
-----------

 ### 
new Cache(game)

  Phaser has one single cache in which it stores all assets.

 The cache is split up into sections, such as images, sounds, video, json, etc. All assets are stored using  
a unique string-based key as their identifier. Assets stored in different areas of the cache can have the  
same key, for example 'playerWalking' could be used as the key for both a sprite sheet and an audio file,  
because they are unique data types.

 The cache is automatically populated by the Phaser.Loader. When you use the loader to pull in external assets  
such as images they are automatically placed into their respective cache. Most common Game Objects, such as  
Sprites and Videos automatically query the cache to extract the assets they need on instantiation.

 You can access the cache from within a State via `this.cache`. From here you can call any public method it has,  
including adding new entries to it, deleting them or querying them.

 Understand that almost without exception when you get an item from the cache it will return a reference to the  
item stored in the cache, not a copy of it. Therefore if you retrieve an item and then modify it, the original  
object in the cache will also be updated, even if you don't put it back into the cache again.

 By default when you change State the cache is *not* cleared, although there is an option to clear it should  
your game require it. In a typical game set-up the cache is populated once after the main game has loaded and  
then used as an asset store.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L34))   Public Properties
-----------------

  ### 
[static] BINARY : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 166](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L166))   ### 
[static] BITMAPDATA : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 172](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L172))   ### 
[static] BITMAPFONT : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 178](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L178))   ### 
[static] CANVAS : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L124))   ### 
[static] DEFAULT : [PIXI.Texture](pixi.texture)

  The default image used for a texture when no other is specified.

   Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 215](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L215))   ### 
[static] IMAGE : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L130))   ### 
[static] JSON : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 184](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L184))   ### 
[static] MISSING : [PIXI.Texture](pixi.texture)

  The default image used for a texture when the source image is missing.

   Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 222](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L222))   ### 
[static] PHYSICS : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 154](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L154))   ### 
[static] RENDER\_TEXTURE : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L208))   ### 
[static] SHADER : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 202](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L202))   ### 
[static] SOUND : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L142))   ### 
[static] TEXT : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 148](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L148))   ### 
[static] TEXTURE : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 136](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L136))   ### 
[static] TILEMAP : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L160))   ### 
[static] VIDEO : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 196](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L196))   ### 
[static] XML : number

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 190](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L190))   ### 
autoResolveURL : boolean

  Automatically resolve resource URLs to absolute paths for use with the Cache.getURL method.

   Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L45))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L39))   ### 
onSoundUnlock : [Phaser.Signal](phaser.signal)

  This event is dispatched when the sound system is unlocked via a touch event on cellular devices.

   Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L91))    Public Methods
--------------

  ### 
addBinary(key, binaryData)

  Add a binary object in to the cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `binaryData` | object | The binary object to be added to the cache. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 424](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L424))   ### 
addBitmapData(key, bitmapData, frameData) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Add a BitmapData object to the cache.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `bitmapData` | [Phaser.BitmapData](phaser.bitmapdata) |  |  | The BitmapData object to be addded to the cache. |
| `frameData` | [Phaser.FrameData](phaser.framedata) | null |  <optional> |  (auto create)  | Optional FrameData set associated with the given BitmapData. If not specified (or `undefined`) a new FrameData object is created containing the Bitmap's Frame. If `null` is supplied then no FrameData will be created. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   The BitmapData object to be addded to the cache.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L437))   ### 
addBitmapFont(key, url, data, atlasData, atlasType, xSpacing, ySpacing)

  Add a new Bitmap Font to the Cache.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string |  |  | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `data` | object |  |  | Extra font data. |
| `atlasData` | object |  |  | Texture atlas frames data. |
| `atlasType` | string |  <optional> |  'xml'  | The format of the texture atlas ( 'json' or 'xml' ). |
| `xSpacing` | number |  <optional> |  0  | If you'd like to add additional horizontal spacing between the characters then set the pixel value here. |
| `ySpacing` | number |  <optional> |  0  | If you'd like to add additional vertical spacing between the lines then set the pixel value here. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 462](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L462))   ### 
addCanvas(key, canvas, context)

  Add a new canvas object in to the cache.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `key` | string |  | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `canvas` | HTMLCanvasElement |  | The Canvas DOM element. |
| `context` | CanvasRenderingContext2D |  <optional> | The context of the canvas element. If not specified it will default go `getContext('2d')`. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 230](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L230))   ### 
<internal> addDefaultImage()

  Adds a default image to be used in special cases such as WebGL Filters.  
It uses the special reserved key of `__default`.  
This method is called automatically when the Cache is created.  
This image is skipped when `Cache.destroy` is called due to its internal requirements.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 291](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L291))   ### 
addImage(key, url, data) → {object}

  Adds an Image file into the Cache. The file must have already been loaded, typically via Phaser.Loader, but can also have been loaded into the DOM.  
If an image already exists in the cache with the same key then it is removed and destroyed, and the new image inserted in its place.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `data` | object | Extra image data. |

 ##### Returns

   object -   The full image object that was added to the cache.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L246))   ### 
addJSON(key, url, data)

  Add a new json object into the cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `data` | object | Extra json data. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 501](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L501))   ### 
<internal> addMissingImage()

  Adds an image to be used when a key is wrong / missing.  
It uses the special reserved key of `__missing`.  
This method is called automatically when the Cache is created.  
This image is skipped when `Cache.destroy` is called due to its internal requirements.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 316](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L316))   ### 
addPhysicsData(key, url, JSONData, format)

  Add a new physics data object to the Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `JSONData` | object | The physics data object (a JSON file). |
| `format` | number | The format of the physics data. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 390](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L390))   ### 
addRenderTexture(key, texture)

  Add a new Phaser.RenderTexture in to the cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `texture` | [Phaser.RenderTexture](phaser.rendertexture) | The texture to use as the base of the RenderTexture. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 566](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L566))   ### 
addShader(key, url, data)

  Adds a Fragment Shader in to the Cache. The file must have already been loaded, typically via Phaser.Loader.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `data` | object | Extra shader data. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 550](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L550))   ### 
addSound(key, url, data, webAudio, audioTag)

  Adds a Sound file into the Cache. The file must have already been loaded, typically via Phaser.Loader.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `data` | object | Extra sound data. |
| `webAudio` | boolean | True if the file is using web audio. |
| `audioTag` | boolean | True if the file is using legacy HTML audio. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L338))   ### 
addSpriteSheet(key, url, data, frameWidth, frameHeight, frameMax, margin, spacing)

  Add a new sprite sheet in to the cache.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string |  |  | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `data` | object |  |  | Extra sprite sheet data. |
| `frameWidth` | number |  |  | Width of the sprite sheet. |
| `frameHeight` | number |  |  | Height of the sprite sheet. |
| `frameMax` | number |  <optional> |  -1  | How many frames stored in the sprite sheet. If -1 then it divides the whole sheet evenly. |
| `margin` | number |  <optional> |  0  | If the frames have been drawn with a margin, specify the amount here. |
| `spacing` | number |  <optional> |  0  | If the frames have been drawn with spacing between them, specify the amount here. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 579](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L579))   ### 
addText(key, url, data)

  Add a new text data.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `data` | object | Extra text data. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 374](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L374))   ### 
addTextureAtlas(key, url, data, atlasData, format)

  Add a new texture atlas to the Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `data` | object | Extra texture atlas data. |
| `atlasData` | object | Texture atlas frames data. |
| `format` | number | The format of the texture atlas. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 616](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L616))   ### 
addTilemap(key, url, mapData, format)

  Add a new tilemap to the Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `mapData` | object | The tilemap data object (either a CSV or JSON file). |
| `format` | number | The format of the tilemap data. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 407](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L407))   ### 
addVideo(key, url, data, isBlob)

  Adds a Video file into the Cache. The file must have already been loaded, typically via Phaser.Loader.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `data` | object | Extra video data. |
| `isBlob` | boolean | True if the file was preloaded via xhr and the data parameter is a Blob. false if a Video tag was created instead. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 533](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L533))   ### 
addXML(key, url, data)

  Add a new xml object into the cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key that this asset will be stored in the cache under. This should be unique within this cache. |
| `url` | string | The URL the asset was loaded from. If the asset was not loaded externally set to `null`. |
| `data` | object | Extra text data. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 517](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L517))   ### 
checkBinaryKey(key) → {boolean}

  Checks if the given key exists in the Binary Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 915](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L915))   ### 
checkBitmapDataKey(key) → {boolean}

  Checks if the given key exists in the BitmapData Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 928](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L928))   ### 
checkBitmapFontKey(key) → {boolean}

  Checks if the given key exists in the BitmapFont Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 941](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L941))   ### 
checkCanvasKey(key) → {boolean}

  Checks if the given key exists in the Canvas Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 824](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L824))   ### 
checkImageKey(key) → {boolean}

  Checks if the given key exists in the Image Cache. Note that this also includes Texture Atlases, Sprite Sheets and Retro Fonts.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 837](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L837))   ### 
checkJSONKey(key) → {boolean}

  Checks if the given key exists in the JSON Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 954](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L954))   ### 
checkKey(cache, key) → {boolean}

  Checks if a key for the given cache object type exists.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `cache` | integer | The cache to search. One of the Cache consts such as `Phaser.Cache.IMAGE` or `Phaser.Cache.SOUND`. |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 784](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L784))   ### 
checkPhysicsKey(key) → {boolean}

  Checks if the given key exists in the Physics Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 889](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L889))   ### 
checkRenderTextureKey(key) → {boolean}

  Checks if the given key exists in the Render Texture Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1006](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1006))   ### 
checkShaderKey(key) → {boolean}

  Checks if the given key exists in the Fragment Shader Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 993](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L993))   ### 
checkSoundKey(key) → {boolean}

  Checks if the given key exists in the Sound Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 863](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L863))   ### 
checkTextKey(key) → {boolean}

  Checks if the given key exists in the Text Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 876](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L876))   ### 
checkTextureKey(key) → {boolean}

  Checks if the given key exists in the Texture Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 850](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L850))   ### 
checkTilemapKey(key) → {boolean}

  Checks if the given key exists in the Tilemap Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 902](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L902))   ### 
checkURL(url) → {boolean}

  Checks if the given URL has been loaded into the Cache.  
This method will only work if Cache.autoResolveURL was set to `true` before any preloading took place.  
The method will make a DOM src call to the URL given, so please be aware of this for certain file types, such as Sound files on Firefox  
which may cause double-load instances.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `url` | string | The url to check for in the cache. |

 ##### Returns

   boolean -   True if the url exists, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 803](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L803))   ### 
checkVideoKey(key) → {boolean}

  Checks if the given key exists in the Video Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 980](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L980))   ### 
checkXMLKey(key) → {boolean}

  Checks if the given key exists in the XML Cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the key exists in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 967](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L967))   ### 
<internal> clearGLTextures()

  Empties out all of the GL Textures from Images stored in the cache.  
This is called automatically when the WebGL context is lost and then restored.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1897](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1897))   ### 
decodedSound(key, data)

  Add a new decoded sound.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |
| `data` | object | Extra sound data. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 726](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L726))   ### 
destroy()

  Clears the cache. Removes every local cache object reference.  
If an object in the cache has a `destroy` method it will also be called.

   Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1947](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1947))   ### 
getBaseTexture(key, cache) → {[PIXI.BaseTexture](pixi.basetexture)}

  Gets a PIXI.BaseTexture by key from the given Cache.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Asset key of the image for which you want the BaseTexture for. |
| `cache` | integer |  <optional> |  Phaser.Cache.IMAGE  | The cache to search for the item in. |

 ##### Returns

   [PIXI.BaseTexture](pixi.basetexture) -   The BaseTexture object.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1426](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1426))   ### 
getBinary(key) → {object}

  Gets a binary object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   object -   The binary data object.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1266](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1266))   ### 
getBitmapData(key) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Gets a BitmapData object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   The requested BitmapData object if found, or null if not.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1283](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1283))   ### 
getBitmapFont(key) → {Phaser.BitmapFont}

  Gets a Bitmap Font object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   Phaser.BitmapFont -   The requested BitmapFont object if found, or null if not.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1300](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1300))   ### 
getCanvas(key) → {object}

  Gets a Canvas object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   object -   The canvas object or `null` if no item could be found matching the given key.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1061](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1061))   ### 
getFrame(key, cache) → {[Phaser.Frame](phaser.frame)}

  Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Asset key of the frame data to retrieve from the Cache. |
| `cache` | integer |  <optional> |  Phaser.Cache.IMAGE  | The cache to search for the item in. |

 ##### Returns

   [Phaser.Frame](phaser.frame) -   The frame data.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1442](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1442))   ### 
getFrameByIndex(key, index, cache) → {[Phaser.Frame](phaser.frame)}

  Get a single frame out of a frameData set by key.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Asset key of the frame data to retrieve from the Cache. |
| `index` | number |  |  | The index of the frame you want to get. |
| `cache` | integer |  <optional> |  Phaser.Cache.IMAGE  | The cache to search. One of the Cache consts such as `Phaser.Cache.IMAGE` or `Phaser.Cache.SOUND`. |

 ##### Returns

   [Phaser.Frame](phaser.frame) -   The frame object.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1536](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1536))   ### 
getFrameByName(key, name, cache) → {[Phaser.Frame](phaser.frame)}

  Get a single frame out of a frameData set by key.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Asset key of the frame data to retrieve from the Cache. |
| `name` | string |  |  | The name of the frame you want to get. |
| `cache` | integer |  <optional> |  Phaser.Cache.IMAGE  | The cache to search. One of the Cache consts such as `Phaser.Cache.IMAGE` or `Phaser.Cache.SOUND`. |

 ##### Returns

   [Phaser.Frame](phaser.frame) -   The frame object.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1560](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1560))   ### 
getFrameCount(key, cache) → {number}

  Get the total number of frames contained in the FrameData object specified by the given key.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Asset key of the FrameData you want. |
| `cache` | integer |  <optional> |  Phaser.Cache.IMAGE  | The cache to search for the item in. |

 ##### Returns

   number -   Then number of frames. 0 if the image is not found.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1458](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1458))   ### 
getFrameData(key, cache) → {[Phaser.FrameData](phaser.framedata)}

  Gets a Phaser.FrameData object from the Image Cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Asset key of the frame data to retrieve from the Cache. |
| `cache` | integer |  <optional> |  Phaser.Cache.IMAGE  | The cache to search for the item in. |

 ##### Returns

   [Phaser.FrameData](phaser.framedata) -   The frame data.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1481](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1481))   ### 
getImage(key, full) → {Image}

  Gets a Image object from the cache. This returns a DOM Image object, not a Phaser.Image object.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

 Only the Image cache is searched, which covers images loaded via Loader.image, Sprite Sheets and Texture Atlases.

 If you need the image used by a bitmap font or similar then please use those respective 'get' methods.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  <optional> |  | The key of the asset to retrieve from the cache. If not given or null it will return a default image. If given but not found in the cache it will throw a warning and return the missing image. |
| `full` | boolean |  <optional> |  false  | If true the full image object will be returned, if false just the HTML Image object is returned. |

 ##### Returns

   Image -   The Image object if found in the Cache, otherwise `null`. If `full` was true then a JavaScript object is returned.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1078](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1078))   ### 
getItem(key, cache, method, property) → {object}

  Get an item from a cache based on the given key and property.

 This method is mostly used internally by other Cache methods such as `getImage` but is exposed  
publicly for your own use as well.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `key` | string |  | The key of the asset within the cache. |
| `cache` | integer |  | The cache to search. One of the Cache consts such as `Phaser.Cache.IMAGE` or `Phaser.Cache.SOUND`. |
| `method` | string |  <optional> | The string name of the method calling getItem. Can be empty, in which case no console warning is output. |
| `property` | string |  <optional> | If you require a specific property from the cache item, specify it here. |

 ##### Returns

   object -   The cached item if found, otherwise `null`. If the key is invalid and `method` is set then a console.warn is output.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1023](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1023))   ### 
getJSON(key, clone) → {object}

  Gets a JSON object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

 You can either return the object by reference (the default), or return a clone  
of it by setting the `clone` argument to `true`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The key of the asset to retrieve from the cache. |
| `clone` | boolean |  <optional> |  false  | Return a clone of the original object (true) or a reference to it? (false) |

 ##### Returns

   object -   The JSON object, or an Array if the key points to an Array property. If the property wasn't found, it returns null.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1317](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1317))   ### 
getKeys(cache) → {Array}

  Gets all keys used in the requested Cache.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `cache` | integer |  <optional> |  Phaser.Cache.IMAGE  | The Cache you wish to get the keys from. Can be any of the Cache consts such as `Phaser.Cache.IMAGE`, `Phaser.Cache.SOUND` etc. |

 ##### Returns

   Array -   The array of keys in the requested cache.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1609](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1609))   ### 
getPhysicsData(key, object, fixtureKey) → {object}

  Gets a Physics Data object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

 You can get either the entire data set, a single object or a single fixture of an object from it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The key of the asset to retrieve from the cache. |
| `object` | string |  <optional> |  null  | If specified it will return just the physics object that is part of the given key, if null it will return them all. |
| `fixtureKey` | string |  |  | Fixture key of fixture inside an object. This key can be set per fixture with the Phaser Exporter. |

 ##### Returns

   object -   The requested physics object data if found.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1187](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1187))   ### 
getRenderTexture(key) → {Object}

  Gets a RenderTexture object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   Object -   The object with Phaser.RenderTexture and Phaser.Frame.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1405](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1405))   ### 
getShader(key) → {string}

  Gets a fragment shader object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   string -   The shader object.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1388](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1388))   ### 
getSound(key) → {[Phaser.Sound](phaser.sound)}

  Gets a Phaser.Sound object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   The sound object.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1136](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1136))   ### 
getSoundData(key) → {object}

  Gets a raw Sound data object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   object -   The sound data.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1153))   ### 
getText(key) → {object}

  Gets a Text object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   object -   The text data.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1170))   ### 
getTextureFrame(key) → {[Phaser.Frame](phaser.frame)}

  Get a single texture frame by key.

 You'd only do this to get the default Frame created for a non-atlas / spritesheet image.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   [Phaser.Frame](phaser.frame) -   The frame data.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1121](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1121))   ### 
getTilemapData(key) → {object}

  Gets a raw Tilemap data object from the cache. This will be in either CSV or JSON format.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   object -   The raw tilemap data in CSV or JSON format.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1249))   ### 
getURL(url) → {object}

  Get a cached object by the URL.  
This only returns a value if you set Cache.autoResolveURL to `true` *before* starting the preload of any assets.  
Be aware that every call to this function makes a DOM src query, so use carefully and double-check for implications in your target browsers/devices.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `url` | string | The url for the object loaded to get from the cache. |

 ##### Returns

   object -   The cached object.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1584](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1584))   ### 
getVideo(key) → {[Phaser.Video](phaser.video)}

  Gets a Phaser.Video object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   [Phaser.Video](phaser.video) -   The video object.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1371](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1371))   ### 
getXML(key) → {object}

  Gets an XML object from the cache.

 The object is looked-up based on the key given.

 Note: If the object cannot be found a `console.warn` message is displayed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset to retrieve from the cache. |

 ##### Returns

   object -   The XML object.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1354](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1354))   ### 
hasFrameData(key, cache) → {boolean}

  Check if the FrameData for the given key exists in the Image Cache.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Asset key of the frame data to retrieve from the Cache. |
| `cache` | integer |  <optional> |  Phaser.Cache.IMAGE  | The cache to search for the item in. |

 ##### Returns

   boolean -   True if the given key has frameData in the cache, otherwise false.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1501](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1501))   ### 
isSoundDecoded(key) → {boolean}

  Check if the given sound has finished decoding.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   The decoded state of the Sound object.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 743](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L743))   ### 
isSoundReady(key) → {boolean}

  Check if the given sound is ready for playback.  
A sound is considered ready when it has finished decoding and the device is no longer touch locked.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

 ##### Returns

   boolean -   True if the sound is decoded and the device is not touch locked.

    Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 761](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L761))   ### 
reloadSound(key)

  Reload a Sound file from the server.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 666](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L666))   ### 
reloadSoundComplete(key)

  Fires the onSoundUnlock event when the sound has completed reloading.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 691](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L691))   ### 
removeBinary(key)

  Removes a binary file from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1747](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1747))   ### 
removeBitmapData(key)

  Removes a bitmap data from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1762](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1762))   ### 
removeBitmapFont(key)

  Removes a bitmap font from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1777](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1777))   ### 
removeCanvas(key)

  Removes a canvas from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1641](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1641))   ### 
removeImage(key, destroyBaseTexture)

  Removes an image from the cache.

 You can optionally elect to destroy it as well. This calls BaseTexture.destroy on it.

 Note that this only removes it from the Phaser Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Key of the asset you want to remove. |
| `destroyBaseTexture` | boolean |  <optional> |  true  | Should the BaseTexture behind this image also be destroyed? |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1656](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1656))   ### 
removeJSON(key)

  Removes a json object from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1792](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1792))   ### 
removePhysics(key)

  Removes a physics data file from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1717))   ### 
removeRenderTexture(key)

  Removes a Render Texture from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1852](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1852))   ### 
removeShader(key)

  Removes a shader from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1837](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1837))   ### 
removeSound(key)

  Removes a sound from the cache.

 If any `Phaser.Sound` objects use the audio file in the cache that you remove with this method, they will  
*automatically* destroy themselves. If you wish to have full control over when Sounds are destroyed then  
you must finish your house-keeping and destroy them all yourself first, before calling this method.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1683](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1683))   ### 
removeSpriteSheet(key)

  Removes a Sprite Sheet from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1867](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1867))   ### 
removeText(key)

  Removes a text file from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1702](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1702))   ### 
removeTextureAtlas(key)

  Removes a Texture Atlas from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1882](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1882))   ### 
removeTilemap(key)

  Removes a tilemap from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1732](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1732))   ### 
removeVideo(key)

  Removes a video from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1822](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1822))   ### 
removeXML(key)

  Removes a xml object from the cache.

 Note that this only removes it from the Phaser.Cache. If you still have references to the data elsewhere  
then it will persist in memory.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Key of the asset you want to remove. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1807](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1807))   ### 
updateFrameData(key, frameData, cache)

  Replaces a set of frameData with a new Phaser.FrameData object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The unique key by which you will reference this object. |
| `frameData` | number |  |  | The new FrameData. |
| `cache` | integer |  <optional> |  Phaser.Cache.IMAGE  | The cache to search. One of the Cache consts such as `Phaser.Cache.IMAGE` or `Phaser.Cache.SOUND`. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 1517](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L1517))   ### 
updateSound(key)

  Updates the sound object in the cache.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the asset within the cache. |

  Source code: [loader/Cache.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js) ([Line 709](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Cache.js#L709))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Cache.html>

Class: Phaser.Stage
===================

 Constructor
-----------

 ### 
new Stage(game)

  The Stage controls root level display objects upon which everything is displayed.  
It also handles browser visibility handling and the pausing due to loss of focus.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Game reference to the currently running game. |

  Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 16](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L16))   Extends
-------

 * [PIXI.DisplayObjectContainer](pixi.displayobjectcontainer)

 Public Properties
-----------------

  ### 
backgroundColor : number | string

  Gets and sets the background color of the stage. The color can be given as a number: 0xff0000 or a hex string: '#ff0000'

  ##### Type

 * number | string

  Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 366](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L366))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
currentRenderOrderID : number

  Reset each frame, keeps a count of the total number of objects updated.

   Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L65))   ### 
disableVisibilityChange : boolean

  By default if the browser tab loses focus the game will pause.  
You can stop that behavior by setting this property to true.  
Note that the browser can still elect to pause your game if it wishes to do so,  
for example swapping to another browser tab. This will cause the RAF callback to halt,  
effectively pausing your game, even though no in-game pause event is triggered if you enable this property.

   Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L40))   ### 
exists : boolean

  If exists is true the Stage and all children are updated, otherwise it is skipped.

   Default Value * true
 Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L46))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L21))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
name : string

  The name of this object.

   Default Value * \_stage\_root
 Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L29))   ### 
smoothed : boolean

  Enable or disable texture smoothing for all objects on this Stage. Only works for bitmap/image textures. Smoothing is enabled by default. Set to true to smooth all sprites rendered on this Stage, or false to disable smoothing (great for pixel art)

   Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L386))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
checkVisibility()

  Starts a page visibility event listener running, or window.onpagehide/onpageshow if not supported by the browser.  
Also listens for window.onblur and window.onfocus.

   Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L221))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
destroy()

  Destroys the Stage and removes event listeners.

   Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 346](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L346))   ### 
getBounds(targetCoordinateSpace) → {Rectangle}

  Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `targetCoordinateSpace` | PIXIDisplayObject | PIXIMatrix |  <optional> | Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. |

 ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getBounds](pixi.displayobjectcontainer#getBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 280](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L280))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
<internal> parseConfig(config)

  Parses a Game configuration object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `config` | object | The configuration object to parse. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 101](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L101))   ### 
postUpdate()

  This is called automatically before the renderer runs and after the plugins have updated.  
In postUpdate this is where all the final physics calculations and object positioning happens.  
The objects are processed in the order of the display list.

   Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 173](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L173))   ### 
preUpdate()

  This is called automatically after the plugins preUpdate and before the State.update.  
Most objects have preUpdate methods and it's where initial movement and positioning is done.

   Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L138))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
setBackgroundColor(color)

  Sets the background color for the Stage.

 The color can be given as a hex string (`'#RRGGBB'`), a CSS color string (`'rgb(r,g,b)'`), or a numeric value (`0xRRGGBB`).

 An alpha channel is *not* supported and will be ignored.

 If you've set your game to be transparent then calls to setBackgroundColor are ignored.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | number | string | The color of the background. |

  Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 319](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L319))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  This is called automatically after the State.update, but before particles or plugins update.

   Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L156))   ### 
updateTransform()

  Updates the transforms for all objects on the display list.  
This overrides the Pixi default as we don't need the interactionManager, but do need the game property check.

   Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L204))   ### 
visibilityChange(event)

  This method is called when the document visibility is changed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | [Event](event) | Its type will be used to decide whether the game should be paused or not. |

  Source code: [core/Stage.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js) ([Line 281](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Stage.js#L281))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Stage.html>

Class: Phaser.Plugin
====================

 Constructor
-----------

 ### 
new Plugin(game, parent)

  This is a base Plugin template to use for any Phaser plugin development.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `parent` | any | The object that owns this plugin, usually Phaser.PluginManager. |

  Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L15))   Classes
-------

   [PathManager](phaser.plugin.pathmanager)   Public Properties
-----------------

  ### 
active : boolean

  A Plugin with active=true has its preUpdate and update methods called by the parent, otherwise they are skipped.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L33))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L22))   ### 
hasPostRender : boolean

  A flag to indicate if this plugin has a postRender method.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L69))   ### 
hasPostUpdate : boolean

  A flag to indicate if this plugin has a postUpdate method.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L57))   ### 
hasPreUpdate : boolean

  A flag to indicate if this plugin has a preUpdate method.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L45))   ### 
hasRender : boolean

  A flag to indicate if this plugin has a render method.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L63))   ### 
hasUpdate : boolean

  A flag to indicate if this plugin has an update method.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L51))   ### 
parent :any

  The parent of this plugin. If added to the PluginManager the parent will be set to that, otherwise it will be null.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L27))   ### 
visible : boolean

  A Plugin with visible=true has its render and postRender methods called by the parent, otherwise they are skipped.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L39))    Public Methods
--------------

  ### 
destroy()

  Clear down this Plugin and null out references

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L107))   ### 
postRender()

  Post-render is called after the Game Renderer and State.render have run.  
It is only called if visible is set to true.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 99](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L99))   ### 
preUpdate()

  Pre-update is called at the very start of the update cycle, before any other subsystems have been updated (including Physics).  
It is only called if active is set to true.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L75))   ### 
render()

  Render is called right after the Game Renderer completes, but before the State.render.  
It is only called if visible is set to true.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L91))   ### 
update()

  Update is called after all the core subsystems (Input, Tweens, Sound, etc) and the State have updated, but before the render.  
It is only called if active is set to true.

   Source code: [core/Plugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Plugin.js#L83))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Plugin.html>

Class: Phaser.FlexGrid
======================

 Constructor
-----------

 ### 
new FlexGrid(manager, width, height)

  WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete.  
Please try to avoid using in production games with a long time to build.  
This is also why the documentation is incomplete.

 FlexGrid is a a responsive grid manager that works in conjunction with the ScaleManager RESIZE scaling mode and FlexLayers  
to provide for game object positioning in a responsive manner.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `manager` | [Phaser.ScaleManager](phaser.scalemanager) | The ScaleManager. |
| `width` | number | The width of the game. |
| `height` | number | The height of the game. |

  Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L21))   Public Properties
-----------------

  ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L26))   ### 
manager : [Phaser.ScaleManager](phaser.scalemanager)

  A reference to the ScaleManager.

   Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L31))   ### 
[readonly] positionCustom

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `position` | [Phaser.Point](phaser.point) | - |

  Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L46))   ### 
[readonly] scaleCustom

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `scaleFactor` | [Phaser.Point](phaser.point) | The scale factor based on the game dimensions vs. the scaled dimensions. |

  Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L55))    Public Methods
--------------

  ### 
createCustomLayer(width, height, children) → {[Phaser.FlexLayer](phaser.flexlayer)}

  A custom layer is centered on the game and maintains its aspect ratio as it scales up and down.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `width` | number |  | Width of this layer in pixels. |
| `height` | number |  | Height of this layer in pixels. |
| `children` | Array.<PIXI.DisplayObject> |  <optional> | An array of children that are used to populate the FlexLayer. |

 ##### Returns

   [Phaser.FlexLayer](phaser.flexlayer) -   The Layer object.

    Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L104))   ### 
createFixedLayer(children) → {[Phaser.FlexLayer](phaser.flexlayer)}

  A fixed layer is centered on the game and is the size of the required dimensions and is never scaled.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `children` | Array.<PIXI.DisplayObject> |  <optional> | An array of children that are used to populate the FlexLayer. |

 ##### Returns

   [Phaser.FlexLayer](phaser.flexlayer) -   The Layer object.

    Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 194](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L194))   ### 
createFluidLayer(children) → {[Phaser.FlexLayer](phaser.flexlayer)}

  A fluid layer is centered on the game and maintains its aspect ratio as it scales up and down.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `children` | array |  <optional> | An array of children that are used to populate the FlexLayer. |

 ##### Returns

   [Phaser.FlexLayer](phaser.flexlayer) -   The Layer object.

    Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 141](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L141))   ### 
createFullLayer(children) → {[Phaser.FlexLayer](phaser.flexlayer)}

  A full layer is placed at 0,0 and extends to the full size of the game. Children are scaled according to the fluid ratios.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `children` | array |  <optional> | An array of children that are used to populate the FlexLayer. |

 ##### Returns

   [Phaser.FlexLayer](phaser.flexlayer) -   The Layer object.

    Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L170))   ### 
debug()

  Call in the render function to output the bounds rects.

   Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 299](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L299))   ### 
fitSprite(sprite)

  Fits a sprites width to the bounds.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | The Sprite to fit. |

  Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L284))   ### 
onResize(width, height)

  Called when the game container changes dimensions.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | The new width of the game container. |
| `height` | number | The new height of the game container. |

  Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L240))   ### 
refresh()

  Updates all internal vars such as the bounds and scale values.

   Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 256](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L256))   ### 
reset()

  Resets the layer children references

   Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L218))   ### 
setSize(width, height)

  Sets the core game size. This resets the w/h parameters and bounds.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | The new dimensions. |
| `height` | number | The new dimensions. |

  Source code: [core/FlexGrid.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexGrid.js#L77))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.FlexGrid.html>

Class: Phaser.Signal
====================

 Constructor
-----------

 ### 
new Signal()

  Signals are what Phaser uses to handle events and event dispatching.  
You can listen for a Signal by binding a callback / function to it.  
This is done by using either `Signal.add` or `Signal.addOnce`.

 For example you can listen for a touch or click event from the Input Manager  
by using its `onDown` Signal:

 `game.input.onDown.add(function() { ... });`

 Rather than inline your function, you can pass a reference:

 `game.input.onDown.add(clicked, this);`  
`function clicked () { ... }`

 In this case the second argument (`this`) is the context in which your function should be called.

 Now every time the InputManager dispatches the `onDown` signal (or event), your function  
will be called.

 Very often a Signal will send arguments to your function.  
This is specific to the Signal itself.  
If you're unsure then check the documentation, or failing that simply do:

 `Signal.add(function() { console.log(arguments); })`

 and it will log all of the arguments your function received from the Signal.

 Sprites have lots of default signals you can listen to in their Events class, such as:

 `sprite.events.onKilled`

 Which is called automatically whenever the Sprite is killed.  
There are lots of other events, see the Events component for a list.

 As well as listening to pre-defined Signals you can also create your own:

 `var mySignal = new Phaser.Signal();`

 This creates a new Signal. You can bind a callback to it:

 `mySignal.add(myCallback, this);`

 and then finally when ready you can dispatch the Signal:

 `mySignal.dispatch(your arguments);`

 And your callback will be invoked. See the dispatch method for more details.

   Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L60))   Public Properties
-----------------

  ### 
active : boolean

  Is the Signal active? Only active signals will broadcast dispatched events.

 Setting this property during a dispatch will only affect the next dispatch. To stop the propagation of a signal from a listener use [halt](phaser.signal#halt).

   Default Value * true
 Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L100))   ### 
memorize : boolean

  Memorize the previously dispatched event?

 If an event has been memorized it is automatically dispatched when a new listener is added with [add](phaser.signal#add) or [addOnce](phaser.signal#addOnce).  
Use [forget](phaser.signal#forget) to clear any currently memorized event.

   Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L84))    Public Methods
--------------

  ### 
add(listener, listenerContext, priority, args) → {[Phaser.SignalBinding](phaser.signalbinding)}

  Add an event listener for this signal.

 An event listener is a callback with a related context and priority.

 You can optionally provide extra arguments which will be passed to the callback after any internal parameters.

 For example: `Phaser.Key.onDown` when dispatched will send the Phaser.Key object that caused the signal as the first parameter.  
Any arguments you've specified after `priority` will be sent as well:

 `fireButton.onDown.add(shoot, this, 0, 'lazer', 100);`

 When onDown dispatches it will call the `shoot` callback passing it: `Phaser.Key, 'lazer', 100`.

 Where the first parameter is the one that Key.onDown dispatches internally and 'lazer',  
and the value 100 were the custom arguments given in the call to 'add'.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | function |  |  | The function to call when this Signal is dispatched. |
| `listenerContext` | object |  <optional> |  | The context under which the listener will be executed (i.e. the object that should represent the `this` variable). |
| `priority` | number |  <optional> |  | The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added (default = 0) |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback (listener) function. They will be appended after any arguments usually dispatched. |

 ##### Returns

   [Phaser.SignalBinding](phaser.signalbinding) -   An Object representing the binding between the Signal and listener.

    Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L232))   ### 
addOnce(listener, listenerContext, priority, args) → {[Phaser.SignalBinding](phaser.signalbinding)}

  Add a one-time listener - the listener is automatically removed after the first execution.

 If there is as [memorized](phaser.signal#memorize) event then it will be dispatched and  
the listener will be removed immediately.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | function |  |  | The function to call when this Signal is dispatched. |
| `listenerContext` | object |  <optional> |  | The context under which the listener will be executed (i.e. the object that should represent the `this` variable). |
| `priority` | number |  <optional> |  | The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added (default = 0) |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback (listener) function. They will be appended after any arguments usually dispatched. |

 ##### Returns

   [Phaser.SignalBinding](phaser.signalbinding) -   An Object representing the binding between the Signal and listener.

    Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 274](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L274))   ### 
dispatch(params)

  Dispatch / broadcast the event to all listeners.

 To create an instance-bound dispatch for this Signal, use boundDispatch.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `params` | any |  <optional> | Parameters that should be passed to each handler. |

  Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 395](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L395))   ### 
dispose()

  Dispose the signal - no more events can be dispatched.

 This removes all event listeners and clears references to external objects.  
Calling methods on a disposed objects results in undefined behavior.

   Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 451](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L451))   ### 
forget()

  Forget the currently [memorized](phaser.signal#memorize) event, if any.

   Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L437))   ### 
getNumListeners() → {integer}

  Gets the total number of listeners attached to this Signal.

  ##### Returns

   integer -   Number of listeners attached to the Signal.

    Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 369](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L369))   ### 
halt()

  Stop propagation of the event, blocking the dispatch to next listener on the queue.

 This should be called only during event dispatch as calling it before/after dispatch won't affect another broadcast.  
See [active](phaser.signal#active) to enable/disable the signal entirely.

   Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 381](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L381))   ### 
has(listener, context) → {boolean}

  Check if a specific listener is attached.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `listener` | function |  | Signal handler function. |
| `context` | object |  <optional> | Context on which listener will be executed (object that should represent the `this` variable inside listener function). |

 ##### Returns

   boolean -   If Signal has the specified listener.

    Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L218))   ### 
remove(listener, context) → {function}

  Remove a single event listener.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `listener` | function |  |  | Handler function that should be removed. |
| `context` | object |  <optional> |  null  | Execution context (since you can add the same handler multiple times if executing in a different context). |

 ##### Returns

   function -   Listener handler function.

    Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 305](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L305))   ### 
removeAll(context)

  Remove all event listeners.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `context` | object |  <optional> |  null  | If specified only listeners for the given context will be removed. |

  Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 329](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L329))   ### 
toString() → {string}

  A string representation of the object.

  ##### Returns

   string -   String representation of the object.

    Source code: [core/Signal.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js) ([Line 471](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Signal.js#L471))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Signal.html>

Class: Phaser.SignalBinding
===========================

 Constructor
-----------

 ### 
new SignalBinding(signal, listener, isOnce, listenerContext, priority, args)

  Object that represents a binding between a Signal and a listener function.  
This is an internal constructor and shouldn't be created directly.  
Inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `signal` | [Phaser.Signal](phaser.signal) |  |  | Reference to Signal object that listener is currently bound to. |
| `listener` | function |  |  | Handler function bound to the signal. |
| `isOnce` | boolean |  |  | If binding should be executed just once. |
| `listenerContext` | object |  <optional> |  null  | Context on which listener will be executed (object that should represent the `this` variable inside listener function). |
| `priority` | number |  <optional> |  | The priority level of the event listener. (default = 0). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback (listener) function. They will be appended after any arguments usually dispatched. |

  Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L22))   Public Properties
-----------------

  ### 
active : boolean

  If binding is active and should be executed.

   Default Value * true
 Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L93))   ### 
callCount : number

  The number of times the handler function has been called.

   Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L86))   ### 
context : Object

  Context on which listener will be executed (object that should represent the `this` variable inside listener function).

   Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L63))   ### 
params :array | null

  Default parameters passed to listener during `Signal.dispatch` and `SignalBinding.execute` (curried parameters).

  ##### Type

 * array | null

  Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L100))    Public Methods
--------------

  ### 
detach() → {function | null}

  Detach binding from signal.  
alias to: @see mySignal.remove(myBinding.getListener());

  ##### Returns

   function | null -   Handler function bound to the signal or `null` if binding was previously detached.

    Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 136](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L136))   ### 
execute(paramsArr) → {any}

  Call listener passing arbitrary parameters.  
If binding was added using `Signal.addOnce()` it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `paramsArr` | Array.<any> |  <optional> | Array of parameters that should be passed to the listener. |

 ##### Returns

   any -   Value returned by the listener.

    Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L102))   ### 
getListener() → {function}

 ##### Returns

   function -   Handler function bound to the signal.

    Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 162](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L162))   ### 
getSignal() → {[Phaser.Signal](phaser.signal)}

 ##### Returns

   [Phaser.Signal](phaser.signal) -   Signal that listener is currently bound to.

    Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L170))   ### 
isBound() → {boolean}

 ##### Returns

   boolean -   True if binding is still bound to the signal and has a listener.

    Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L146))   ### 
isOnce() → {boolean}

 ##### Returns

   boolean -   If SignalBinding will only be executed once.

    Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 154](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L154))   ### 
toString() → {string}

 ##### Returns

   string -   String representation of the object.

    Source code: [core/SignalBinding.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js) ([Line 189](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/SignalBinding.js#L189))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.SignalBinding.html>

Class: Phaser.PluginManager
===========================

 Constructor
-----------

 ### 
new PluginManager(game)

  The Plugin Manager is responsible for the loading, running and unloading of Phaser Plugins.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 16](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L16))   Public Properties
-----------------

  ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L21))   ### 
plugins : Array.<[Phaser.Plugin](phaser.plugin)>

  An array of all the plugins being managed by this PluginManager.

  ##### Type

 * Array.<[Phaser.Plugin](phaser.plugin)>

  Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L26))    Public Methods
--------------

  ### 
add(plugin, parameter) → {[Phaser.Plugin](phaser.plugin)}

  Add a new Plugin into the PluginManager.  
The Plugin must have 2 properties: game and parent. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `plugin` | object | [Phaser.Plugin](phaser.plugin) |  | The Plugin to add into the PluginManager. This can be a function or an existing object. |
| `parameter` | \* |  <repeatable> | Additional arguments that will be passed to the Plugin.init method. |

 ##### Returns

   [Phaser.Plugin](phaser.plugin) -   The Plugin that was added to the manager.

    Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L44))   ### 
destroy()

  Clear down this PluginManager, calls destroy on every plugin and nulls out references.

   Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L279))   ### 
postRender()

  Post-render is called after the Game Renderer and State.render have run.  
It only calls plugins who have visible=true.

   Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L259))   ### 
postUpdate()

  PostUpdate is the last thing to be called before the world render.  
In particular, it is called after the world postUpdate, which means the camera has been adjusted.  
It only calls plugins who have active=true.

   Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L218))   ### 
preUpdate()

  Pre-update is called at the very start of the update cycle, before any other subsystems have been updated (including Physics).  
It only calls plugins who have active=true.

   Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 178](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L178))   ### 
remove(plugin, destroy)

  Remove a Plugin from the PluginManager. It calls Plugin.destroy on the plugin before removing it from the manager.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `plugin` | [Phaser.Plugin](phaser.plugin) |  |  | The plugin to be removed. |
| `destroy` | boolean |  <optional> |  true  | Call destroy on the plugin that is removed? |

  Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L129))   ### 
removeAll()

  Remove all Plugins from the PluginManager. It calls Plugin.destroy on every plugin before removing it from the manager.

   Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 159](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L159))   ### 
render()

  Render is called right after the Game Renderer completes, but before the State.render.  
It only calls plugins who have visible=true.

   Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 239](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L239))   ### 
update()

  Update is called after all the core subsystems (Input, Tweens, Sound, etc) and the State have updated, but before the render.  
It only calls plugins who have active=true.

   Source code: [core/PluginManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/PluginManager.js#L198))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.PluginManager.html>

Class: Phaser.ScaleManager
==========================

 Constructor
-----------

 ### 
new ScaleManager(game, width, height)

  Create a new ScaleManager object - this is done automatically by [Phaser.Game](phaser.game)

 The `width` and `height` constructor parameters can either be a number which represents pixels or a string that represents a percentage: e.g. `800` (for 800 pixels) or `"80%"` for 80%.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `width` | number | string | The width of the game. See above. |
| `height` | number | string | The height of the game. See above. |

  Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L46))   Public Properties
-----------------

  ### 
[static] EXACT\_FIT : integer

  A scale mode that stretches content to fill all available space - see [scaleMode](phaser.scalemanager#scaleMode).

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 609](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L609))   ### 
[static] NO\_SCALE : integer

  A scale mode that prevents any scaling - see [scaleMode](phaser.scalemanager#scaleMode).

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 617](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L617))   ### 
[static] RESIZE : integer

  A scale mode that causes the Game size to change - see [scaleMode](phaser.scalemanager#scaleMode).

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 633](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L633))   ### 
[static] SHOW\_ALL : integer

  A scale mode that shows the entire game while maintaining proportions - see [scaleMode](phaser.scalemanager#scaleMode).

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 625](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L625))   ### 
[static] USER\_SCALE : integer

  A scale mode that allows a custom scale factor - see [scaleMode](phaser.scalemanager#scaleMode).

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 641](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L641))   ### 
[readonly] aspectRatio : number

  The aspect ratio of the scaled Display canvas.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 349](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L349))   ### 
[readonly] boundingParent :DOMElement

  The DOM element that is considered the Parent bounding element, if any.

 This `null` if [parentIsWindow](phaser.scalemanager#parentIsWindow) is true or if fullscreen mode is entered and [fullScreenTarget](phaser.scalemanager#fullScreenTarget) is specified.  
It will also be null if there is no game canvas or if the game canvas has no parent.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2091](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2091))   ### 
[readonly] bounds : [Phaser.Rectangle](phaser.rectangle)

  The bounds of the scaled game. The x/y will match the offset of the canvas element and the width/height the scaled width and height.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 342](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L342))   ### 
<internal> compatibility

  Various compatibility settings.  
A value of "(auto)" indicates the setting is configured based on device and runtime information.

 A [refresh](phaser.scalemanager#refresh) may need to be performed after making changes.

   ##### Properties:

  

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `supportsFullScreen` | boolean |  <optional> |  (auto)  | True only if fullscreen support will be used. (Changing to fullscreen still might not work.) |
| `orientationFallback` | boolean |  <optional> |  (auto)  | See [Phaser.DOM.getScreenOrientation](phaser.dom#.getScreenOrientation). |
| `noMargins` | boolean |  <optional> |  false  | If true then the Display canvas's margins will not be updated anymore: existing margins must be manually cleared. Disabling margins prevents automatic canvas alignment/centering, possibly in fullscreen. |
| `scrollTo` | [Phaser.Point](phaser.point) |  <optional> <nullable> |  (auto)  | If specified the window will be scrolled to this position on every refresh. |
| `forceMinimumDocumentHeight` | boolean |  <optional> |  false  | If enabled the document elements minimum height is explicitly set on updates. The height set varies by device and may either be the height of the window or the viewport. |
| `canExpandParent` | boolean |  <optional> |  true  | If enabled then SHOW\_ALL and USER\_SCALE modes can try and expand the parent element. It may be necessary for the parent element to impose CSS width/height restrictions. |
| `clickTrampoline` | string |  <optional> |  (auto)  | On certain browsers (eg. IE) FullScreen events need to be triggered via 'click' events. A value of 'when-not-mouse' uses a click trampoline when a pointer that is not the primary mouse is used. Any other string value (including the empty string) prevents using click trampolines. For more details on click trampolines see [Phaser.Pointer#addClickTrampoline](phaser.pointer#addClickTrampoline). |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 410](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L410))   ### 
<internal, readonly> currentScaleMode : number

  Returns the current scale mode - for normal or fullscreen operation.

 See [scaleMode](phaser.scalemanager#scaleMode) for the different modes allowed.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2224](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2224))   ### 
<internal, readonly> dom : [Phaser.DOM](phaser.dom)

  Provides access to some cross-device DOM functions.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 62](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L62))   ### 
enterIncorrectOrientation : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the browser enters an incorrect orientation, as defined by [forceOrientation](phaser.scalemanager#forceOrientation).

 This is signaled from `preUpdate` (or `pauseUpdate`) *even when* the game is paused.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L211))   ### 
<internal, readonly> forceLandscape : boolean

  If true, the game should only run in a landscape orientation.  
Change with [forceOrientation](phaser.scalemanager#forceOrientation).

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 140](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L140))   ### 
<internal, readonly> forcePortrait : boolean

  If true, the game should only run in a portrait  
Change with [forceOrientation](phaser.scalemanager#forceOrientation).

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L150))   ### 
fullScreenScaleMode : integer

  The scaling method used by the ScaleManager when in fullscreen.

 See [scaleMode](phaser.scalemanager#scaleMode) for the different modes allowed.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2183](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2183))   ### 
fullScreenTarget :DOMElement

  If specified, this is the DOM element on which the Fullscreen API enter request will be invoked.  
The target element must have the correct CSS styling and contain the Display canvas.

 The elements style will be modified (ie. the width and height might be set to 100%)  
but it will not be added to, removed from, or repositioned within the DOM.  
An attempt is made to restore relevant style changes when fullscreen mode is left.

 For pre-2.2.0 behavior set `game.scale.fullScreenTarget = game.canvas`.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L248))   ### 
<internal, readonly> game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L54))   ### 
grid : [Phaser.FlexGrid](phaser.flexgrid)

  *EXPERIMENTAL:* A responsive grid on which you can align game objects.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L69))   ### 
hasPhaserSetFullScreen : boolean

  This boolean provides you with a way to determine if the browser is in Full Screen  
mode (via the Full Screen API), and Phaser was the one responsible for activating it.

 It's possible that ScaleManager.isFullScreen returns `true` even if Phaser wasn't the  
one that made the browser go full-screen, so this flag lets you determine that.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 233](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L233))   ### 
[readonly] height : number

  Target height (in pixels) of the Display canvas.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L83))   ### 
<internal, readonly> incorrectOrientation : boolean

  True if [forceLandscape](phaser.scalemanager#forceLandscape) or [forcePortrait](phaser.scalemanager#forcePortrait) are set and do not agree with the browser orientation.

 This value is not updated immediately.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L161))   ### 
[readonly] isFullScreen : boolean

  Returns true if the browser is in fullscreen mode, otherwise false.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2315))   ### 
[readonly] isGameLandscape : boolean

  Returns true if the game dimensions are landscape (width > height).  
This is especially useful to check when using the RESIZE scale mode  
but wanting to maintain game orientation on desktop browsers,  
where typically the screen orientation will always be landscape regardless of the browser viewport.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2380](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2380))   ### 
[readonly] isGamePortrait : boolean

  Returns true if the game dimensions are portrait (height > width).  
This is especially useful to check when using the RESIZE scale mode  
but wanting to maintain game orientation on desktop browsers,  
where typically the screen orientation will always be landscape regardless of the browser viewport.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2362](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2362))   ### 
[readonly] isLandscape : boolean

  Returns true if the screen orientation is in landscape mode.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2347](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2347))   ### 
[readonly] isPortrait : boolean

  Returns true if the screen orientation is in portrait mode.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2332](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2332))   ### 
leaveIncorrectOrientation : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the browser leaves an incorrect orientation, as defined by [forceOrientation](phaser.scalemanager#forceOrientation).

 This is signaled from `preUpdate` (or `pauseUpdate`) *even when* the game is paused.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L221))   ### 
<internal, readonly> margin :Bounds-like

  The Display canvas is aligned by adjusting the margins; the last margins are stored here.

  ##### Type

 * Bounds-like

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 335](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L335))   ### 
<internal, readonly> maxHeight : number

  Maximum height the canvas should be scaled to (in pixels).  
If null it will scale to whatever height the browser can handle.  
Change with [setMinMax](phaser.scalemanager#setMinMax).

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 121](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L121))   ### 
<internal, readonly> maxWidth : number

  Maximum width the canvas should be scaled to (in pixels).  
If null it will scale to whatever width the browser can handle.  
Change with [setMinMax](phaser.scalemanager#setMinMax).

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L102))   ### 
<internal, readonly> minHeight : number

  Minimum height the canvas should be scaled to (in pixels).  
Change with [setMinMax](phaser.scalemanager#setMinMax).

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 111](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L111))   ### 
<internal, readonly> minWidth : number

  Minimum width the canvas should be scaled to (in pixels).  
Change with [setMinMax](phaser.scalemanager#setMinMax).

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L92))   ### 
<internal, readonly> offset : [Phaser.Point](phaser.point)

  The offset coordinates of the Display canvas from the top-left of the browser window.  
The is used internally by Phaser.Pointer (for Input) and possibly other types.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L130))   ### 
onFullScreenChange : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the browser enters or leaves fullscreen mode, if supported.

 The signal is supplied with a single argument: `scale` (the ScaleManager). Use `scale.isFullScreen` to determine  
if currently running in Fullscreen mode.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 290](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L290))   ### 
onFullScreenError : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the browser fails to enter fullscreen mode;  
or if the device does not support fullscreen mode and `startFullScreen` is invoked.

 The signal is supplied with a single argument: `scale` (the ScaleManager).

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 301](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L301))   ### 
onFullScreenInit : [Phaser.Signal](phaser.signal)

  This signal is dispatched when fullscreen mode is ready to be initialized but  
before the fullscreen request.

 The signal is passed two arguments: `scale` (the ScaleManager), and an object in the form `{targetElement: DOMElement}`.

 The `targetElement` is the [fullScreenTarget](phaser.scalemanager#fullScreenTarget) element,  
if such is assigned, or a new element created by [createFullScreenTarget](phaser.scalemanager#createFullScreenTarget).

 Custom CSS styling or resets can be applied to `targetElement` as required.

 If `targetElement` is *not* the same element as [fullScreenTarget](phaser.scalemanager#fullScreenTarget):

 * After initialization the Display canvas is moved onto the `targetElement` for  
the duration of the fullscreen mode, and restored to it's original DOM location when fullscreen is exited.
* The `targetElement` is moved/re-parented within the DOM and may have its CSS styles updated.

 The behavior of a pre-assigned target element is covered in [fullScreenTarget](phaser.scalemanager#fullScreenTarget).

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L279))   ### 
onOrientationChange : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the orientation changes *or* the validity of the current orientation changes.

 The signal is supplied with the following arguments:

 * `scale` - the ScaleManager object
* `prevOrientation`, a string - The previous orientation as per [screenOrientation](phaser.scalemanager#screenOrientation).
* `wasIncorrect`, a boolean - True if the previous orientation was last determined to be incorrect.

 Access the current orientation and validity with `scale.screenOrientation` and `scale.incorrectOrientation`.  
Thus the following tests can be done:

 
```
// The orientation itself changed:
scale.screenOrientation !== prevOrientation
// The orientation just became incorrect:
scale.incorrectOrientation && !wasIncorrect
```

It is possible that this signal is triggered after [forceOrientation](phaser.scalemanager#forceOrientation) so the orientation  
correctness changes even if the orientation itself does not change.

 This is signaled from `preUpdate` (or `pauseUpdate`) *even when* the game is paused.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 201](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L201))   ### 
onSizeChange : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the size of the Display canvas changes *or* the size of the Game changes.  
When invoked this is done *after* the Canvas size/position have been updated.

 This signal is *only* called when a change occurs and a reflow may be required.  
For example, if the canvas does not change sizes because of CSS settings (such as min-width)  
then this signal will *not* be triggered.

 Use this to handle responsive game layout options.

 This is signaled from `preUpdate` (or `pauseUpdate`) *even when* the game is paused.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 487](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L487))  To Do:  * Formalize the arguments, if any, supplied to this signal.

   ### 
pageAlignHorizontally : boolean

  When enabled the Display canvas will be horizontally-aligned *in the Parent container* (or [window](phaser.scalemanager#parentIsWindow)).

 To align horizontally across the page the Display canvas should be added directly to page;  
or the parent container should itself be horizontally aligned.

 Horizontal alignment is not applicable with the [RESIZE](phaser.scalemanager#.RESIZE) scaling mode.

   Default Value * false
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2244](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2244))   ### 
pageAlignVertically : boolean

  When enabled the Display canvas will be vertically-aligned *in the Parent container* (or [window](phaser.scalemanager#parentIsWindow)).

 To align vertically the Parent element should have a *non-collapsible* height, such that it will maintain  
a height *larger* than the height of the contained Game canvas - the game canvas will then be scaled vertically  
*within* the remaining available height dictated by the Parent element.

 One way to prevent the parent from collapsing is to add an absolute "min-height" CSS property to the parent element.  
If specifying a relative "min-height/height" or adjusting margins, the Parent height must still be non-collapsible (see note).

 *Note*: In version 2.2 the minimum document height is *not* automatically set to the viewport/window height.  
To automatically update the minimum document height set [compatibility.forceMinimumDocumentHeight](phaser.scalemanager#compatibility) to true.

 Vertical alignment is not applicable with the [RESIZE](phaser.scalemanager#.RESIZE) scaling mode.

   Default Value * false
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2276](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2276))   ### 
parentIsWindow : boolean

  If the parent container of the Game canvas is the browser window itself (i.e. document.body),  
rather than another div, this should set to `true`.

 The [parentNode](phaser.scalemanager#parentNode) property is generally ignored while this is in effect.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 442](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L442))   ### 
parentNode :DOMElement

  The *original* DOM element for the parent of the Display canvas.  
This may be different in fullscreen - see [createFullScreenTarget](phaser.scalemanager#createFullScreenTarget).

 This should only be changed after moving the Game canvas to a different DOM parent.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 452](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L452))   ### 
[readonly] parentScaleFactor : [Phaser.Point](phaser.point)

  The scale of the game in relation to its parent container.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 459](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L459))   ### 
[readonly] scaleFactor : [Phaser.Point](phaser.point)

  The *current* scale factor based on the game dimensions vs. the scaled dimensions.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 318](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L318))   ### 
<internal, readonly> scaleFactorInversed : [Phaser.Point](phaser.point)

  The *current* inversed scale factor. The displayed dimensions divided by the game dimensions.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 326](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L326))   ### 
scaleMode : integer

  The scaling method used by the ScaleManager when not in fullscreen.

 
  
 [Phaser.ScaleManager.NO\_SCALE](phaser.scalemanager#.NO_SCALE)
  
 
  
 The Game display area will not be scaled - even if it is too large for the canvas/screen.  
 This mode *ignores* any applied scaling factor and displays the canvas at the Game size.  
 
  
 [Phaser.ScaleManager.EXACT\_FIT](phaser.scalemanager#.EXACT_FIT)
  
 
  
 The Game display area will be *stretched* to fill the entire size of the canvas's parent element and/or screen.  
 Proportions are not maintained.  
 
  
 [Phaser.ScaleManager.SHOW\_ALL](phaser.scalemanager#.SHOW_ALL)
  
 
  
 Show the entire game display area while *maintaining* the original aspect ratio.  
 
  
 [Phaser.ScaleManager.RESIZE](phaser.scalemanager#.RESIZE)
  
 
  
 The dimensions of the game display area are changed to match the size of the parent container.  
 That is, this mode *changes the Game size* to match the display size.  
   
 Any manually set Game size (see [setGameSize](phaser.scalemanager#setGameSize)) is ignored while in effect.  
 



  
 [Phaser.ScaleManager.USER\_SCALE](phaser.scalemanager#.USER_SCALE)
  
 
  
 The game Display is scaled according to the user-specified scale set by [setUserScale](phaser.scalemanager#setUserScale).  
   
 This scale can be adjusted in the [resize callback](phaser.scalemanager#setResizeCallback)  
 for flexible custom-sizing needs.  
 



  

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2119))   ### 
[readonly] screenOrientation : string

  The *last known* orientation of the screen, as defined in the Window Screen Web API.  
See [Phaser.DOM.getScreenOrientation](phaser.dom#.getScreenOrientation) for possible values.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 311](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L311))   ### 
[readonly] sourceAspectRatio : number

  The aspect ratio of the original game dimensions.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 356](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L356))   ### 
<internal> trackParentInterval : integer

  The maximum time (in ms) between dimension update checks for the Canvas's parent element (or window).  
Update checks normally happen quicker in response to other events.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Default Value * 2000
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 470](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L470))  See  * [refresh](phaser.scalemanager#refresh)

   ### 
[readonly] width : number

  Target width (in pixels) of the Display canvas.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 76](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L76))   ### 
windowConstraints

  The edges on which to constrain the game Display/canvas in *addition* to the restrictions of the parent container.

 The properties are strings and can be '', 'visual', 'layout', or 'layout-soft'.

 * If 'visual', the edge will be constrained to the Window / displayed screen area
* If 'layout', the edge will be constrained to the CSS Layout bounds
* An invalid value is treated as 'visual'

   ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `bottom` | string |  |
| `right` | string |  |

  Default Value * {"right":"layout","bottom":""}
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 379](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L379))    Public Methods
--------------

  ### 
<internal> boot()

  Start the ScaleManager.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 645](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L645))   ### 
<internal> createFullScreenTarget()

  Creates a fullscreen target. This is called automatically as as needed when entering  
fullscreen mode and the resulting element is supplied to [onFullScreenInit](phaser.scalemanager#onFullScreenInit).

 Use [onFullScreenInit](phaser.scalemanager#onFullScreenInit) to customize the created object.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 1728](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L1728))   ### 
<internal> destroy()

  Destroys the ScaleManager and removes any event listeners.  
This should probably only be called when the game is destroyed.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 2058](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L2058))   ### 
forceOrientation(forceLandscape, forcePortrait)

  Force the game to run in only one orientation.

 This enables generation of incorrect orientation signals and affects resizing but does not otherwise rotate or lock the orientation.

 Orientation checks are performed via the Screen Orientation API, if available in browser. This means it will check your monitor  
orientation on desktop, or your device orientation on mobile, rather than comparing actual game dimensions. If you need to check the  
viewport dimensions instead and bypass the Screen Orientation API then set: `ScaleManager.compatibility.orientationFallback = 'viewport'`

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `forceLandscape` | boolean |  |  | true if the game should run in landscape mode only. |
| `forcePortrait` | boolean |  <optional> |  false  | true if the game should run in portrait mode only. |

  Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 1163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L1163))   ### 
<internal> getParentBounds(target) → {[Phaser.Rectangle](phaser.rectangle)}

  Returns the computed Parent size/bounds that the Display canvas is allowed/expected to fill.

 If in fullscreen mode or without parent (see [parentIsWindow](phaser.scalemanager#parentIsWindow)),  
this will be the bounds of the visual viewport itself.

 This function takes the [windowConstraints](phaser.scalemanager#windowConstraints) into consideration - if the parent is partially outside  
the viewport then this function may return a smaller than expected size.

 Values are rounded to the nearest pixel.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `target` | [Phaser.Rectangle](phaser.rectangle) |  <optional> |  (new Rectangle)  | The rectangle to update; a new one is created as needed. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   The established parent bounds.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 1408](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L1408))   ### 
<internal> parseConfig(config)

  Load configuration settings.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `config` | object | The game configuration object. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 748](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L748))   ### 
<internal> preUpdate()

  The ScaleManager.preUpdate is called automatically by the core Game loop.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 1028](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L1028))   ### 
refresh()

  The "refresh" methods informs the ScaleManager that a layout refresh is required.

 The ScaleManager automatically queues a layout refresh (eg. updates the Game size or Display canvas layout)  
when the browser is resized, the orientation changes, or when there is a detected change  
of the Parent size. Refreshing is also done automatically when public properties,  
such as [scaleMode](phaser.scalemanager#scaleMode), are updated or state-changing methods are invoked.

 The "refresh" method *may* need to be used in a few (rare) situtations when

 * a device change event is not correctly detected; or
* the Parent size changes (and an immediate reflow is desired); or
* the ScaleManager state is updated by non-standard means; or
* certain [compatibility](phaser.scalemanager#compatibility) properties are manually changed.

 The queued layout refresh is not immediate but will run promptly in an upcoming `preRender`.

   Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 1301](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L1301))   ### 
<internal> scaleSprite(sprite, width, height, letterBox) → {[Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image)}

  Takes a Sprite or Image object and scales it to fit the given dimensions.  
Scaling happens proportionally without distortion to the sprites texture.  
The letterBox parameter controls if scaling will produce a letter-box effect or zoom the  
sprite until it fills the given values. Note that with letterBox set to false the scaled sprite may spill out over either  
the horizontal or vertical sides of the target dimensions. If you wish to stop this you can crop the Sprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) |  |  | The sprite we want to scale. |
| `width` | integer |  <optional> |  | The target width that we want to fit the sprite in to. If not given it defaults to ScaleManager.width. |
| `height` | integer |  <optional> |  | The target height that we want to fit the sprite in to. If not given it defaults to ScaleManager.height. |
| `letterBox` | boolean |  <optional> |  false  | True if we want the `fitted` mode. Otherwise, the function uses the `zoom` mode. |

 ##### Returns

   [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) -   The scaled sprite.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 1988](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L1988))   ### 
setGameSize(width, height)

  Set the actual Game size.  
Use this instead of directly changing `game.width` or `game.height`.

 The actual physical display (Canvas element size) depends on various settings including

 * Scale mode
* Scaling factor
* Size of Canvas's parent element or CSS rules such as min-height/max-height;
* The size of the Window

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | integer | *Game width*, in pixels. |
| `height` | integer | *Game height*, in pixels. |

  Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 881](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L881))   ### 
setMinMax(minWidth, minHeight, maxWidth, maxHeight)

  Set the min and max dimensions for the Display canvas.

 *Note:* The min/max dimensions are only applied in some cases

 * When the device is not in an incorrect orientation; or
* The scale mode is EXACT\_FIT when not in fullscreen

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `minWidth` | number |  | The minimum width the game is allowed to scale down to. |
| `minHeight` | number |  | The minimum height the game is allowed to scale down to. |
| `maxWidth` | number |  <optional> | The maximum width the game is allowed to scale up to; only changed if specified. |
| `maxHeight` | number |  <optional> | The maximum height the game is allowed to scale up to; only changed if specified. |

  Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 996](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L996))  To Do:  * These values are only sometimes honored.

   ### 
setResizeCallback(callback, context)

  Sets the callback that will be invoked before sizing calculations.

 This is the appropriate place to call [setUserScale](phaser.scalemanager#setUserScale) if needing custom dynamic scaling.

 The callback is supplied with two arguments `scale` and `parentBounds` where `scale` is the ScaleManager  
and `parentBounds`, a Phaser.Rectangle, is the size of the Parent element.

 This callback

 * May be invoked even though the parent container or canvas sizes have not changed
* Unlike [onSizeChange](phaser.scalemanager#onSizeChange), it runs *before* the canvas is guaranteed to be updated
* Will be invoked from `preUpdate`, *even when* the game is paused

 See [onSizeChange](phaser.scalemanager#onSizeChange) for a better way of reacting to layout updates.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `callback` | function | The callback that will be called each time a window.resize event happens or if set, the parent container resizes. |
| `context` | object | The context in which the callback will be called. |

  Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 933](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L933))   ### 
<internal> setupScale(width, height)

  Calculates and sets the game dimensions based on the given width and height.

 This should *not* be called when in fullscreen mode.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | string | The width of the game. |
| `height` | number | string | The height of the game. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 781](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L781))   ### 
setUserScale(hScale, vScale, hTrim, vTrim)

  Set a User scaling factor used in the USER\_SCALE scaling mode.

 The target canvas size is computed by:

 
```
canvas.width = (game.width * hScale) - hTrim
canvas.height = (game.height * vScale) - vTrim
```

This method can be used in the [resize callback](phaser.scalemanager#setResizeCallback).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `hScale` | number |  |  | Horizontal scaling factor. |
| `vScale` | numer |  |  | Vertical scaling factor. |
| `hTrim` | integer |  <optional> |  0  | Horizontal trim, applied after scaling. |
| `vTrim` | integer |  <optional> |  0  | Vertical trim, applied after scaling. |

  Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 909](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L909))   ### 
startFullScreen(antialias, allowTrampoline) → {boolean}

  Start the browsers fullscreen mode - this *must* be called from a user input Pointer or Mouse event.

 The Fullscreen API must be supported by the browser for this to work - it is not the same as setting  
the game size to fill the browser window. See [compatibility.supportsFullScreen](phaser.scalemanager#compatibility) to check if the current  
device is reported to support fullscreen mode.

 The fullScreenFailed signal will be dispatched if the fullscreen change request failed or the game does not support the Fullscreen API.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `antialias` | boolean |  <optional> | Changes the anti-alias feature of the canvas before jumping in to fullscreen (false = retain pixel art, true = smooth art). If not specified then no change is made. Only works in CANVAS mode. |
| `allowTrampoline` | boolean |  <optional> | Internal argument. If `false` click trampolining is suppressed. |

 ##### Returns

   boolean -   Returns true if the device supports fullscreen mode and fullscreen mode was attempted to be started. (It might not actually start, wait for the signals.)

    Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 1749](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L1749))   ### 
stopFullScreen() → {boolean}

  Stops / exits fullscreen mode, if active.

  ##### Returns

   boolean -   Returns true if the browser supports fullscreen mode and fullscreen mode will be exited.

    Source code: [core/ScaleManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js) ([Line 1842](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/ScaleManager.js#L1842))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.ScaleManager.html>

Class: Phaser.Loader
====================

 Constructor
-----------

 ### 
new Loader(game)

  The Loader handles loading all external content such as Images, Sounds, Texture Atlases and data files.

 The loader uses a combination of tag loading (eg. Image elements) and XHR and provides progress and completion callbacks.

 Parallel loading (see [enableParallel](phaser.loader#enableParallel)) is supported and enabled by default.  
Load-before behavior of parallel resources is controlled by synchronization points as discussed in withSyncPoint.

 Texture Atlases can be created with tools such as [Texture Packer](https://www.codeandweb.com/texturepacker/phaser) and  
[Shoebox](http://renderhjs.net/shoebox/)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L22))   Public Properties
-----------------

  ### 
[static] PHYSICS\_LIME\_CORONA\_JSON : number

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 322](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L322))   ### 
[static] PHYSICS\_PHASER\_JSON : number

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L328))   ### 
[static] TEXTURE\_ATLAS\_JSON\_ARRAY : number

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 304](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L304))   ### 
[static] TEXTURE\_ATLAS\_JSON\_HASH : number

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 310](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L310))   ### 
[static] TEXTURE\_ATLAS\_JSON\_PYXEL : number

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 334](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L334))   ### 
[static] TEXTURE\_ATLAS\_XML\_STARLING : number

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 316](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L316))   ### 
\_withSyncPointDepth

  A counter: if more than zero, files will be automatically added as a synchronization point.

   ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `_withSyncPointDepth;` | integer |  |

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 227](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L227))   ### 
baseURL : string

  If you want to append a URL before the path of any asset you can set this here.  
Useful if allowing the asset base url to be configured outside of the game code.  
The string *must* end with a "/".

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L83))   ### 
<internal> cache : [Phaser.Cache](phaser.cache)

  Local reference to the Phaser.Cache.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L36))   ### 
crossOrigin : boolean | string

  The crossOrigin value applied to loaded images. Very often this needs to be set to 'anonymous'.

  ##### Type

 * boolean | string

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 74](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L74))   ### 
enableParallel : boolean

  If true (the default) then parallel downloading will be enabled.

 To disable all parallel downloads this must be set to false prior to any resource being loaded.

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L211))   ### 
<internal> game : [Phaser.Game](phaser.game)

  Local reference to game.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L29))   ### 
hasLoaded : boolean

  True if all assets in the queue have finished loading.

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L57))   ### 
headers : Object

  Used to map the application mime-types to to the Accept header in XHR requests.  
If you don't require these mappings, or they cause problems on your server, then  
remove them from the headers object and the XHR request will not try to use them.

 This object can also be used to set the `X-Requested-With` header to  
`XMLHttpRequest` (or any other value you need). To enable this do:

 `this.load.headers.requestedWith = 'XMLHttpRequest'`

 before adding anything to the Loader. The XHR loader will then call:

 `setRequestHeader('X-Requested-With', this.headers['requestedWith'])`

   Default Value * {"undefined":"application/xml"}
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 122](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L122))   ### 
isLoading : boolean

  True if the Loader is in the process of loading the queue.

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L50))   ### 
<internal> maxParallelDownloads : integer

  The number of concurrent / parallel resources to try and fetch at once.

 Many current browsers limit 6 requests per domain; this is slightly conservative.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L221))   ### 
onFileComplete : [Phaser.Signal](phaser.signal)

  This event is dispatched when a file has either loaded or failed to load.

 Any function bound to this will receive the following parameters:

 progress, file key, success?, total loaded files, total files

 Where progress is a number between 1 and 100 (inclusive) representing the percentage of the load.

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 175](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L175))   ### 
onFileError : [Phaser.Signal](phaser.signal)

  This event is dispatched when a file (or pack) errors as a result of the load request.

 For files it will be triggered before `onFileComplete`. For packs it will be triggered before `onPackComplete`.

 Params: `(file key, file)`

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L186))   ### 
onFileStart : [Phaser.Signal](phaser.signal)

  This event is dispatched immediately before a file starts loading.  
It's possible the file may fail (eg. download error, invalid format) after this event is sent.

 Params: `(progress, file key, file url)`

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 162](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L162))   ### 
onLoadComplete : [Phaser.Signal](phaser.signal)

  This event is dispatched when the final file in the load queue has either loaded or failed.

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 141](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L141))   ### 
onLoadStart : [Phaser.Signal](phaser.signal)

  This event is dispatched when the loading process starts: before the first file has been requested,  
but after all the initial packs have been loaded.

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 134](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L134))   ### 
onPackComplete : [Phaser.Signal](phaser.signal)

  This event is dispatched when an asset pack has either loaded or failed to load.

 This is called when the asset pack manifest file has loaded and successfully added its contents to the loader queue.

 Params: `(pack key, success?, total packs loaded, total packs)`

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 152](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L152))   ### 
path : string

  The value of `path`, if set, is placed before any *relative* file path given. For example:

 `load.path = "images/sprites/";
load.image("ball", "ball.png");
load.image("tree", "level1/oaktree.png");
load.image("boom", "http://server.com/explode.png");`

 Would load the `ball` file from `images/sprites/ball.png` and the tree from  
`images/sprites/level1/oaktree.png` but the file `boom` would load from the URL  
given as it's an absolute URL.

 Please note that the path is added before the filename but *after* the baseURL (if set.)

 The string *must* end with a "/".

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L103))   ### 
<internal> preloadSprite : Object

  You can optionally link a progress sprite with [setPreloadSprite](phaser.loader#setPreloadSprite).

 This property is an object containing: sprite, rect, direction, width and height

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 67](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L67))   ### 
progress

  The rounded load progress percentage value (from 0 to 100). See [Phaser.Loader#progressFloat](phaser.loader#progressFloat).

   ##### Properties:

  

| Type | Description |
| --- | --- |
| integer |  |

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 3060](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L3060))   ### 
progressFloat

  The non-rounded load progress value (from 0.0 to 100.0).

 A general indicator of the progress.  
It is possible for the progress to decrease, after `onLoadStart`, if more files are dynamically added.

   ##### Properties:

  

| Type | Description |
| --- | --- |
| number |  |

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 3042](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L3042))   ### 
resetLocked : boolean

  If true all calls to Loader.reset will be ignored. Useful if you need to create a load queue before swapping to a preloader state.

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L43))   ### 
useXDomainRequest : boolean

  This method is *deprecated* and should not be used. It may be removed in the future.   If true and if the browser supports XDomainRequest, it will be used in preference for XHR.

 This is only relevant for IE 9 and should *only* be enabled for IE 9 clients when required by the server/CDN.

   Deprecated: * This is only relevant for IE 9.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 196](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L196))    Public Methods
--------------

  ### 
addSyncPoint(type, key) → {[Phaser.Loader](phaser.loader)}

  Add a synchronization point to a specific file/asset in the load queue.

 This has no effect on already loaded assets.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `type` | string | The type of resource to turn into a sync point (image, audio, xml, etc). |
| `key` | string | Key of the file you want to turn into a sync point. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1675](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1675))  See  * withSyncPoint

   ### 
<internal> addToFileList(type, key, url, properties, overwrite, extension) → {[Phaser.Loader](phaser.loader)}

  Internal function that adds a new entry to the file list. Do not call directly.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `type` | string |  |  | The type of resource to add to the list (image, audio, xml, etc). |
| `key` | string |  |  | The unique Cache ID key of this resource. |
| `url` | string |  <optional> |  | The URL the asset will be loaded from. |
| `properties` | object |  <optional> |  (none)  | Any additional properties needed to load the file. These are added directly to the added file object and overwrite any defaults. |
| `overwrite` | boolean |  <optional> |  false  | If true then this will overwrite a file asset of the same type/key. Otherwise it will only add a new asset. If overwrite is true, and the asset is already being loaded (or has been loaded), then it is appended instead. |
| `extension` | string |  <optional> |  | If no URL is given the Loader will sometimes auto-generate the URL based on the key, using this as the extension. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This instance of the Phaser Loader.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 515](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L515))   ### 
atlas(key, textureURL, atlasURL, atlasData, format) → {[Phaser.Loader](phaser.loader)}

  Adds a Texture Atlas file to the current load queue.

 To create the Texture Atlas you can use tools such as:

 [Texture Packer](https://www.codeandweb.com/texturepacker/phaser)  
[Shoebox](http://renderhjs.net/shoebox/)

 If using Texture Packer we recommend you enable "Trim sprite names".  
If your atlas software has an option to "rotate" the resulting frames, you must disable it.

 You can choose to either load the data externally, by providing a URL to a json file.  
Or you can pass in a JSON object or String via the `atlasData` parameter.  
If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

 If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load.  
If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

 The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the textureURL isn't specified then the Loader will take the key and create a filename from that.  
For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png".  
The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will  
set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

 If you do not desire this action then provide URLs and / or a data object.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `key` | string |  | Unique asset key of the texture atlas file. |
| `textureURL` | string |  <optional> | URL of the texture atlas image file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png". |
| `atlasURL` | string |  <optional> | URL of the texture atlas data file. If undefined or `null` and no atlasData is given, the url will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". |
| `atlasData` | object |  <optional> | A JSON or XML data object. You don't need this if the data is being loaded from a URL. |
| `format` | number |  <optional> | The format of the data. Can be Phaser.Loader.TEXTURE\_ATLAS\_JSON\_ARRAY (the default), Phaser.Loader.TEXTURE\_ATLAS\_JSON\_HASH or Phaser.Loader.TEXTURE\_ATLAS\_XML\_STARLING. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1544](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1544))   ### 
atlasJSONArray(key, textureURL, atlasURL, atlasData) → {[Phaser.Loader](phaser.loader)}

  Adds a Texture Atlas file to the current load queue.

 Unlike `Loader.atlasJSONHash` this call expects the atlas data to be in a JSON Array format.

 To create the Texture Atlas you can use tools such as:

 [Texture Packer](https://www.codeandweb.com/texturepacker/phaser)  
[Shoebox](http://renderhjs.net/shoebox/)

 If using Texture Packer we recommend you enable "Trim sprite names".  
If your atlas software has an option to "rotate" the resulting frames, you must disable it.

 You can choose to either load the data externally, by providing a URL to a json file.  
Or you can pass in a JSON object or String via the `atlasData` parameter.  
If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

 If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load.  
If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

 The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the textureURL isn't specified then the Loader will take the key and create a filename from that.  
For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png".  
The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will  
set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

 If you do not desire this action then provide URLs and / or a data object.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `key` | string |  | Unique asset key of the texture atlas file. |
| `textureURL` | string |  <optional> | URL of the texture atlas image file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png". |
| `atlasURL` | string |  <optional> | URL of the texture atlas data file. If undefined or `null` and no atlasData is given, the url will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". |
| `atlasData` | object |  <optional> | A JSON data object. You don't need this if the data is being loaded from a URL. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1398](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1398))   ### 
atlasJSONHash(key, textureURL, atlasURL, atlasData) → {[Phaser.Loader](phaser.loader)}

  Adds a Texture Atlas file to the current load queue.

 Unlike `Loader.atlas` this call expects the atlas data to be in a JSON Hash format.

 To create the Texture Atlas you can use tools such as:

 [Texture Packer](https://www.codeandweb.com/texturepacker/phaser)  
[Shoebox](http://renderhjs.net/shoebox/)

 If using Texture Packer we recommend you enable "Trim sprite names".  
If your atlas software has an option to "rotate" the resulting frames, you must disable it.

 You can choose to either load the data externally, by providing a URL to a json file.  
Or you can pass in a JSON object or String via the `atlasData` parameter.  
If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

 If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getImage(key)`. JSON files are automatically parsed upon load.  
If you need to control when the JSON is parsed then use `Loader.text` instead and parse the JSON file as needed.

 The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the textureURL isn't specified then the Loader will take the key and create a filename from that.  
For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png".  
The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will  
set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.json".

 If you do not desire this action then provide URLs and / or a data object.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `key` | string |  | Unique asset key of the texture atlas file. |
| `textureURL` | string |  <optional> | URL of the texture atlas image file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png". |
| `atlasURL` | string |  <optional> | URL of the texture atlas data file. If undefined or `null` and no atlasData is given, the url will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". |
| `atlasData` | object |  <optional> | A JSON data object. You don't need this if the data is being loaded from a URL. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1444](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1444))   ### 
atlasXML(key, textureURL, atlasURL, atlasData) → {[Phaser.Loader](phaser.loader)}

  Adds a Texture Atlas file to the current load queue.

 This call expects the atlas data to be in the Starling XML data format.

 To create the Texture Atlas you can use tools such as:

 [Texture Packer](https://www.codeandweb.com/texturepacker/phaser)  
[Shoebox](http://renderhjs.net/shoebox/)

 If using Texture Packer we recommend you enable "Trim sprite names".  
If your atlas software has an option to "rotate" the resulting frames, you must disable it.

 You can choose to either load the data externally, by providing a URL to an xml file.  
Or you can pass in an XML object or String via the `atlasData` parameter.  
If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

 If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getImage(key)`. XML files are automatically parsed upon load.  
If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

 The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the textureURL isn't specified then the Loader will take the key and create a filename from that.  
For example if the key is "player" and textureURL is null then the Loader will set the URL to be "player.png".  
The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will  
set the atlasURL to be the key. For example if the key is "player" the atlasURL will be set to "player.xml".

 If you do not desire this action then provide URLs and / or a data object.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `key` | string |  | Unique asset key of the texture atlas file. |
| `textureURL` | string |  <optional> | URL of the texture atlas image file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png". |
| `atlasURL` | string |  <optional> | URL of the texture atlas data file. If undefined or `null` and no atlasData is given, the url will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.xml". |
| `atlasData` | object |  <optional> | An XML data object. You don't need this if the data is being loaded from a URL. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1490](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1490))   ### 
audio(key, urls, autoDecode) → {[Phaser.Loader](phaser.loader)}

  Adds an audio file to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getSound(key)`.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio.  
When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system.  
The solution is to use a lower encoding rate such as 44100 Hz.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the audio file. |
| `urls` | string | Array.<string> | Array.<object> |  |  | Either a single string or an array of URIs or pairs of `{uri: .., type: ..}`. If an array is specified then the first URI (or URI + mime pair) that is device-compatible will be selected. For example: `"jump.mp3"`, `['jump.mp3', 'jump.ogg', 'jump.m4a']`, or `[{uri: "data:<opus_resource>", type: 'opus'}, 'fallback.mp3']`. BLOB and DATA URIs can be used but only support automatic detection when used in the pair form; otherwise the format must be manually checked before adding the resource. |
| `autoDecode` | boolean |  <optional> |  true  | When using Web Audio the audio files can either be decoded at load time or run-time. Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 991](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L991))   ### 
audioSprite(key, urls, jsonURL, jsonData, autoDecode) → {[Phaser.Loader](phaser.loader)}

  Adds an audio sprite file to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Audio Sprites are a combination of audio files and a JSON configuration.

 The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite

 Retrieve the file via `Cache.getSoundData(key)`.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the audio file. |
| `urls` | Array | string |  |  | An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL. |
| `jsonURL` | string |  <optional> |  null  | The URL of the audiosprite configuration JSON object. If you wish to pass the data directly set this parameter to null. |
| `jsonData` | string | object |  <optional> |  null  | A JSON object or string containing the audiosprite configuration data. This is ignored if jsonURL is not null. |
| `autoDecode` | boolean |  <optional> |  true  | When using Web Audio the audio files can either be decoded at load time or run-time. Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1034](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1034))   ### 
audiosprite(key, urls, jsonURL, jsonData, autoDecode) → {[Phaser.Loader](phaser.loader)}

  A legacy alias for Loader.audioSprite. Please see that method for documentation.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the audio file. |
| `urls` | Array | string |  |  | An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL. |
| `jsonURL` | string |  <optional> |  null  | The URL of the audiosprite configuration JSON object. If you wish to pass the data directly set this parameter to null. |
| `jsonData` | string | object |  <optional> |  null  | A JSON object or string containing the audiosprite configuration data. This is ignored if jsonURL is not null. |
| `autoDecode` | boolean |  <optional> |  true  | When using Web Audio the audio files can either be decoded at load time or run-time. Audio files can't be played until they are decoded and, if specified, this enables immediate decoding. Decoding is a non-blocking async process, however it consumes huge amounts of CPU time on mobiles especially. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1093](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1093))   ### 
binary(key, url, callback, callbackContext) → {[Phaser.Loader](phaser.loader)}

  Adds a binary file to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getBinary(key)`.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"  
and no URL is given then the Loader will set the URL to be "alien.bin". It will always add `.bin` as the extension.  
If you do not desire this action then provide a URL.

 It will be loaded via xhr with a responseType of "arraybuffer". You can specify an optional callback to process the file after load.  
When the callback is called it will be passed 2 parameters: the key of the file and the file data.

 WARNING: If a callback is specified the data will be set to whatever it returns. Always return the data object, even if you didn't modify it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the binary file. |
| `url` | string |  <optional> |  | URL of the binary file. If undefined or `null` the url will be set to `<key>.bin`, i.e. if `key` was "alien" then the URL will be "alien.bin". |
| `callback` | function |  <optional> |  (none)  | Optional callback that will be passed the file after loading, so you can perform additional processing on it. |
| `callbackContext` | object |  <optional> |  | The context under which the callback will be applied. If not specified it will use the callback itself as the context. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 911](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L911))   ### 
bitmapFont(key, textureURL, atlasURL, atlasData, xSpacing, ySpacing) → {[Phaser.Loader](phaser.loader)}

  Adds Bitmap Font files to the current load queue.

 To create the Bitmap Font files you can use:

 BMFont (Windows, free): http://www.angelcode.com/products/bmfont/  
Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner  
Littera (Web-based, free): http://kvazars.com/littera/

 You can choose to either load the data externally, by providing a URL to an xml file.  
Or you can pass in an XML object or String via the `xmlData` parameter.  
If you pass a String the data is automatically run through `Loader.parseXML` and then immediately added to the Phaser.Cache.

 If URLs are provided the files are **not** loaded immediately after calling this method, but are added to the load queue.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getBitmapFont(key)`. XML files are automatically parsed upon load.  
If you need to control when the XML is parsed then use `Loader.text` instead and parse the XML file as needed.

 The URLs can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the textureURL isn't specified then the Loader will take the key and create a filename from that.  
For example if the key is "megaFont" and textureURL is null then the Loader will set the URL to be "megaFont.png".  
The same is true for the atlasURL. If atlasURL isn't specified and no atlasData has been provided then the Loader will  
set the atlasURL to be the key. For example if the key is "megaFont" the atlasURL will be set to "megaFont.xml".

 If you do not desire this action then provide URLs and / or a data object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the bitmap font. |
| `textureURL` | string |  |  | URL of the Bitmap Font texture file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was "megaFont" then the URL will be "megaFont.png". |
| `atlasURL` | string |  |  | URL of the Bitmap Font atlas file (xml/json). If undefined or `null` AND `atlasData` is null, the url will be set to `<key>.xml`, i.e. if `key` was "megaFont" then the URL will be "megaFont.xml". |
| `atlasData` | object |  |  | An optional Bitmap Font atlas in string form (stringified xml/json). |
| `xSpacing` | number |  <optional> |  0  | If you'd like to add additional horizontal spacing between the characters then set the pixel value here. |
| `ySpacing` | number |  <optional> |  0  | If you'd like to add additional vertical spacing between the lines then set the pixel value here. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1307](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1307))   ### 
checkKeyExists(type, key) → {boolean}

  Check whether a file/asset with a specific key is queued to be loaded.

 To access a loaded asset use Phaser.Cache, eg. [Phaser.Cache#checkImageKey](phaser.cache#checkImageKey)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `type` | string | The type asset you want to check. |
| `key` | string | Key of the asset you want to check. |

 ##### Returns

   boolean -   Return true if exists, otherwise return false.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 390](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L390))   ### 
getAsset(type, key) → {any}

  Find a file/asset with a specific key.

 Only assets in the download file queue will be found.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `type` | string | The type asset you want to check. |
| `key` | string | Key of the asset you want to check. |

 ##### Returns

   any -   Returns an object if found that has 2 properties: `index` and `file`; otherwise a non-true value is returned.  
 The index may change and should only be used immediately following this call.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 441](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L441))   ### 
getAssetIndex(type, key) → {number}

  Get the queue-index of the file/asset with a specific key.

 Only assets in the download file queue will be found.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `type` | string | The type asset you want to check. |
| `key` | string | Key of the asset you want to check. |

 ##### Returns

   number -   The index of this key in the filelist, or -1 if not found.  
 The index may change and should only be used immediately following this call

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 406](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L406))   ### 
image(key, url, overwrite) → {[Phaser.Loader](phaser.loader)}

  Adds an Image to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the image via `Cache.getImage(key)`

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"  
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension.  
If you do not desire this action then provide a URL.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of this image file. |
| `url` | string |  <optional> |  | URL of an image file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png". |
| `overwrite` | boolean |  <optional> |  false  | If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 693](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L693))   ### 
images(keys, urls) → {[Phaser.Loader](phaser.loader)}

  Adds an array of images to the current load queue.

 It works by passing each element of the array to the Loader.image method.

 The files are **not** loaded immediately after calling this method. The files are added to the queue ready to be loaded when the loader starts.

 Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle.

 The keys must be unique Strings. They are used to add the files to the Phaser.Cache upon successful load.

 Retrieve the images via `Cache.getImage(key)`

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"  
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension.  
If you do not desire this action then provide a URL.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `keys` | array |  | An array of unique asset keys of the image files. |
| `urls` | array |  <optional> | Optional array of URLs. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png". If provided the URLs array length must match the keys array length. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 722](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L722))   ### 
json(key, url, overwrite) → {[Phaser.Loader](phaser.loader)}

  Adds a JSON file to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load.  
If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"  
and no URL is given then the Loader will set the URL to be "alien.json". It will always add `.json` as the extension.  
If you do not desire this action then provide a URL.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the json file. |
| `url` | string |  <optional> |  | URL of the JSON file. If undefined or `null` the url will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". |
| `overwrite` | boolean |  <optional> |  false  | If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 794](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L794))   ### 
pack(key, url, data, callbackContext) → {[Phaser.Loader](phaser.loader)}

  Add a JSON resource pack ('packfile') to the Loader.

 A packfile is a JSON file that contains a list of assets to the be loaded.  
Please see the example 'loader/asset pack' in the Phaser Examples repository.

 Packs are always put before the first non-pack file that is not loaded / loading.

 This means that all packs added before any loading has started are added to the front  
of the file queue, in the order added.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 The URL of the packfile can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of this resource pack. |
| `url` | string |  <optional> |  | URL of the Asset Pack JSON file. If you wish to pass a json object instead set this to null and pass the object as the data parameter. |
| `data` | object |  <optional> |  | The Asset Pack JSON data. Use this to pass in a json data object rather than loading it from a URL. TODO |
| `callbackContext` | object |  <optional> |  (loader)  | Some Loader operations, like Binary and Script require a context for their callbacks. Pass the context here. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 613](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L613))   ### 
physics(key, url, data, format) → {[Phaser.Loader](phaser.loader)}

  Adds a physics data file to the current load queue.

 The data must be in `Lime + Corona` JSON format. [Physics Editor](https://www.codeandweb.com) by code'n'web exports in this format natively.

 You can choose to either load the data externally, by providing a URL to a json file.  
Or you can pass in a JSON object or String via the `data` parameter.  
If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

 If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getJSON(key)`. JSON files are automatically parsed upon load.  
If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that.  
For example if the key is "alien" and no URL or data is given then the Loader will set the URL to be "alien.json".  
It will always use `.json` as the extension.

 If you do not desire this action then provide a URL or data object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the physics json data. |
| `url` | string |  <optional> |  | URL of the physics data file. If undefined or `null` and no data is given the url will be set to `<key>.json`, i.e. if `key` was "alien" then the URL will be "alien.json". |
| `data` | object | string |  <optional> |  | An optional JSON data object. If given then the url is ignored and this JSON object is used for physics data instead. |
| `format` | string |  <optional> |  Phaser.Physics.LIME\_CORONA\_JSON  | The format of the physics data. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1246))   ### 
<internal> removeAll()

  Remove all file loading requests - this is *insufficient* to stop current loading. Use `reset` instead.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1722](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1722))   ### 
<internal> removeFile(type, key)

  Remove a file/asset from the loading queue.

 A file that is loaded or has started loading cannot be removed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `type` | string | The type of resource to add to the list (image, audio, xml, etc). |
| `key` | string | Key of the file you want to remove. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1698](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1698))   ### 
<internal> replaceInFileList(type, key, url, properties)

  Internal function that replaces an existing entry in the file list with a new one. Do not call directly.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `type` | string | The type of resource to add to the list (image, audio, xml, etc). |
| `key` | string | The unique Cache ID key of this resource. |
| `url` | string | The URL the asset will be loaded from. |
| `properties` | object | Any additional properties needed to load the file. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 597](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L597))   ### 
<internal> reset(hard, clearEvents)

  Reset the loader and clear any queued assets. If `Loader.resetLocked` is true this operation will abort.

 This will abort any loading and clear any queued assets.

 Optionally you can clear any associated events.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `hard` | boolean |  <optional> |  false  | If true then the preload sprite and other artifacts may also be cleared. |
| `clearEvents` | boolean |  <optional> |  false  | If true then the all Loader signals will have removeAll called on them. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 465](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L465))   ### 
<internal> resize()

  Called automatically by ScaleManager when the game resizes in RESIZE scalemode.

 This can be used to adjust the preloading sprite size, eg.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 373](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L373))   ### 
script(key, url, callback, callbackContext) → {[Phaser.Loader](phaser.loader)}

  Adds a JavaScript file to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 The key must be a unique String.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"  
and no URL is given then the Loader will set the URL to be "alien.js". It will always add `.js` as the extension.  
If you do not desire this action then provide a URL.

 Upon successful load the JavaScript is automatically turned into a script tag and executed, so be careful what you load!

 A callback, which will be invoked as the script tag has been created, can also be specified.  
The callback must return relevant `data`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the script file. |
| `url` | string |  <optional> |  | URL of the JavaScript file. If undefined or `null` the url will be set to `<key>.js`, i.e. if `key` was "alien" then the URL will be "alien.js". |
| `callback` | function |  <optional> |  (none)  | Optional callback that will be called after the script tag has loaded, so you can perform additional processing. |
| `callbackContext` | object |  <optional> |  (loader)  | The context under which the callback will be applied. If not specified it will use the Phaser Loader as the context. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 876](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L876))   ### 
setPreloadSprite(sprite, direction)

  Set a Sprite to be a "preload" sprite by passing it to this method.

 A "preload" sprite will have its width or height crop adjusted based on the percentage of the loader in real-time.  
This allows you to easily make loading bars for games.

 The sprite will automatically be made visible when calling this.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) |  |  | The sprite or image that will be cropped during the load. |
| `direction` | number |  <optional> |  0  | A value of zero means the sprite will be cropped horizontally, a value of 1 means its will be cropped vertically. |

  Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L338))   ### 
shader(key, url, overwrite) → {[Phaser.Loader](phaser.loader)}

  Adds a fragment shader file to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getShader(key)`.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "blur"  
and no URL is given then the Loader will set the URL to be "blur.frag". It will always add `.frag` as the extension.  
If you do not desire this action then provide a URL.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the fragment file. |
| `url` | string |  <optional> |  | URL of the fragment file. If undefined or `null` the url will be set to `<key>.frag`, i.e. if `key` was "blur" then the URL will be "blur.frag". |
| `overwrite` | boolean |  <optional> |  false  | If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 822](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L822))   ### 
spritesheet(key, url, frameWidth, frameHeight, frameMax, margin, spacing) → {[Phaser.Loader](phaser.loader)}

  Adds a Sprite Sheet to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 To clarify the terminology that Phaser uses: A Sprite Sheet is an image containing frames, usually of an animation, that are all equal  
dimensions and often in sequence. For example if the frame size is 32x32 then every frame in the sprite sheet will be that size.  
Sometimes (outside of Phaser) the term "sprite sheet" is used to refer to a texture atlas.  
A Texture Atlas works by packing together images as best it can, using whatever frame sizes it likes, often with cropping and trimming  
the frames in the process. Software such as Texture Packer, Flash CC or Shoebox all generate texture atlases, not sprite sheets.  
If you've got an atlas then use `Loader.atlas` instead.

 The key must be a unique String. It is used to add the image to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getImage(key)`. Sprite sheets, being image based, live in the same Cache as all other Images.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"  
and no URL is given then the Loader will set the URL to be "alien.png". It will always add `.png` as the extension.  
If you do not desire this action then provide a URL.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the sheet file. |
| `url` | string |  |  | URL of the sprite sheet file. If undefined or `null` the url will be set to `<key>.png`, i.e. if `key` was "alien" then the URL will be "alien.png". |
| `frameWidth` | number |  |  | Width in pixels of a single frame in the sprite sheet. |
| `frameHeight` | number |  |  | Height in pixels of a single frame in the sprite sheet. |
| `frameMax` | number |  <optional> |  -1  | How many frames in this sprite sheet. If not specified it will divide the whole image into frames. |
| `margin` | number |  <optional> |  0  | If the frames have been drawn with a margin, specify the amount here. |
| `spacing` | number |  <optional> |  0  | If the frames have been drawn with spacing between them, specify the amount here. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 949](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L949))   ### 
start()

  Start loading the assets. Normally you don't need to call this yourself as the StateManager will do so.

   Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1735](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1735))   ### 
text(key, url, overwrite) → {[Phaser.Loader](phaser.loader)}

  Adds a Text file to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getText(key)`

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"  
and no URL is given then the Loader will set the URL to be "alien.txt". It will always add `.txt` as the extension.  
If you do not desire this action then provide a URL.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the text file. |
| `url` | string |  <optional> |  | URL of the text file. If undefined or `null` the url will be set to `<key>.txt`, i.e. if `key` was "alien" then the URL will be "alien.txt". |
| `overwrite` | boolean |  <optional> |  false  | If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 767](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L767))   ### 
tilemap(key, url, data, format) → {[Phaser.Loader](phaser.loader)}

  Adds a Tile Map data file to the current load queue.

 Phaser can load data in two different formats: CSV and Tiled JSON.

 Tiled is a free software package, specifically for creating tilemaps, and is available from http://www.mapeditor.org

 You can choose to either load the data externally, by providing a URL to a json file.  
Or you can pass in a JSON object or String via the `data` parameter.  
If you pass a String the data is automatically run through `JSON.parse` and then immediately added to the Phaser.Cache.

 If a URL is provided the file is **not** loaded immediately after calling this method, but is added to the load queue.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getTilemapData(key)`. JSON files are automatically parsed upon load.  
If you need to control when the JSON is parsed then use `Loader.text` instead and parse the text file as needed.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified and no data is given then the Loader will take the key and create a filename from that.  
For example if the key is "level1" and no URL or data is given then the Loader will set the URL to be "level1.json".  
If you set the format to be Tilemap.CSV it will set the URL to be "level1.csv" instead.

 If you do not desire this action then provide a URL or data object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the tilemap data. |
| `url` | string |  <optional> |  | URL of the tile map file. If undefined or `null` and no data is given the url will be set to `<key>.json`, i.e. if `key` was "level1" then the URL will be "level1.json". |
| `data` | object | string |  <optional> |  | An optional JSON data object. If given then the url is ignored and this JSON object is used for map data instead. |
| `format` | number |  <optional> |  Phaser.Tilemap.CSV  | The format of the map data. Either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED\_JSON. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1165))   ### 
<internal> totalLoadedFiles() → {number}

  Returns the number of files that have already been loaded, even if they errored.

  ##### Returns

   number -   The number of files that have already been loaded (even if they errored)

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 2988](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L2988))   ### 
<internal> totalLoadedPacks() → {number}

  Returns the number of asset packs that have already been loaded, even if they errored.

  ##### Returns

   number -   The number of asset packs that have already been loaded (even if they errored)

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 3014](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L3014))   ### 
<internal> totalQueuedFiles() → {number}

  Returns the number of files still waiting to be processed in the load queue. This value decreases as each file in the queue is loaded.

  ##### Returns

   number -   The number of files that still remain in the load queue.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 3001](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L3001))   ### 
<internal> totalQueuedPacks() → {number}

  Returns the number of asset packs still waiting to be processed in the load queue. This value decreases as each pack in the queue is loaded.

  ##### Returns

   number -   The number of asset packs that still remain in the load queue.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 3027](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L3027))   ### 
<internal> transformUrl(url, file) → {string}

  Transforms the asset URL.

 The default implementation prepends the baseURL if the url doesn't begin with http or //

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `url` | string | The url to transform. |
| `file` | object | The file object being transformed. |

 ##### Returns

   string -   The transformed url. In rare cases where the url isn't specified it will return false instead.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 2063](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L2063))   ### 
video(key, urls, loadEvent, asBlob) → {[Phaser.Loader](phaser.loader)}

  Adds a video file to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getVideo(key)`.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 You don't need to preload a video in order to play it in your game. See `Video.createVideoFromURL` for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the video file. |
| `urls` | string | Array.<string> | Array.<object> |  |  | Either a single string or an array of URIs or pairs of `{uri: .., type: ..}`. If an array is specified then the first URI (or URI + mime pair) that is device-compatible will be selected. For example: `"boom.mp4"`, `['boom.mp4', 'boom.ogg', 'boom.webm']`, or `[{uri: "data:<opus_resource>", type: 'opus'}, 'fallback.mp4']`. BLOB and DATA URIs can be used but only support automatic detection when used in the pair form; otherwise the format must be manually checked before adding the resource. |
| `loadEvent` | string |  <optional> |  'canplaythrough'  | This sets the Video source event to listen for before the load is considered complete. 'canplaythrough' implies the video has downloaded enough, and bandwidth is high enough that it can be played to completion. 'canplay' implies the video has downloaded enough to start playing, but not necessarily to finish. 'loadeddata' just makes sure that the video meta data and first frame have downloaded. Phaser uses this value automatically if the browser is detected as being Firefox and no `loadEvent` is given, otherwise it defaults to `canplaythrough`. |
| `asBlob` | boolean |  <optional> |  false  | Video files can either be loaded via the creation of a video element which has its src property set. Or they can be loaded via xhr, stored as binary data in memory and then converted to a Blob. This isn't supported in IE9 or Android 2. If you need to have the same video playing at different times across multiple Sprites then you need to load it as a Blob. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1111](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1111))   ### 
withSyncPoints(callback, callbackContext) → {[Phaser.Loader](phaser.loader)}

  Add a synchronization point to the assets/files added within the supplied callback.

 A synchronization point denotes that an asset *must* be completely loaded before  
subsequent assets can be loaded. An asset marked as a sync-point does not need to wait  
for previous assets to load (unless they are sync-points). Resources, such as packs, may still  
be downloaded around sync-points, as long as they do not finalize loading.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The callback is invoked and is supplied with a single argument: the loader. |
| `callbackContext` | object |  <optional> |  (loader)  | Context for the callback. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 1649](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L1649))   ### 
xml(key, url, overwrite) → {[Phaser.Loader](phaser.loader)}

  Adds an XML file to the current load queue.

 The file is **not** loaded immediately after calling this method. The file is added to the queue ready to be loaded when the loader starts.

 The key must be a unique String. It is used to add the file to the Phaser.Cache upon successful load.

 Retrieve the file via `Cache.getXML(key)`.

 The URL can be relative or absolute. If the URL is relative the `Loader.baseURL` and `Loader.path` values will be prepended to it.

 If the URL isn't specified the Loader will take the key and create a filename from that. For example if the key is "alien"  
and no URL is given then the Loader will set the URL to be "alien.xml". It will always add `.xml` as the extension.  
If you do not desire this action then provide a URL.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Unique asset key of the xml file. |
| `url` | string |  <optional> |  | URL of the XML file. If undefined or `null` the url will be set to `<key>.xml`, i.e. if `key` was "alien" then the URL will be "alien.xml". |
| `overwrite` | boolean |  <optional> |  false  | If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. |

 ##### Returns

   [Phaser.Loader](phaser.loader) -   This Loader instance.

    Source code: [loader/Loader.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js) ([Line 849](https://github.com/photonstorm/phaser/tree/v2.6.2/src/loader/Loader.js#L849))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Loader.html>

Class: Phaser.GameObjectCreator
===============================

 Constructor
-----------

 ### 
new GameObjectCreator(game)

  The GameObjectCreator is a quick way to create common game objects *without* adding them to the game world.  
The object creator can be accessed with [``game.make``](phaser.game#make).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L15))   Public Properties
-----------------

  ### 
<internal> game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L21))   ### 
<internal> world : [Phaser.World](phaser.world)

  A reference to the game world.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L27))    Public Methods
--------------

  ### 
audio(key, volume, loop, connect) → {[Phaser.Sound](phaser.sound)}

  Creates a new Sound object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The Game.cache key of the sound that this object will use. |
| `volume` | number |  <optional> |  1  | The volume at which the sound will be played. |
| `loop` | boolean |  <optional> |  false  | Whether or not the sound will loop. |
| `connect` | boolean |  <optional> |  true  | Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   The newly created text object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 118](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L118))   ### 
audioSprite(key) → {[Phaser.AudioSprite](phaser.audiosprite)}

  Creates a new AudioSprite object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The Game.cache key of the sound that this object will use. |

 ##### Returns

   [Phaser.AudioSprite](phaser.audiosprite) -   The newly created AudioSprite object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 134](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L134))   ### 
bitmapData(width, height, key, addToCache) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Create a BitmpaData object.

 A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | number |  <optional> |  256  | The width of the BitmapData in pixels. |
| `height` | number |  <optional> |  256  | The height of the BitmapData in pixels. |
| `key` | string |  <optional> |  ''  | Asset key for the BitmapData when stored in the Cache (see addToCache parameter). |
| `addToCache` | boolean |  <optional> |  false  | Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key) |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   The newly created BitmapData object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 379](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L379))   ### 
bitmapText(x, y, font, text, size, align) → {[Phaser.BitmapText](phaser.bitmaptext)}

  Create a new BitmapText object.

 BitmapText objects work by taking a texture file and an XML file that describes the font structure.  
It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to  
match the font structure.

 BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability  
to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by  
processing the font texture in an image editor first, applying fills and any other effects required.

 To create multi-line text insert \r, \n or \r\n escape codes into the text string.

 To create a BitmapText data files you can use:

 BMFont (Windows, free): http://www.angelcode.com/products/bmfont/  
Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner  
Littera (Web-based, free): http://kvazars.com/littera/

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | X coordinate to display the BitmapText object at. |
| `y` | number |  |  | Y coordinate to display the BitmapText object at. |
| `font` | string |  |  | The key of the BitmapText as stored in Phaser.Cache. |
| `text` | string |  <optional> |  ''  | The text that will be rendered. This can also be set later via BitmapText.text. |
| `size` | number |  <optional> |  32  | The size the font will be rendered at in pixels. |
| `align` | string |  <optional> |  'left'  | The alignment of multi-line text. Has no effect if there is only one line of text. |

 ##### Returns

   [Phaser.BitmapText](phaser.bitmaptext) -   The newly created bitmapText object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 297](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L297))   ### 
button(x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame) → {[Phaser.Button](phaser.button)}

  Creates a new Button object.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  <optional> | X position of the new button object. |
| `y` | number |  <optional> | Y position of the new button object. |
| `key` | string |  <optional> | The image key as defined in the Game.Cache to use as the texture for this button. |
| `callback` | function |  <optional> | The function to call when this button is pressed |
| `callbackContext` | object |  <optional> | The context in which the callback will be called (usually 'this') |
| `overFrame` | string | number |  <optional> | 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. |
| `outFrame` | string | number |  <optional> | 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. |
| `downFrame` | string | number |  <optional> | 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. |
| `upFrame` | string | number |  <optional> | 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. |

 ##### Returns

   [Phaser.Button](phaser.button) -   The newly created button object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 215](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L215))   ### 
emitter(x, y, maxParticles) → {Phaser.Emitter}

  Creat a new Emitter.

 An Emitter is a lightweight particle emitter. It can be used for one-time explosions or for  
continuous effects like rain and fire. All it really does is launch Particle objects out  
at set intervals, and fixes their positions and velocities accorindgly.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate within the Emitter that the particles are emitted from. |
| `y` | number |  <optional> |  0  | The y coordinate within the Emitter that the particles are emitted from. |
| `maxParticles` | number |  <optional> |  50  | The total number of particles in this emitter. |

 ##### Returns

   Phaser.Emitter -   The newly created emitter object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 250](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L250))   ### 
filter(filter) → {[Phaser.Filter](phaser.filter)}

  A WebGL shader/filter that can be applied to Sprites.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `filter` | string | The name of the filter you wish to create, for example HueRotate or SineWave. |
|  | any | Whatever parameters are needed to be passed to the filter init function. |

 ##### Returns

   [Phaser.Filter](phaser.filter) -   The newly created Phaser.Filter object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 407](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L407))   ### 
graphics(x, y) → {[Phaser.Graphics](phaser.graphics)}

  Creates a new Graphics object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | X position of the new graphics object. |
| `y` | number |  <optional> |  0  | Y position of the new graphics object. |

 ##### Returns

   [Phaser.Graphics](phaser.graphics) -   The newly created graphics object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 236](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L236))   ### 
group(parent, name, addToStage, enableBody, physicsBodyType) → {[Phaser.Group](phaser.group)}

  A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | any |  |  | The parent Group or DisplayObjectContainer that will hold this group, if any. |
| `name` | string |  <optional> |  'group'  | A name for this Group. Not used internally but useful for debugging. |
| `addToStage` | boolean |  <optional> |  false  | If set to true this Group will be added directly to the Game.Stage instead of Game.World. |
| `enableBody` | boolean |  <optional> |  false  | If true all Sprites created with `Group.create` or `Group.createMulitple` will have a physics body created on them. Change the body type with physicsBodyType. |
| `physicsBodyType` | number |  <optional> |  0  | 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. |

 ##### Returns

   [Phaser.Group](phaser.group) -   The newly created Group.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L83))   ### 
image(x, y, key, frame) → {[Phaser.Image](phaser.image)}

  Create a new Image object.

 An Image is a light-weight object you can use to display anything that doesn't need physics or animation.  
It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | X position of the image. |
| `y` | number |  | Y position of the image. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [PIXI.Texture](pixi.texture) |  | This is the image or texture used by the Sprite 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 |  <optional> | If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. |

 ##### Returns

   [Phaser.Image](phaser.image) -   the newly created sprite object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L33))   ### 
renderTexture(width, height, key, addToCache) → {[Phaser.RenderTexture](phaser.rendertexture)}

  A dynamic initially blank canvas to which images can be drawn.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | number |  <optional> |  100  | the width of the RenderTexture. |
| `height` | number |  <optional> |  100  | the height of the RenderTexture. |
| `key` | string |  <optional> |  ''  | Asset key for the RenderTexture when stored in the Cache (see addToCache parameter). |
| `addToCache` | boolean |  <optional> |  false  | Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key) |

 ##### Returns

   [Phaser.RenderTexture](phaser.rendertexture) -   The newly created RenderTexture object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 353](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L353))   ### 
retroFont(font, characterWidth, characterHeight, chars, charsPerRow, xSpacing, ySpacing, xOffset, yOffset) → {[Phaser.RetroFont](phaser.retrofont)}

  Create a new RetroFont object.

 A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache.  
A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set.  
If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText  
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.  
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,  
i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `font` | string |  |  | The key of the image in the Game.Cache that the RetroFont will use. |
| `characterWidth` | number |  |  | The width of each character in the font set. |
| `characterHeight` | number |  |  | The height of each character in the font set. |
| `chars` | string |  |  | The characters used in the font set, in display order. You can use the TEXT\_SET consts for common font set arrangements. |
| `charsPerRow` | number |  |  | The number of characters per row in the font set. |
| `xSpacing` | number |  <optional> |  0  | If the characters in the font set have horizontal spacing between them set the required amount here. |
| `ySpacing` | number |  <optional> |  0  | If the characters in the font set have vertical spacing between them set the required amount here. |
| `xOffset` | number |  <optional> |  0  | If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. |
| `yOffset` | number |  <optional> |  0  | If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. |

 ##### Returns

   [Phaser.RetroFont](phaser.retrofont) -   The newly created RetroFont texture which can be applied to an Image or Sprite.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 269](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L269))   ### 
rope(x, y, width, height, key, frame) → {[Phaser.Rope](phaser.rope)}

  Creates a new Rope object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `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. |
| `width` | number | The width of the Rope. |
| `height` | number | The height of the Rope. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [PIXI.Texture](pixi.texture) | This is the image or texture used by the TileSprite 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. |

 ##### Returns

   [Phaser.Rope](phaser.rope) -   The newly created rope object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 181](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L181))   ### 
sound(key, volume, loop, connect) → {[Phaser.Sound](phaser.sound)}

  Creates a new Sound object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The Game.cache key of the sound that this object will use. |
| `volume` | number |  <optional> |  1  | The volume at which the sound will be played. |
| `loop` | boolean |  <optional> |  false  | Whether or not the sound will loop. |
| `connect` | boolean |  <optional> |  true  | Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   The newly created text object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 147](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L147))   ### 
sprite(x, y, key, frame) → {[Phaser.Sprite](phaser.sprite)}

  Create a new Sprite with specific position and sprite sheet key.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | X position of the new sprite. |
| `y` | number |  | Y position of the new sprite. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [PIXI.Texture](pixi.texture) |  | This is the image or texture used by the Sprite 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 |  <optional> | If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. |

 ##### Returns

   [Phaser.Sprite](phaser.sprite) -   the newly created sprite object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L52))   ### 
spriteBatch(parent, name, addToStage) → {[Phaser.SpriteBatch](phaser.spritebatch)}

  Create a new SpriteBatch.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | any |  |  | The parent Group or DisplayObjectContainer that will hold this group, if any. |
| `name` | string |  <optional> |  'group'  | A name for this Group. Not used internally but useful for debugging. |
| `addToStage` | boolean |  <optional> |  false  | If set to true this Group will be added directly to the Game.Stage instead of Game.World. |

 ##### Returns

   [Phaser.SpriteBatch](phaser.spritebatch) -   The newly created group.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L100))   ### 
text(x, y, text, style) → {[Phaser.Text](phaser.text)}

  Creates a new Text object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | X position of the new text object. |
| `y` | number | Y position of the new text object. |
| `text` | string | The actual text that will be written. |
| `style` | object | The style object containing style attributes like font, font size , etc. |

 ##### Returns

   [Phaser.Text](phaser.text) -   The newly created text object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L199))   ### 
tilemap(key, tileWidth, tileHeight, width, height)

  Creates a new Phaser.Tilemap object.

 The map can either be populated with data from a Tiled JSON file or from a CSV file.  
To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key.  
When using CSV data you must provide the key and the tileWidth and tileHeight parameters.  
If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here.  
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.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  <optional> |  | 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 `null`. |
| `tileWidth` | number |  <optional> |  32  | The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. |
| `tileHeight` | number |  <optional> |  32  | The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. |
| `width` | number |  <optional> |  10  | The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. |
| `height` | number |  <optional> |  10  | The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. |

  Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 331](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L331))   ### 
tileSprite(x, y, width, height, key, frame) → {[Phaser.TileSprite](phaser.tilesprite)}

  Creates a new TileSprite object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate (in world space) to position the TileSprite at. |
| `y` | number | The y coordinate (in world space) to position the TileSprite at. |
| `width` | number | The width of the TileSprite. |
| `height` | number | The height of the TileSprite. |
| `key` | string | [Phaser.BitmapData](phaser.bitmapdata) | [PIXI.Texture](pixi.texture) | 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. |
| `frame` | string | number | If this TileSprite 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. |

 ##### Returns

   [Phaser.TileSprite](phaser.tilesprite) -   The newly created tileSprite object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L163))   ### 
tween(obj) → {[Phaser.Tween](phaser.tween)}

  Create a tween object for a specific object.

 The object can be any JavaScript object or Phaser object such as Sprite.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `obj` | object | Object the tween will be run on. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   The Tween object.

    Source code: [gameobjects/GameObjectCreator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectCreator.js#L68))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.GameObjectCreator.html>

Class: Phaser.Sprite
====================

 Constructor
-----------

 ### 
new Sprite(game, x, y, key, frame)

  Sprites are the lifeblood of your game, used for nearly everything visual.

 At its most basic a Sprite consists of a set of coordinates and a texture that is rendered to the canvas.  
They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input),  
events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `x` | number | The x coordinate (in world space) to position the Sprite at. |
| `y` | number | The y coordinate (in world space) to position the Sprite at. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [PIXI.Texture](pixi.texture) | This is the image or texture used by the Sprite 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 Sprite 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. |

  Source code: [gameobjects/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js#L44))   Extends
-------

 * [PIXI.Sprite](pixi.sprite)
* [Phaser.Component.Core](phaser.component.core)
* [Phaser.Component.Angle](phaser.component.angle)
* [Phaser.Component.Animation](phaser.component.animation)
* [Phaser.Component.AutoCull](phaser.component.autocull)
* [Phaser.Component.Bounds](phaser.component.bounds)
* [Phaser.Component.BringToTop](phaser.component.bringtotop)
* [Phaser.Component.Crop](phaser.component.crop)
* [Phaser.Component.Delta](phaser.component.delta)
* [Phaser.Component.Destroy](phaser.component.destroy)
* [Phaser.Component.FixedToCamera](phaser.component.fixedtocamera)
* [Phaser.Component.Health](phaser.component.health)
* [Phaser.Component.InCamera](phaser.component.incamera)
* [Phaser.Component.InputEnabled](phaser.component.inputenabled)
* [Phaser.Component.InWorld](phaser.component.inworld)
* [Phaser.Component.LifeSpan](phaser.component.lifespan)
* [Phaser.Component.LoadTexture](phaser.component.loadtexture)
* [Phaser.Component.Overlap](phaser.component.overlap)
* [Phaser.Component.PhysicsBody](phaser.component.physicsbody)
* [Phaser.Component.Reset](phaser.component.reset)
* [Phaser.Component.ScaleMinMax](phaser.component.scaleminmax)
* [Phaser.Component.Smoothed](phaser.component.smoothed)

 Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
anchor :Point

  The anchor sets the origin point of the texture.  
The default is 0,0 this means the texture's origin is the top left  
Setting than anchor to 0.5,0.5 means the textures origin is centered  
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

   Inherited From * [PIXI.Sprite#anchor](pixi.sprite#anchor)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L17))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

 Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

   Inherited From * [PIXI.Sprite#blendMode](pixi.sprite#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L82))   ### 
body : [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated  
properties and methods via it.

 By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

 To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object  
and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

 You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

 Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5,  
so the physics body is centered on the Game Object.

 If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  ##### Type

 * [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  Inherited From * [Phaser.Component.PhysicsBody#body](phaser.component.physicsbody#body)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L91))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
checkWorldBounds : boolean

  If this is set to `true` the Game Object checks if it is within the World bounds each frame. 

 When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

 If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

 It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

 When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.InWorld#checkWorldBounds](phaser.component.inworld#checkWorldBounds)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L98))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
cropRect : [Phaser.Rectangle](phaser.rectangle)

  The Rectangle used to crop the texture this Game Object uses.  
Set this property via `crop`.  
If you modify this property directly you must call `updateCrop` in order to have the change take effect.

   Inherited From * [Phaser.Component.Crop#cropRect](phaser.component.crop#cropRect)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L24))   ### 
damage

  Damages the Game Object. This removes the given amount of health from the `health` property.

 If health is taken below or is equal to zero then the `kill` method is called.

   Inherited From * [Phaser.Component.Health#damage](phaser.component.health#damage)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L46))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] deltaX : number

  Returns the delta x value. The difference between world.x now and in the previous frame.

 The value will be positive if the Game Object has moved to the right or negative if to the left.

   Inherited From * [Phaser.Component.Delta#deltaX](phaser.component.delta#deltaX)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L24))   ### 
[readonly] deltaY : number

  Returns the delta y value. The difference between world.y now and in the previous frame.

 The value will be positive if the Game Object has moved down or negative if up.

   Inherited From * [Phaser.Component.Delta#deltaY](phaser.component.delta#deltaY)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L42))   ### 
[readonly] deltaZ : number

  Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

   Inherited From * [Phaser.Component.Delta#deltaZ](phaser.component.delta#deltaZ)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L58))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Sprite is processed by the core Phaser game loops and Group loops.

   Inherited From * [PIXI.Sprite#exists](pixi.sprite#exists)
 Default Value * true
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L103))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
frame : integer

  Gets or sets the current frame index of the texture being used to render this Game Object.

 To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,  
for example: `player.frame = 4`.

 If the frame index given doesn't exist it will revert to the first frame found in the texture.

 If you are using a texture atlas then you should use the `frameName` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frame](phaser.component.loadtexture#frame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L254))   ### 
frameName : string

  Gets or sets the current frame name of the texture being used to render this Game Object.

 To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use,  
for example: `player.frameName = "idle"`.

 If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

 If you are using a sprite sheet then you should use the `frame` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frameName](phaser.component.loadtexture#frameName)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L279))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
heal

  Heal the Game Object. This adds the given amount of health to the `health` property.

   Inherited From * [Phaser.Component.Health#heal](phaser.component.health#heal)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L90))   ### 
health : number

  The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

 It can be used in combination with the `damage` method or modified directly.

   Inherited From * [Phaser.Component.Health#health](phaser.component.health#health)
 Default Value * 1
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L26))   ### 
height : number

  The height of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#height](pixi.sprite#height)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L144))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Inherited From * [Phaser.Component.InputEnabled#input](phaser.component.inputenabled#input)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Inherited From * [Phaser.Component.InputEnabled#inputEnabled](phaser.component.inputenabled#inputEnabled)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   ### 
[readonly] inWorld : boolean

  Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

   Inherited From * [Phaser.Component.InWorld#inWorld](phaser.component.inworld#inWorld)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L129))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
maxHealth : number

  The Game Objects maximum health value. This works in combination with the `heal` method to ensure  
the health value never exceeds the maximum.

   Inherited From * [Phaser.Component.Health#maxHealth](phaser.component.health#maxHealth)
 Default Value * 100
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L35))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
outOfBoundsKill : boolean

  If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

   Inherited From * [Phaser.Component.InWorld#outOfBoundsKill](phaser.component.inworld#outOfBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L106))   ### 
outOfCameraBoundsKill : boolean

  If this and the `autoCull` property are both set to `true`, then the `kill` method  
is called as soon as the Game Object leaves the camera bounds.

   Inherited From * [Phaser.Component.InWorld#outOfCameraBoundsKill](phaser.component.inworld#outOfCameraBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L115))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Source code: [gameobjects/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js#L61))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
scaleMax : [Phaser.Point](phaser.point)

  The maximum scale this Game Object will scale up to. 

 It allows you to prevent a parent from scaling this Game Object higher than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMax](phaser.component.scaleminmax#scaleMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L46))   ### 
scaleMin : [Phaser.Point](phaser.point)

  The minimum scale this Game Object will scale down to.

 It allows you to prevent a parent from scaling this Game Object lower than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMin](phaser.component.scaleminmax#scaleMin)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L36))   ### 
setHealth

  Sets the health property of the Game Object to the given amount.  
Will never exceed the `maxHealth` value.

   Inherited From * [Phaser.Component.Health#setHealth](phaser.component.health#setHealth)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L70))   ### 
shader : [PIXI.AbstractFilter](pixi.abstractfilter)

  The shader that will be used to render this Sprite.  
Set to null to remove a current shader.

   Inherited From * [PIXI.Sprite#shader](pixi.sprite#shader)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L93))   ### 
smoothed : boolean

  Enable or disable texture smoothing for this Game Object.

 It only takes effect if the Game Object is using an image based texture.

 Smoothing is enabled by default.

   Inherited From * [Phaser.Component.Smoothed#smoothed](phaser.component.smoothed#smoothed)
 Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L25))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture that the sprite is using

   Inherited From * [PIXI.Sprite#texture](pixi.sprite#texture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L28))   ### 
tint : number

  The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

   Inherited From * [PIXI.Sprite#tint](pixi.sprite#tint)
 Default Value * 0xFFFFFF
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L54))   ### 
tintedTexture :Canvas

  A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

   Inherited From * [PIXI.Sprite#tintedTexture](pixi.sprite#tintedTexture)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L73))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
transformCallback : Function

  The callback that will apply any scale limiting to the worldTransform.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallback](phaser.component.scaleminmax#transformCallback)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L20))   ### 
transformCallbackContext : Object

  The context under which `transformCallback` is called.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallbackContext](phaser.component.scaleminmax#transformCallbackContext)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L26))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [gameobjects/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js#L55))   ### 
width : number

  The width of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#width](pixi.sprite#width)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L125))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
x : number

  The position of the Game Object on the x axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#x](phaser.component.physicsbody#x)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L98))   ### 
y : number

  The position of the Game Object on the y axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#y](phaser.component.physicsbody#y)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L124))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#bringToTop](phaser.component.bringtotop#bringToTop)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
crop(rect, copy)

  Crop allows you to crop the texture being used to display this Game Object.  
Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

 Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,  
or by modifying `cropRect` property directly and then calling `updateCrop`.

 The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object  
so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

 A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`,  
in which case the values are duplicated to a local object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) |  |  | The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. |
| `copy` | boolean |  <optional> |  false  | If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect. |

  Inherited From * [Phaser.Component.Crop#crop](phaser.component.crop#crop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L49))   ### 
destroy(destroyChildren, destroyTexture)

  Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present  
and nulls its reference to `game`, freeing it up for garbage collection.

 If this Game Object has the Events component it will also dispatch the `onDestroy` event.

 You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called as well? |
| `destroyTexture` | boolean |  <optional> |  false  | Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Component.Destroy#destroy](phaser.component.destroy#destroy)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L37))   ### 
getBounds(matrix) → {Rectangle}

  Returns the bounds of the Sprite as a rectangle.  
The bounds calculation takes the worldTransform into account.

 It is important to note that the transform is not updated when you call this method.  
So if this Sprite is the child of a Display Object which has had its transform  
updated since the last render pass, those changes will not yet have been applied  
to this Sprites worldTransform. If you need to ensure that all parent transforms  
are factored into this getBounds operation then you should call `updateTransform`  
on the root most object in this Sprites display list first.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Matrix | the transformation matrix of the sprite |

 ##### Returns

   Rectangle -   the framing rectangle

    Inherited From * [PIXI.Sprite#getBounds](pixi.sprite#getBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L199))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.Sprite#getLocalBounds](pixi.sprite#getLocalBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L315))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
loadTexture(key, frame, stopAnimation)

  Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

 If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

 You should only use `loadTexture` if you want to replace the base texture entirely.

 Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

 You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite.  
Doing this then sets the key to be the `frame` argument (the frame is set to zero). 

 This allows you to create sprites using `load.image` during development, and then change them  
to use a Texture Atlas later in development by simply searching your code for 'PENDING\_ATLAS'  
and swapping it to be the key of the atlas data.

 Note: You cannot use a RenderTexture as a texture for a TileSprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `stopAnimation` | boolean |  <optional> |  true  | If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. |

  Inherited From * [Phaser.Component.LoadTexture#loadTexture](phaser.component.loadtexture#loadTexture)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L51))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveDown](phaser.component.bringtotop#moveDown)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveUp](phaser.component.bringtotop#moveUp)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
overlap(displayObject) → {boolean}

  Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,  
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

 This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

 Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.  
It should be fine for low-volume testing where physics isn't required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Button](phaser.button) | PIXI.DisplayObject | The display object to check against. |

 ##### Returns

   boolean -   True if the bounds of this Game Object intersects at any point with the bounds of the given display object.

    Inherited From * [Phaser.Component.Overlap#overlap](phaser.component.overlap#overlap)
 Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L29))   ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays an Animation.

 The animation should have previously been created via `animations.add`.

 If the animation is already playing calling this again won't do anything.  
If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'. |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation.

    Inherited From * [Phaser.Component.Animation#play](phaser.component.animation#play)
 Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L31))   ### 
<internal> postUpdate()

  Internal method called by the World postUpdate cycle.

   Inherited From * [Phaser.Component.Core#postUpdate](phaser.component.core#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L338))   ### 
preUpdate() → {boolean}

  Automatically called by World.preUpdate.

  ##### Returns

   boolean -   True if the Sprite was rendered, otherwise false.

    Source code: [gameobjects/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js#L107))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
reset(x, y, health) → {PIXI.DisplayObject}

  Resets the Game Object.

 This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`,  
`visible` and `renderable` to true.

 If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

 If this Game Object has a Physics Body it will reset the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Game Object at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Game Object at. |
| `health` | number |  <optional> |  1  | The health to give the Game Object if it has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.Reset#reset](phaser.component.reset#reset)
 Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L30))   ### 
resetFrame()

  Resets the texture frame dimensions that the Game Object uses for rendering.

   Inherited From * [Phaser.Component.LoadTexture#resetFrame](phaser.component.loadtexture#resetFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L232))   ### 
resizeFrame(parent, width, height)

  Resizes the Frame dimensions that the Game Object uses for rendering.

 You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData  
it can be useful to adjust the dimensions directly in this way.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | object | The parent texture object that caused the resize, i.e. a Phaser.Video object. |
| `width` | integer | The new width of the texture. |
| `height` | integer | The new height of the texture. |

  Inherited From * [Phaser.Component.LoadTexture#resizeFrame](phaser.component.loadtexture#resizeFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L220))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#sendToBack](phaser.component.bringtotop#sendToBack)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setFrame(frame)

  Sets the texture frame the Game Object uses for rendering.

 This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The Frame to be used by the texture. |

  Inherited From * [Phaser.Component.LoadTexture#setFrame](phaser.component.loadtexture#setFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L155))   ### 
setScaleMinMax(minX, minY, maxX, maxY)

  Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

 For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored  
and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

 By setting these values you can carefully control how Game Objects deal with responsive scaling.

 If only one parameter is given then that value will be used for both scaleMin and scaleMax:  
`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

 If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:  
`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

 If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly,  
or pass `null` for the `maxX` and `maxY` parameters.

 Call `setScaleMinMax(null)` to clear all previously set values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `minX` | number | null | The minimum horizontal scale value this Game Object can scale down to. |
| `minY` | number | null | The minimum vertical scale value this Game Object can scale down to. |
| `maxX` | number | null | The maximum horizontal scale value this Game Object can scale up to. |
| `maxY` | number | null | The maximum vertical scale value this Game Object can scale up to. |

  Inherited From * [Phaser.Component.ScaleMinMax#setScaleMinMax](phaser.component.scaleminmax#setScaleMinMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L110))   ### 
setTexture(texture, destroy)

  Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous  
texture this Sprite was using.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) |  |  | The PIXI texture that is displayed by the sprite |
| `destroy` | Boolean |  <optional> |  false  | Call Texture.destroy on the current texture before replacing it with the new one? |

  Inherited From * [PIXI.Sprite#setTexture](pixi.sprite#setTexture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L163))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Override this method in your own custom objects to handle any update requirements.  
It is called immediately after `preUpdate` and before `postUpdate`.  
Remember if this Game Object has any children you should call update on those too.

   Inherited From * [Phaser.Component.Core#update](phaser.component.core#update)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L328))   ### 
updateCrop()

  If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,  
or the rectangle it references, then you need to update the crop frame by calling this method.

   Inherited From * [Phaser.Component.Crop#updateCrop](phaser.component.crop#updateCrop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L86))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Sprite.html>

Class: Phaser.World
===================

 Constructor
-----------

 ### 
new World(game)

  "This world is but a canvas to our imagination." - Henry David Thoreau

 A game has only one world. The world is an abstract place in which all game objects live. It is not bound  
by stage limits and can be any size. You look into the world via cameras. All game objects live within  
the world at world-based coordinates. By default a world is created the same size as your Stage.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Reference to the current game instance. |

  Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L19))   Extends
-------

 * [Phaser.Group](phaser.group)

 Public Properties
-----------------

  ### 
[readonly] \_definedSize : boolean

  True if the World has been given a specifically defined size (i.e. from a Tilemap or direct in code) or false if it's just matched to the Game dimensions.

   Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 41](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L41))   ### 
\_height

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `height` | number | The defined height of the World. Sometimes the bounds needs to grow larger than this (if you resize the game) but this retains the original requested dimension. |

  Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L51))   ### 
\_width

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | The defined width of the World. Sometimes the bounds needs to grow larger than this (if you resize the game) but this retains the original requested dimension. |

  Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L46))   ### 
alive : boolean

  The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

   Inherited From * [Phaser.Group#alive](phaser.group#alive)
 Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L93))   ### 
alpha : number

  The alpha value of the group container.

   Inherited From * [Phaser.Group#alpha](phaser.group#alpha)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 3003](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L3003))   ### 
angle : number

  The angle of rotation of the group container, in degrees.

 This adjusts the group itself by modifying its local rotation transform.

 This has no impact on the rotation/angle properties of the children, but it will update their worldTransform  
and on-screen orientation and position.

   Inherited From * [Phaser.Group#angle](phaser.group#angle)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2682))   ### 
bottom : number

  The bottom coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#bottom](phaser.group#bottom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2845](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2845))   ### 
bounds : [Phaser.Rectangle](phaser.rectangle)

  The World has no fixed size, but it does have a bounds outside of which objects are no longer considered as being "in world" and you should use this to clean-up the display list and purge dead objects.  
By default we set the Bounds to be from 0,0 to Game.width,Game.height. I.e. it will match the size given to the game constructor with 0,0 representing the top-left of the display.  
However 0,0 is actually the center of the world, and if you rotate or scale the world all of that will happen from 0,0.  
So if you want to make a game in which the world itself will rotate you should adjust the bounds so that 0,0 is the center point, i.e. set them to -1000,-1000,2000,2000 for a 2000x2000 sized world centered around 0,0. Bound of this world that objects can not escape from.

   Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L30))   ### 
camera : [Phaser.Camera](phaser.camera)

  Camera instance.

   Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L35))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  If this object is [fixedToCamera](phaser.group#fixedToCamera) then this stores the x/y position offset relative to the top-left of the camera view.  
If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

   Inherited From * [Phaser.Group#cameraOffset](phaser.group#cameraOffset)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 272](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L272))   ### 
[readonly] centerX : number

  Gets the X position corresponding to the center point of the world.

   Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L293))   ### 
[readonly] centerY : number

  Gets the Y position corresponding to the center point of the world.

   Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 306](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L306))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
classType : Object

  The type of objects that will be created when using [create](phaser.group#create) or [createMultiple](phaser.group#createMultiple).

 Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments:  
when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

   Inherited From * [Phaser.Group#classType](phaser.group#classType)
 Default Value * [Phaser.Sprite](phaser.sprite)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L130))   ### 
cursor : [DisplayObject](global#DisplayObject)

  The current display object that the group cursor is pointing to, if any. (Can be set manually.)

 The cursor is a way to iterate through the children in a Group using [next](phaser.group#next) and [previous](phaser.group#previous).

   Inherited From * [Phaser.Group#cursor](phaser.group#cursor)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L138))   ### 
[readonly] cursorIndex : integer

  The current index of the Group cursor. Advance it with Group.next.

   Inherited From * [Phaser.Group#cursorIndex](phaser.group#cursorIndex)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 255](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L255))   ### 
enableBody : boolean

  If true all Sprites created by, or added to this group, will have a physics body enabled on them.

 If there are children already in the Group at the time you set this property, they are not changed.

 The default body type is controlled with [physicsBodyType](phaser.group#physicsBodyType).

   Inherited From * [Phaser.Group#enableBody](phaser.group#enableBody)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L208))   ### 
enableBodyDebug : boolean

  If true when a physics body is created (via [enableBody](phaser.group#enableBody)) it will create a physics debug object as well.

 This only works for P2 bodies.

   Inherited From * [Phaser.Group#enableBodyDebug](phaser.group#enableBodyDebug)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L217))   ### 
exists : boolean

  If exists is true the group is updated, otherwise it is skipped.

   Inherited From * [Phaser.Group#exists](phaser.group#exists)
 Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L100))   ### 
fixedToCamera : boolean

  A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

 Note that the cameraOffset values are in addition to any parent in the display list.  
So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

   Inherited From * [Phaser.Group#fixedToCamera](phaser.group#fixedToCamera)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 265](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L265))   ### 
<internal> game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Group#game](phaser.group#game)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L38))   ### 
hash :array

  The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

 Only children of this Group can be added to and removed from the hash.

 This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.  
However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own  
sorting and filtering of Group children without touching their z-index (and therefore display draw order)

   Inherited From * [Phaser.Group#hash](phaser.group#hash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 285](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L285))   ### 
height : number

  Gets or sets the current height of the game world. The world can never be smaller than the game (canvas) dimensions.

   Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 268](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L268))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
ignoreDestroy : boolean

  A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

   Inherited From * [Phaser.Group#ignoreDestroy](phaser.group#ignoreDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L107))   ### 
inputEnableChildren : boolean

  A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true`  
on any children *added* to, or *created by*, this Group.

 If there are children already in the Group at the time you set this property, they are not changed.

   Inherited From * [Phaser.Group#inputEnableChildren](phaser.group#inputEnableChildren)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L149))   ### 
left : number

  The left coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#left](phaser.group#left)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2761](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2761))   ### 
[readonly] length : integer

  Total number of children in this group, regardless of exists/alive status.

   Inherited From * [Phaser.Group#length](phaser.group#length)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2665](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2665))   ### 
name : string

  A name for this group. Not used internally but useful for debugging.

   Inherited From * [Phaser.Group#name](phaser.group#name)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L49))   ### 
onChildInputDown : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputDown](phaser.group#onChildInputDown)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L161))   ### 
onChildInputOut : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputOut](phaser.group#onChildInputOut)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L198))   ### 
onChildInputOver : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputOver](phaser.group#onChildInputOver)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L186))   ### 
onChildInputUp : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal,  
a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer  
is still over the Sprite or not.

   Inherited From * [Phaser.Group#onChildInputUp](phaser.group#onChildInputUp)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L174))   ### 
onDestroy : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the group is destroyed.

   Inherited From * [Phaser.Group#onDestroy](phaser.group#onDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L249))   ### 
pendingDestroy : boolean

  A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method  
called on the next logic update.  
You can set it directly to flag the Group to be destroyed on its next update.

 This is extremely useful if you wish to destroy a Group from within one of its own callbacks  
or a callback of one of its children.

   Inherited From * [Phaser.Group#pendingDestroy](phaser.group#pendingDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L119))   ### 
physicsBodyType : integer

  If [enableBody](phaser.group#enableBody) is true this is the type of physics body that is created on new Sprites.

 The valid values are [Phaser.Physics.ARCADE](phaser.physics#.ARCADE), [Phaser.Physics.P2JS](phaser.physics#.P2JS), [Phaser.Physics.NINJA](phaser.physics#.NINJA), etc.

   Inherited From * [Phaser.Group#physicsBodyType](phaser.group#physicsBodyType)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L225))   ### 
physicsSortDirection : integer

  If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

 It should be set to one of the Phaser.Physics.Arcade sort direction constants: 

 Phaser.Physics.Arcade.SORT\_NONE  
Phaser.Physics.Arcade.LEFT\_RIGHT  
Phaser.Physics.Arcade.RIGHT\_LEFT  
Phaser.Physics.Arcade.TOP\_BOTTOM  
Phaser.Physics.Arcade.BOTTOM\_TOP

 If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

   Inherited From * [Phaser.Group#physicsSortDirection](phaser.group#physicsSortDirection)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 243](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L243))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Inherited From * [Phaser.Group#physicsType](phaser.group#physicsType)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L86))   ### 
[readonly] randomX : number

  Gets a random integer which is lesser than or equal to the current width of the game world.

   Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 319](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L319))   ### 
[readonly] randomY : number

  Gets a random integer which is lesser than or equal to the current height of the game world.

   Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L341))   ### 
right : number

  The right coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#right](phaser.group#right)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2789](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2789))   ### 
rotation : number

  The angle of rotation of the group container, in radians.

 This will adjust the group container itself by modifying its rotation.  
This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#rotation](phaser.group#rotation)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2987](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2987))   ### 
top : number

  The top coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#top](phaser.group#top)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2817](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2817))   ### 
[readonly] total : integer

  Total number of existing children in the group.

   Inherited From * [Phaser.Group#total](phaser.group#total)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2648](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2648))   ### 
<internal> type : integer

  Internal Phaser Type value.

   Inherited From * [Phaser.Group#type](phaser.group#type)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L80))   ### 
visible : boolean

  The visible state of the group. Non-visible Groups and all of their children are not rendered.

   Inherited From * [Phaser.Group#visible](phaser.group#visible)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2996](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2996))   ### 
width : number

  Gets or sets the current width of the game world. The world can never be smaller than the game (canvas) dimensions.

   Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 243](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L243))   ### 
x : number

  The x coordinate of the group container.

 You can adjust the group container itself by modifying its coordinates.  
This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#x](phaser.group#x)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2969))   ### 
y : number

  The y coordinate of the group container.

 You can adjust the group container itself by modifying its coordinates.  
This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#y](phaser.group#y)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2978](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2978))   ### 
[readonly] z : integer

  The z-depth value of this object within its parent container/Group - the World is a Group as well.  
This value must be unique for each child in a Group.

   Inherited From * [Phaser.Group#z](phaser.group#z)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L57))    Public Methods
--------------

  ### 
add(child, silent, index) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object as the top child in this group.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If the child was already in this Group, it is simply returned, and nothing else happens to it.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

 Use [addAt](phaser.group#addAt) to control where a child is added. Use [create](phaser.group#create) to create and add a new child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Inherited From * [Phaser.Group#add](phaser.group#add)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L341))   ### 
addAll(property, amount, checkAlive, checkVisible)

  Adds the amount to the given property on all children in this group.

 `Group.addAll('x', 10)` will add 10 to the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to increment, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#addAll](phaser.group#addAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1386))   ### 
addAt(child, index, silent) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object to this group.

 The child is added to the group at the location specified by the index value, this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `index` | integer |  <optional> |  0  | The index within the group to insert the child to. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Inherited From * [Phaser.Group#addAt](phaser.group#addAt)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 418](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L418))   ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
addMultiple(children, silent) → {Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group)}

  Adds an array of existing Display Objects to this Group.

 The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

 As well as an array you can also pass another Group as the first argument. In this case all of the children from that  
Group will be removed from it and added into this Group.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `children` | Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) |  |  | An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) -   The array of children or Group of children that were added to this Group.

    Inherited From * [Phaser.Group#addMultiple](phaser.group#addMultiple)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 489](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L489))   ### 
addToHash(child) → {boolean}

  Adds a child of this Group into the hash array.  
This call will return false if the child is not a child of this Group, or is already in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash. |

 ##### Returns

   boolean -   True if the child was successfully added to the hash, otherwise false.

    Inherited From * [Phaser.Group#addToHash](phaser.group#addToHash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 439](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L439))   ### 
align(width, height, cellWidth, cellHeight, position, offset) → {boolean}

  This method iterates through all children in the Group (regardless if they are visible or exist)  
and then changes their position so they are arranged in a Grid formation. Children must have  
the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have  
this.

 The grid dimensions are determined by the first four arguments. The `width` and `height` arguments  
relate to the width and height of the grid respectively.

 For example if the Group had 100 children in it:

 `Group.align(10, 10, 32, 32)`

 This will align all of the children into a grid formation of 10x10, using 32 pixels per  
grid cell. If you want a wider grid, you could do:

 `Group.align(25, 4, 32, 32)`

 This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

 You can choose to set *either* the `width` or `height` value to -1. Doing so tells the method  
to keep on aligning children until there are no children left. For example if this Group had  
48 children in it, the following:

 `Group.align(-1, 8, 32, 32)`

 ... will align the children so that there are 8 children vertically (the second argument),  
and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

 You can also do:

 `Group.align(10, -1, 32, 32)`

 In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit  
all of the children in.

 The `position` property allows you to control where in each grid cell the child is positioned.  
This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`,  
`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`,  
`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

 The final argument; `offset` lets you start the alignment from a specific child index.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | integer |  |  | The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value. |
| `height` | integer |  |  | The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value. |
| `cellWidth` | integer |  |  | The width of each grid cell, in pixels. |
| `cellHeight` | integer |  |  | The height of each grid cell, in pixels. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offset` | integer |  <optional> |  0  | Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value. |

 ##### Returns

   boolean -   True if the Group children were aligned, otherwise false.

    Inherited From * [Phaser.Group#align](phaser.group#align)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L682))   ### 
alignIn(container, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation and scale of its children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Inherited From * [Phaser.Group#alignIn](phaser.group#alignIn)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2873](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2873))   ### 
alignTo(parent, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation and scale of the children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Inherited From * [Phaser.Group#alignTo](phaser.group#alignTo)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2915](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2915))   ### 
<internal> ascendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Inherited From * [Phaser.Group#ascendingSortHandler](phaser.group#ascendingSortHandler)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1919](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1919))   ### 
<internal> boot()

  Initialises the game world.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L60))   ### 
bringToTop(child) → {any}

  Brings the given child to the top of this group so it renders above all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to bring to the top of this group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#bringToTop](phaser.group#bringToTop)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 907](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L907))   ### 
callAll(method, context, args)

  Calls a function, specified by name, on all on children.

 The function is called for all children regardless if they are dead or alive (see callAllExists for different options).  
After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `method` | string |  |  | Name of the function on the child to call. Deep property lookup is supported. |
| `context` | string |  <optional> |  null  | A string containing the context under which the method will be executed. Set to null to default to the child. |
| `args` | any |  <repeatable> |  | Additional parameters that will be passed to the method. |

  Inherited From * [Phaser.Group#callAll](phaser.group#callAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1538](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1538))   ### 
callAllExists(callback, existsValue, parameter)

  Calls a function, specified by name, on all children in the group who exist (or do not exist).

 After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `callback` | string |  | Name of the function on the children to call. |
| `existsValue` | boolean |  | Only children with exists=existsValue will be called. |
| `parameter` | any |  <repeatable> | Additional parameters that will be passed to the callback. |

  Inherited From * [Phaser.Group#callAllExists](phaser.group#callAllExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1454](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1454))   ### 
<internal> callbackFromArray(child, callback, length)

  Returns a reference to a function that exists on a child of the group based on the given callback array.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | object | The object to inspect. |
| `callback` | array | The array of function names. |
| `length` | integer | The size of the array (pre-calculated in callAll). |

  Inherited From * [Phaser.Group#callbackFromArray](phaser.group#callbackFromArray)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1488](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1488))   ### 
checkAll(key, value, checkAlive, checkVisible, force)

  Quickly check that the same property across all children of this group is equal to the given value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be checked. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be checked. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be checked. This includes any Groups that are children. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

  Inherited From * [Phaser.Group#checkAll](phaser.group#checkAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1353](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1353))   ### 
checkProperty(child, key, value, force) → {boolean}

  Checks a property for the given value on the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to check the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be checked. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

 ##### Returns

   boolean -   True if the property was was equal to value, false if not.

    Inherited From * [Phaser.Group#checkProperty](phaser.group#checkProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1217))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
countDead() → {integer}

  Get the number of dead children in this group.

  ##### Returns

   integer -   The number of children flagged as dead.

    Inherited From * [Phaser.Group#countDead](phaser.group#countDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2338))   ### 
countLiving() → {integer}

  Get the number of living children in this group.

  ##### Returns

   integer -   The number of children flagged as alive.

    Inherited From * [Phaser.Group#countLiving](phaser.group#countLiving)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2326](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2326))   ### 
create(x, y, key, frame, exists, index) → {[DisplayObject](global#DisplayObject)}

  Creates a new Phaser.Sprite object and adds it to the top of this group.

 Use [classType](phaser.group#classType) to change the type of object created.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point. |
| `y` | number |  |  | The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `exists` | boolean |  <optional> |  true  | The default exists state of the Sprite. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was created: will be a [Phaser.Sprite](phaser.sprite) unless #classType has been changed.

    Inherited From * [Phaser.Group#create](phaser.group#create)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 544](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L544))   ### 
createMultiple(quantity, key, frame, exists) → {array}

  Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

 This method is useful if you need to quickly generate a pool of sprites, such as bullets.

 Use [classType](phaser.group#classType) to change the type of object created.

 You can provide an array as the `key` and / or `frame` arguments. When you do this  
it will create `quantity` Sprites for every key (and frame) in the arrays.

 For example:

 `createMultiple(25, ['ball', 'carrot'])`

 In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be  
created in total, 25 of each. You can also have the `frame` as an array:

 `createMultiple(5, 'bricks', [0, 1, 2, 3])`

 In the above there is one key (bricks), which is a sprite sheet. The frames array tells  
this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because  
the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with  
frame 1, and so on.

 If you set both the key and frame arguments to be arrays then understand it will create  
a total quantity of sprites equal to the size of both arrays times each other. I.e.:

 `createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

 The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.  
It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.  
In total it will have created 120 sprites.

 By default the Sprites will have their `exists` property set to `false`, and they will be  
positioned at 0x0, relative to the `Group.x / y` values.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | integer |  |  | The number of Sprites to create. |
| `key` | string | array |  |  | The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used. |
| `frame` | integer | string | array |  <optional> |  0  | If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used. |
| `exists` | boolean |  <optional> |  false  | The default exists state of the Sprite. |

 ##### Returns

   array -   An array containing all of the Sprites that were created.

    Inherited From * [Phaser.Group#createMultiple](phaser.group#createMultiple)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 581](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L581))   ### 
customSort(sortHandler, context)

  Sort the children in the group according to custom sort function.

 The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).  
It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sortHandler` | function |  | The custom sort function. |
| `context` | object |  <optional> | The context in which the sortHandler is called. |

  Inherited From * [Phaser.Group#customSort](phaser.group#customSort)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1895](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1895))   ### 
<internal> descendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Inherited From * [Phaser.Group#descendingSortHandler](phaser.group#descendingSortHandler)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1951](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1951))   ### 
destroy(destroyChildren, soft)

  Destroys this group.

 Removes all children, then removes this group from its parent and nulls references.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | If true `destroy` will be invoked on each removed child. |
| `soft` | boolean |  <optional> |  false  | A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does. |

  Inherited From * [Phaser.Group#destroy](phaser.group#destroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2611))   ### 
divideAll(property, amount, checkAlive, checkVisible)

  Divides the given property by the amount on all children in this group.

 `Group.divideAll('x', 2)` will half the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to divide, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#divideAll](phaser.group#divideAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1437))   ### 
filter(predicate, checkExists) → {[Phaser.ArraySet](phaser.arrayset)}

  Find children matching a certain predicate.

 For example:

 
```
var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');
```

Note: Currently this will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `predicate` | function |  |  | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third |
| `checkExists` | boolean |  <optional> |  false  | If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate. |

 ##### Returns

   [Phaser.ArraySet](phaser.arrayset) -   Returns an array list containing all the children that the predicate returned true for

    Inherited From * [Phaser.Group#filter](phaser.group#filter)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1677](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1677))   ### 
forEach(callback, callbackContext, checkExists, args)

  Call a function on each child in this group.

 Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

 
```
Group.forEach(awardBonusGold, this, true, 100, 500)
```

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

 Note: This check will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `checkExists` | boolean |  <optional> |  false  | If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed. |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEach](phaser.group#forEach)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1717))   ### 
forEachAlive(callback, callbackContext, args)

  Call a function on each alive child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachAlive](phaser.group#forEachAlive)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1799](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1799))   ### 
forEachDead(callback, callbackContext, args)

  Call a function on each dead child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachDead](phaser.group#forEachDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1827](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1827))   ### 
forEachExists(callback, callbackContext, args)

  Call a function on each existing child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachExists](phaser.group#forEachExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1771](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1771))   ### 
getAll(property, value, startIndex, endIndex) → {any}

  Returns all children in this Group.

 You can optionally specify a matching criteria using the `property` and `value` arguments.

 For example: `getAll('exists', true)` would return only children that have their exists property set.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `property` | string |  <optional> |  | An optional property to test against the value argument. |
| `value` | any |  <optional> |  | If property is set then Child.property must strictly equal this value to be included in the results. |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up until. |

 ##### Returns

   any -   A random existing child of this Group.

    Inherited From * [Phaser.Group#getAll](phaser.group#getAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2392](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2392))   ### 
getAt(index) → {[DisplayObject](global#DisplayObject) | integer}

  Returns the child found at the given index within this group.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index to return the child from. |

 ##### Returns

   [DisplayObject](global#DisplayObject) | integer -   The child that was found at the given index, or -1 for an invalid index.

    Inherited From * [Phaser.Group#getAt](phaser.group#getAt)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 524](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L524))   ### 
getBottom() → {any}

  Returns the child at the bottom of this group.

 The bottom child the child being displayed (rendered) below every other child.

  ##### Returns

   any -   The child at the bottom of the Group.

    Inherited From * [Phaser.Group#getBottom](phaser.group#getBottom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2221))   ### 
getBounds(targetCoordinateSpace) → {Rectangle}

  Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `targetCoordinateSpace` | PIXIDisplayObject | PIXIMatrix |  <optional> | Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. |

 ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getBounds](pixi.displayobjectcontainer#getBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 280](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L280))   ### 
getByName(name) → {any}

  Searches the Group for the first instance of a child with the `name`  
property matching the given argument. Should more than one child have  
the same name only the first instance is returned.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name to search for. |

 ##### Returns

   any -   The first child with a matching name, or null if none were found.

    Inherited From * [Phaser.Group#getByName](phaser.group#getByName)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1042](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1042))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getClosestTo(object, callback, callbackContext) → {any}

  Get the closest child to given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child closest to given object, or `null` if no child was found.

    Inherited From * [Phaser.Group#getClosestTo](phaser.group#getClosestTo)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2238](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2238))   ### 
getFirstAlive(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is alive (`child.alive === true`).

 This is handy for choosing a squad leader, etc.

 You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The alive dead child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstAlive](phaser.group#getFirstAlive)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2105))   ### 
getFirstDead(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is dead (`child.alive === false`).

 This is handy for checking if everything has been wiped out and adding to the pool as needed.

 You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no dead children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first dead child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstDead](phaser.group#getFirstDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2135))   ### 
getFirstExists(exists, createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first display object that exists, or doesn't exist.

 You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `exists` | boolean |  <optional> |  true  | If true, find the first existing child; otherwise find the first non-existing child. |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstExists](phaser.group#getFirstExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2071](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2071))   ### 
getFurthestFrom(object, callback, callbackContext) → {any}

  Get the child furthest away from the given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child furthest from the given object, or `null` if no child was found.

    Inherited From * [Phaser.Group#getFurthestFrom](phaser.group#getFurthestFrom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2282](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2282))   ### 
getIndex(child) → {integer}

  Get the index position of the given child in this group, which should match the child's `z` property.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to get the index for. |

 ##### Returns

   integer -   The index of the child or -1 if it's not a member of this group.

    Inherited From * [Phaser.Group#getIndex](phaser.group#getIndex)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1029](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1029))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
getRandom(startIndex, length) → {any}

  Returns a random child from the group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | Offset from the front of the group (lowest child). |
| `length` | integer |  <optional> |  (to top)  | Restriction on the number of values you want to randomly select from. |

 ##### Returns

   any -   A random child of this Group.

    Inherited From * [Phaser.Group#getRandom](phaser.group#getRandom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2350](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2350))   ### 
getRandomExists(startIndex, endIndex) → {any}

  Returns a random child from the Group that has `exists` set to `true`.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up to. |

 ##### Returns

   any -   A random child of this Group that exists.

    Inherited From * [Phaser.Group#getRandomExists](phaser.group#getRandomExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2372](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2372))   ### 
getTop() → {any}

  Return the child at the top of this group.

 The top child is the child displayed (rendered) above every other child.

  ##### Returns

   any -   The child at the top of the Group.

    Inherited From * [Phaser.Group#getTop](phaser.group#getTop)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2204))   ### 
hasProperty(child, key) → {boolean}

  Checks if the child has the given property.

 Will scan up to 4 levels deep only.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to check for the existence of the property on. |
| `key` | Array.<string> | An array of strings that make up the property. |

 ##### Returns

   boolean -   True if the child has the property, otherwise false.

    Inherited From * [Phaser.Group#hasProperty](phaser.group#hasProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1104))   ### 
iterate(key, value, returnType, callback, callbackContext, args) → {any}

  Iterates over the children of the group performing one of several actions for matched children.

 A child is considered a match when it has a property, named `key`, whose value is equal to `value`  
according to a strict equality comparison.

 The result depends on the `returnType`:

 * [RETURN\_TOTAL](phaser.group#.RETURN_TOTAL):  
 The callback, if any, is applied to all matching children. The number of matched children is returned.
* [RETURN\_NONE](phaser.group#.RETURN_NONE):  
 The callback, if any, is applied to all matching children. No value is returned.
* [RETURN\_CHILD](phaser.group#.RETURN_CHILD):  
 The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.  
 If there is no matching child then null is returned.

 If `args` is specified it must be an array. The matched child will be assigned to the first  
element and the entire array will be applied to the callback function.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The child property to check, i.e. 'exists', 'alive', 'health' |
| `value` | any |  |  | A child matches if `child[key] === value` is true. |
| `returnType` | integer |  |  | How to iterate the children and what to return. |
| `callback` | function |  <optional> |  null  | Optional function that will be called on each matching child. The matched child is supplied as the first argument. |
| `callbackContext` | object |  <optional> |  | The context in which the function should be called (usually 'this'). |
| `args` | Array.<any> |  <optional> |  (none)  | The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child. |

 ##### Returns

   any -   Returns either an integer (for RETURN\_TOTAL), the first matched child (for RETURN\_CHILD), or null.

    Inherited From * [Phaser.Group#iterate](phaser.group#iterate)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1976](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1976))   ### 
moveAll(group, silent) → {[Phaser.Group](phaser.group)}

  Moves all children from this Group to the Group given.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `group` | [Phaser.Group](phaser.group) |  |  | The new Group to which the children will be moved to. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event for the new Group. |

 ##### Returns

   [Phaser.Group](phaser.group) -   The Group to which all the children were moved.

    Inherited From * [Phaser.Group#moveAll](phaser.group#moveAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2479](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2479))   ### 
moveDown(child) → {any}

  Moves the given child down one place in this group unless it's already at the bottom.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move down in the group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#moveDown](phaser.group#moveDown)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L969))   ### 
moveUp(child) → {any}

  Moves the given child up one place in this group unless it's already at the top.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move up in the group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#moveUp](phaser.group#moveUp)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 945](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L945))   ### 
multiplyAll(property, amount, checkAlive, checkVisible)

  Multiplies the given property by the amount on all children in this group.

 `Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to multiply, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#multiplyAll](phaser.group#multiplyAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1420](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1420))   ### 
next() → {any}

  Advances the group cursor to the next (higher) object in the group.

 If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

  ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#next](phaser.group#next)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 833](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L833))   ### 
<internal> postUpdate()

  The core postUpdate - as called by World.

   Inherited From * [Phaser.Group#postUpdate](phaser.group#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1656](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1656))   ### 
<internal> preUpdate()

  The core preUpdate - as called by World.

   Inherited From * [Phaser.Group#preUpdate](phaser.group#preUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1611))   ### 
previous() → {any}

  Moves the group cursor to the previous (lower) child in the group.

 If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

  ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#previous](phaser.group#previous)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 862](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L862))   ### 
remove(child, destroy, silent) → {boolean}

  Removes the given child from this group.

 This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

 If the group cursor was referring to the removed child it is updated to refer to the next child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to remove. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on the removed child. |
| `silent` | boolean |  <optional> |  false  | If true the the child will not dispatch the `onRemovedFromGroup` event. |

 ##### Returns

   boolean -   true if the child was removed from this group, otherwise false.

    Inherited From * [Phaser.Group#remove](phaser.group#remove)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2431](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2431))   ### 
removeAll(destroy, silent, destroyTexture)

  Removes all children from this Group, but does not remove the group from its parent.

 The children can be optionally destroyed as they are removed.

 You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |
| `destroyTexture` | boolean |  <optional> |  false  | If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Group#removeAll](phaser.group#removeAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2508](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2508))   ### 
removeBetween(startIndex, endIndex, destroy, silent)

  Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  |  | The index to start removing children from. |
| `endIndex` | integer |  <optional> |  | The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |

  Inherited From * [Phaser.Group#removeBetween](phaser.group#removeBetween)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2556](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2556))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
removeFromHash(child) → {boolean}

  Removes a child of this Group from the hash array.  
This call will return false if the child is not in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to remove from this Groups hash. Must be a member of this Group and in the hash. |

 ##### Returns

   boolean -   True if the child was successfully removed from the hash, otherwise false.

    Inherited From * [Phaser.Group#removeFromHash](phaser.group#removeFromHash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 464](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L464))   ### 
replace(oldChild, newChild) → {any}

  Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `oldChild` | any | The child in this group that will be replaced. |
| `newChild` | any | The child to be inserted into this group. |

 ##### Returns

   any -   Returns the oldChild that was replaced within this group.

    Inherited From * [Phaser.Group#replace](phaser.group#replace)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1065](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1065))   ### 
resetChild(child, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

 If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

 The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  | The child to reset and/or load the texture on. |
| `x` | number |  <optional> | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was reset: usually a [Phaser.Sprite](phaser.sprite).

    Inherited From * [Phaser.Group#resetChild](phaser.group#resetChild)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2165))   ### 
resetCursor(index) → {any}

  Sets the group cursor to the first child in the group.

 If the optional index parameter is given it sets the cursor to the object at that index instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `index` | integer |  <optional> |  0  | Set the cursor to point to a specific index. |

 ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#resetCursor](phaser.group#resetCursor)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 806](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L806))   ### 
resize(width, height)

  Updates the size of this world. Note that this doesn't modify the world x/y coordinates, just the width and height.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | New width of the game world in pixels. |
| `height` | number | New height of the game world in pixels. |

  Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L125))   ### 
reverse()

  Reverses all children in this group.

 This operation applies only to immediate children and does not propagate to subgroups.

   Inherited From * [Phaser.Group#reverse](phaser.group#reverse)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1015](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1015))   ### 
sendToBack(child) → {any}

  Sends the given child to the bottom of this group so it renders below all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to send to the bottom of this group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#sendToBack](phaser.group#sendToBack)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 926](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L926))   ### 
set(child, key, value, checkAlive, checkVisible, operation, force) → {boolean}

  Quickly set a property on a single child of this group to a new value.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [Phaser.Sprite](phaser.sprite) |  |  | The child to set the property on. |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then the child will only be updated if alive=true. |
| `checkVisible` | boolean |  <optional> |  false  | If set then the child will only be updated if visible=true. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Inherited From * [Phaser.Group#set](phaser.group#set)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1246))   ### 
setAll(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group to a new value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.  
If you need that ability please see `Group.setAllChildren`.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Inherited From * [Phaser.Group#setAll](phaser.group#setAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1277](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1277))   ### 
setAllChildren(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group, and any child Groups, to a new value.

 If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.  
Unlike with `setAll` the property is NOT set on child Groups itself.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Inherited From * [Phaser.Group#setAllChildren](phaser.group#setAllChildren)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1312](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1312))   ### 
setBounds(x, y, width, height)

  Updates the size of this world and sets World.x/y to the given values  
The Camera bounds and Physics bounds (if set) are also updated to match the new World bounds.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Top left most corner of the world. |
| `y` | number | Top left most corner of the world. |
| `width` | number | New width of the game world in pixels. |
| `height` | number | New height of the game world in pixels. |

  Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L94))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setProperty(child, key, value, operation, force) → {boolean}

  Sets a property to the given value on the child. The operation parameter controls how the value is set.

 The operations are:

 * 0: set the existing value to the given value; if force is `true` a new property will be created if needed
* 1: will add the given value to the value already present.
* 2: will subtract the given value from the value already present.
* 3: will multiply the value already present by the given value.
* 4: will divide the value already present by the given value.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to set the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be set. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Inherited From * [Phaser.Group#setProperty](phaser.group#setProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1139))   ### 
shutdown()

  Destroyer of worlds.

   Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 158](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L158))   ### 
sort(key, order)

  Sort the children in the group according to a particular key and ordering.

 Call this function to sort the group according to a particular key value and order.

 For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

 Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including  
alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  <optional> |  'z'  | The name of the property to sort on. Defaults to the objects z-depth value. |
| `order` | integer |  <optional> |  Phaser.Group.SORT\_ASCENDING  | Order ascending ([SORT\_ASCENDING](phaser.group#.SORT_ASCENDING)) or descending ([SORT\_DESCENDING](phaser.group#.SORT_DESCENDING)). |

  Inherited From * [Phaser.Group#sort](phaser.group#sort)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1855](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1855))   ### 
<internal> stateChange()

  Called whenever the State changes or resets.

 It resets the world.x and world.y coordinates back to zero,  
then resets the Camera.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 76](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L76))   ### 
subAll(property, amount, checkAlive, checkVisible)

  Subtracts the amount from the given property on all children in this group.

 `Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to decrement, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#subAll](phaser.group#subAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1403](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1403))   ### 
swap(child1, child2)

  Swaps the position of two children in this group.

 Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child1` | any | The first child to swap. |
| `child2` | any | The second child to swap. |

  Inherited From * [Phaser.Group#swap](phaser.group#swap)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 891](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L891))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
<internal> update()

  The core update - as called by World.

   Inherited From * [Phaser.Group#update](phaser.group#update)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1639](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1639))   ### 
<internal> updateZ()

  Internal method that re-applies all of the children's Z values.

 This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

   Inherited From * [Phaser.Group#updateZ](phaser.group#updateZ)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 663](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L663))   ### 
wrap(sprite, padding, useBounds, horizontal, vertical)

  This will take the given game object and check if its x/y coordinates fall outside of the world bounds.  
If they do it will reposition the object to the opposite side of the world, creating a wrap-around effect.  
If sprite has a P2 body then the body (sprite.body) should be passed as first parameter to the function.

 Please understand there are limitations to this method. For example if you have scaled the World  
then objects won't always be re-positioned correctly, and you'll need to employ your own wrapping function.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Text](phaser.text) |  |  | The object you wish to wrap around the world bounds. |
| `padding` | number |  <optional> |  0  | Extra padding added equally to the sprite.x and y coordinates before checking if within the world bounds. Ignored if useBounds is true. |
| `useBounds` | boolean |  <optional> |  false  | If useBounds is false wrap checks the object.x/y coordinates. If true it does a more accurate bounds check, which is more expensive. |
| `horizontal` | boolean |  <optional> |  true  | If horizontal is false, wrap will not wrap the object.x coordinates horizontally. |
| `vertical` | boolean |  <optional> |  true  | If vertical is false, wrap will not wrap the object.y coordinates vertically. |

  Source code: [core/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/World.js#L170))   ### 
xy(index, x, y)

  Positions the child found at the given index within this group to the given x and y coordinates.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index of the child in the group to set the position of. |
| `x` | number | The new x position of the child. |
| `y` | number | The new y position of the child. |

  Inherited From * [Phaser.Group#xy](phaser.group#xy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 993](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L993))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.World.html>

Class: Phaser.InputHandler
==========================

 Constructor
-----------

 ### 
new InputHandler(sprite)

  The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | The Sprite object to which this Input Handler belongs. |

  Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L14))   Public Properties
-----------------

  ### 
allowHorizontalDrag : boolean

  Controls if the Sprite is allowed to be dragged horizontally.

   Default Value * true
 Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L69))   ### 
allowVerticalDrag : boolean

  Controls if the Sprite is allowed to be dragged vertically.

   Default Value * true
 Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L75))   ### 
boundsRect : [Phaser.Rectangle](phaser.rectangle)

  A region of the game world within which the sprite is restricted during drag.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L161))   ### 
boundsSprite : [Phaser.Sprite](phaser.sprite)

  A Sprite the bounds of which this sprite is restricted during drag.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L167))   ### 
bringToTop : boolean

  If true when this Sprite is clicked or dragged it will automatically be bought to the top of the Group it is within.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 81](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L81))   ### 
<internal> checked : boolean

  A disposable flag used by the Pointer class when performing priority checks.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L36))   ### 
downPoint : [Phaser.Point](phaser.point)

  A Point object containing the coordinates of the Pointer when it was first pressed down onto this Sprite.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 207](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L207))   ### 
dragDistanceThreshold : integer

  The distance, in pixels, the pointer has to move while being held down, before the Sprite thinks it is being dragged.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 197](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L197))   ### 
dragFromCenter : boolean

  Is the Sprite dragged from its center, or the point at which the Pointer was pressed down upon it?

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 182](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L182))   ### 
draggable : boolean

  Is this sprite allowed to be dragged by the mouse? true = yes, false = no

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L155))   ### 
dragOffset : [Phaser.Point](phaser.point)

  The offset from the Sprites position that dragging takes place from.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L177))   ### 
dragStartPoint : [Phaser.Point](phaser.point)

  The Point from which the most recent drag started from. Useful if you need to return an object to its starting position.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 192](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L192))   ### 
dragStopBlocksInputUp : boolean

  If enabled, when the Sprite stops being dragged, it will only dispatch the `onDragStop` event, and not the `onInputUp` event. If set to `false` it will dispatch both events.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 187](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L187))   ### 
dragTimeThreshold : integer

  The amount of time, in ms, the pointer has to be held down over the Sprite before it thinks it is being dragged.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 202](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L202))   ### 
enabled : boolean

  If enabled the Input Handler will process input requests and monitor pointer activity.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L30))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L24))   ### 
isDragged : boolean

  true if the Sprite is being currently dragged.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L63))   ### 
pixelPerfectAlpha : number

  The alpha tolerance threshold. If the alpha value of the pixel matches or is above this value, it's considered a hit.

   Default Value * 255
 Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L149))   ### 
pixelPerfectClick : boolean

  Set to true to use pixel perfect hit detection when checking if the pointer is over this Sprite when it's clicked or touched.  
The x/y coordinates of the pointer are tested against the image in combination with the InputHandler.pixelPerfectAlpha value.  
This feature only works for display objects with image based textures such as Sprites. It won't work on BitmapText or Rope.  
Warning: This is expensive so only enable if you really need it. Use a pixel perfect check when testing for clicks or touches on the Sprite.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 143](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L143))   ### 
pixelPerfectOver : boolean

  Set to true to use pixel perfect hit detection when checking if the pointer is over this Sprite.  
The x/y coordinates of the pointer are tested against the image in combination with the InputHandler.pixelPerfectAlpha value.  
This feature only works for display objects with image based textures such as Sprites. It won't work on BitmapText or Rope.  
Warning: This is expensive, especially on mobile (where it's not even needed!) so only enable if required. Also see the less-expensive InputHandler.pixelPerfectClick. Use a pixel perfect check when testing for pointer over.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 133](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L133))   ### 
priorityID : number

  The priorityID is used to determine which game objects should get priority when input events occur. For example if you have  
several Sprites that overlap, by default the one at the top of the display list is given priority for input events. You can  
stop this from happening by controlling the priorityID value. The higher the value, the more important they are considered to the Input events.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L45))   ### 
scaleLayer : boolean

  EXPERIMENTAL: Please do not use this property unless you know what it does. Likely to change in the future.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 172](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L172))   ### 
snapOffset : [Phaser.Point](phaser.point)

  A Point object that contains by how far the Sprite snap is offset.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L87))   ### 
snapOffsetX : number

  This defines the top-left X coordinate of the snap grid.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 117](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L117))   ### 
snapOffsetY : number

  This defines the top-left Y coordinate of the snap grid..

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 123](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L123))   ### 
snapOnDrag : boolean

  When the Sprite is dragged this controls if the center of the Sprite will snap to the pointer on drag or not.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L93))   ### 
snapOnRelease : boolean

  When the Sprite is dragged this controls if the Sprite will be snapped on release.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 99](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L99))   ### 
snapPoint : [Phaser.Point](phaser.point)

  If the sprite is set to snap while dragging this holds the point of the most recent 'snap' event.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 212](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L212))   ### 
snapX : number

  When a Sprite has snapping enabled this holds the width of the snap grid.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L105))   ### 
snapY : number

  When a Sprite has snapping enabled this holds the height of the snap grid.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 111](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L111))   ### 
sprite : [Phaser.Sprite](phaser.sprite)

  The Sprite object to which this Input Handler belongs.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L19))   ### 
useHandCursor : boolean

  On a desktop browser you can set the 'hand' cursor to appear when moving over the Sprite.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L51))    Public Methods
--------------

  ### 
checkBoundsRect()

  Bounds Rect check for the sprite drag

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1654](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1654))   ### 
checkBoundsSprite()

  Parent Sprite Bounds check for the sprite drag.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1704](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1704))   ### 
checkPixel(x, y, pointer) → {boolean}

  Runs a pixel perfect check against the given x/y coordinates of the Sprite this InputHandler is bound to.  
It compares the alpha value of the pixel and if >= InputHandler.pixelPerfectAlpha it returns true.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | The x coordinate to check. |
| `y` | number |  | The y coordinate to check. |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  <optional> | The pointer to get the x/y coordinate from if not passed as the first two parameters. |

 ##### Returns

   boolean -   true if there is the alpha of the pixel is >= InputHandler.pixelPerfectAlpha

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 799](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L799))   ### 
checkPointerDown(pointer, fastTest) → {boolean}

  Checks if the given pointer is both down and over the Sprite this InputHandler belongs to.  
Use the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  |  |  |
| `fastTest` | boolean |  <optional> |  false  | Force a simple hit area check even if `pixelPerfectOver` is true for this object? |

 ##### Returns

   boolean -   True if the pointer is down, otherwise false.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 710](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L710))   ### 
checkPointerOver(pointer, fastTest) → {boolean}

  Checks if the given pointer is over the Sprite this InputHandler belongs to.  
Use the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  |  |  |
| `fastTest` | boolean |  <optional> |  false  | Force a simple hit area check even if `pixelPerfectOver` is true for this object? |

 ##### Returns

   boolean -    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 755](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L755))   ### 
destroy()

  Clean up memory.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 430](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L430))   ### 
disableDrag()

  Stops this sprite from being able to be dragged.  
If it is currently the target of an active drag it will be stopped immediately; also disables any set callbacks.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1441](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1441))   ### 
disableSnap()

  Stops the sprite from snapping to a grid during drag or release.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1642](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1642))   ### 
downDuration(pointerId) → {number}

  If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |

 ##### Returns

   number -   The number of milliseconds the pointer has been pressed down on the Sprite, or -1 if not over.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1363](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1363))   ### 
enableDrag(lockCenter, bringToTop, pixelPerfect, alphaThreshold, boundsRect, boundsSprite)

  Allow this Sprite to be dragged by any valid pointer.

 When the drag begins the Sprite.events.onDragStart event will be dispatched.

 When the drag completes by way of the user letting go of the pointer that was dragging the sprite, the Sprite.events.onDragStop event is dispatched.

 You can control the thresholds over when a drag starts via the properties:

 `Pointer.dragDistanceThreshold` the distance, in pixels, that the pointer has to move  
before the drag will start.

 `Pointer.dragTimeThreshold` the time, in ms, that the pointer must be held down on  
the Sprite before the drag will start.

 You can set either (or both) of these properties after enabling a Sprite for drag.

 For the duration of the drag the Sprite.events.onDragUpdate event is dispatched. This event is only dispatched when the pointer actually  
changes position and moves. The event sends 5 parameters: `sprite`, `pointer`, `dragX`, `dragY` and `snapPoint`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `lockCenter` | boolean |  <optional> |  false  | If false the Sprite will drag from where you click it minus the dragOffset. If true it will center itself to the tip of the mouse pointer. |
| `bringToTop` | boolean |  <optional> |  false  | If true the Sprite will be bought to the top of the rendering list in its current Group. |
| `pixelPerfect` | boolean |  <optional> |  false  | If true it will use a pixel perfect test to see if you clicked the Sprite. False uses the bounding box. |
| `alphaThreshold` | boolean |  <optional> |  255  | If using pixel perfect collision this specifies the alpha level from 0 to 255 above which a collision is processed. |
| `boundsRect` | [Phaser.Rectangle](phaser.rectangle) |  <optional> |  null  | If you want to restrict the drag of this sprite to a specific Rectangle, pass the Phaser.Rectangle here, otherwise it's free to drag anywhere. |
| `boundsSprite` | [Phaser.Sprite](phaser.sprite) |  <optional> |  null  | If you want to restrict the drag of this sprite to within the bounding box of another sprite, pass it here. |

  Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1383](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1383))   ### 
enableSnap(snapX, snapY, onDrag, onRelease, snapOffsetX, snapOffsetY)

  Make this Sprite snap to the given grid either during drag or when it's released.  
For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `snapX` | number |  |  | The width of the grid cell to snap to. |
| `snapY` | number |  |  | The height of the grid cell to snap to. |
| `onDrag` | boolean |  <optional> |  true  | If true the sprite will snap to the grid while being dragged. |
| `onRelease` | boolean |  <optional> |  false  | If true the sprite will snap to the grid when released. |
| `snapOffsetX` | number |  <optional> |  0  | Used to offset the top-left starting point of the snap grid. |
| `snapOffsetY` | number |  <optional> |  0  | Used to offset the top-left starting point of the snap grid. |

  Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1614](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1614))   ### 
globalToLocalX(x)

  Warning: EXPERIMENTAL

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number |  |

  Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1524](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1524))   ### 
globalToLocalY(y)

  Warning: EXPERIMENTAL

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `y` | number |  |

  Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1542](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1542))   ### 
isPixelPerfect() → {boolean}

  Is this object using pixel perfect checking?

  ##### Returns

   boolean -   True if the this InputHandler has either `pixelPerfectClick` or `pixelPerfectOver` set to `true`.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 495](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L495))   ### 
justOut(pointerId, delay) → {boolean}

  Returns true if the pointer has left the Sprite within the specified delay time (defaults to 500ms, half a second)

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |
| `delay` | number |  |  | The time below which the pointer is considered as just out. |

 ##### Returns

   boolean -    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1292](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1292))   ### 
justOver(pointerId, delay) → {boolean}

  Returns true if the pointer has entered the Sprite within the specified delay time (defaults to 500ms, half a second)

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |
| `delay` | number |  |  | The time below which the pointer is considered as just over. |

 ##### Returns

   boolean -    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1275](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1275))   ### 
justPressed(pointerId, delay) → {boolean}

  Returns true if the pointer has touched or clicked on the Sprite within the specified delay time (defaults to 500ms, half a second)

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |
| `delay` | number |  |  | The time below which the pointer is considered as just over. |

 ##### Returns

   boolean -    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1309](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1309))   ### 
justReleased(pointerId, delay) → {boolean}

  Returns true if the pointer was touching this Sprite, but has been released within the specified delay time (defaults to 500ms, half a second)

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |
| `delay` | number |  |  | The time below which the pointer is considered as just out. |

 ##### Returns

   boolean -    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1326](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1326))   ### 
overDuration(pointerId) → {number}

  If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |

 ##### Returns

   number -   The number of milliseconds the pointer has been over the Sprite, or -1 if not over.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1343](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1343))   ### 
pointerDown(pointerId) → {boolean}

  If the Pointer is down this returns true.  
This *only* checks if the Pointer is down, not if it's down over any specific Sprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |

 ##### Returns

   boolean -   * True if the given pointer is down, otherwise false.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 539](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L539))   ### 
pointerDragged(pointerId) → {boolean}

  Is this sprite being dragged by the mouse or not?

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |

 ##### Returns

   boolean -   True if the pointer is dragging an object, otherwise false.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 695](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L695))   ### 
pointerOut(pointerId) → {boolean}

  Is the Pointer outside of this Sprite?

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  (check all)  | The ID number of a Pointer to check. If you don't provide a number it will check all Pointers. |

 ##### Returns

   boolean -   True if the given pointer (if a index was given, or any pointer if not) is out of this object.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 634](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L634))   ### 
pointerOver(pointerId) → {boolean}

  Is the Pointer over this Sprite?

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  (check all)  | The ID number of a Pointer to check. If you don't provide a number it will check all Pointers. |

 ##### Returns

   boolean -   * True if the given pointer (if a index was given, or any pointer if not) is over this object.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 601](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L601))   ### 
pointerTimeDown(pointerId) → {number}

  A timestamp representing when the Pointer first touched the touchscreen.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  (check all)  |  |

 ##### Returns

   number -    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L571))   ### 
pointerTimeOut(pointerId) → {number}

  A timestamp representing when the Pointer left the touchscreen.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |

 ##### Returns

   number -    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 680](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L680))   ### 
pointerTimeOver(pointerId) → {number}

  A timestamp representing when the Pointer first touched the touchscreen.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |

 ##### Returns

   number -    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 665](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L665))   ### 
pointerTimeUp(pointerId) → {number}

  A timestamp representing when the Pointer left the touchscreen.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |

 ##### Returns

   number -    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 586](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L586))   ### 
pointerUp(pointerId) → {boolean}

  If the Pointer is up this returns true.  
This *only* checks if the Pointer is up, not if it's up over any specific Sprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |

 ##### Returns

   boolean -   * True if the given pointer is up, otherwise false.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 555](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L555))   ### 
pointerX(pointerId) → {number}

  The x coordinate of the Input pointer, relative to the top-left of the parent Sprite.  
This value is only set when the pointer is over this Sprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |

 ##### Returns

   number -   The x coordinate of the Input pointer.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 507](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L507))   ### 
pointerY(pointerId) → {number}

  The y coordinate of the Input pointer, relative to the top-left of the parent Sprite  
This value is only set when the pointer is over this Sprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointerId` | integer |  <optional> |  0  |  |

 ##### Returns

   number -   The y coordinate of the Input pointer.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 523](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L523))   ### 
reset()

  Resets the Input Handler and disables it.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 382](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L382))   ### 
setDragLock(allowHorizontal, allowVertical)

  Restricts this sprite to drag movement only on the given axis. Note: If both are set to false the sprite will never move!

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `allowHorizontal` | boolean |  <optional> |  true  | To enable the sprite to be dragged horizontally set to true, otherwise false. |
| `allowVertical` | boolean |  <optional> |  true  | To enable the sprite to be dragged vertically set to true, otherwise false. |

  Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1597](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1597))   ### 
start(priority, useHandCursor) → {[Phaser.Sprite](phaser.sprite)}

  Starts the Input Handler running. This is called automatically when you enable input on a Sprite, or can be called directly if you need to set a specific priority.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `priority` | number |  <optional> |  0  | Higher priority sprites take click priority over low-priority sprites when they are stacked on-top of each other. |
| `useHandCursor` | boolean |  <optional> |  false  | If true the Sprite will show the hand cursor on mouse-over (doesn't apply to mobile browsers) |

 ##### Returns

   [Phaser.Sprite](phaser.sprite) -   The Sprite object to which the Input Handler is bound.

    Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L284))   ### 
startDrag(pointer)

  Called by Pointer when drag starts on this Sprite. Should not usually be called directly.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  |

  Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1464](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1464))   ### 
stop()

  Stops the Input Handler from running.

   Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 410](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L410))   ### 
stopDrag(pointer)

  Called by Pointer when drag is stopped on this Sprite. Should not usually be called directly.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  |

  Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 1560](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L1560))   ### 
<internal> update(pointer) → {boolean}

  Internal Update method. This is called automatically and handles the Pointer  
and drag update loops.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  |

 ##### Returns

   boolean -   True if the pointer is still active, otherwise false.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 868](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L868))   ### 
<internal> validForInput(highestID, highestRenderID, includePixelPerfect) → {boolean}

  Checks if the object this InputHandler is bound to is valid for consideration in the Pointer move event.  
This is called by Phaser.Pointer and shouldn't typically be called directly.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `highestID` | number |  |  | The highest ID currently processed by the Pointer. |
| `highestRenderID` | number |  |  | The highest Render Order ID currently processed by the Pointer. |
| `includePixelPerfect` | boolean |  <optional> |  true  | If this object has `pixelPerfectClick` or `pixelPerfectOver` set should it be considered as valid? |

 ##### Returns

   boolean -   True if the object this InputHandler is bound to should be considered as valid for input detection.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/InputHandler.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js) ([Line 456](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/InputHandler.js#L456))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.InputHandler.html>

Class: Phaser.GameObjectFactory
===============================

 Constructor
-----------

 ### 
new GameObjectFactory(game)

  The GameObjectFactory is a quick way to create many common game objects  
using [``game.add``](phaser.game#add).

 Created objects are *automatically added* to the appropriate Manager, World, or manually specified parent Group.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L17))   Public Properties
-----------------

  ### 
<internal> game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L23))   ### 
<internal> world : [Phaser.World](phaser.world)

  A reference to the game world.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L29))    Public Methods
--------------

  ### 
audio(key, volume, loop, connect) → {[Phaser.Sound](phaser.sound)}

  Creates a new Sound object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The Game.cache key of the sound that this object will use. |
| `volume` | number |  <optional> |  1  | The volume at which the sound will be played. |
| `loop` | boolean |  <optional> |  false  | Whether or not the sound will loop. |
| `connect` | boolean |  <optional> |  true  | Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   The newly created sound object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 230](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L230))   ### 
audioSprite(key) → {[Phaser.AudioSprite](phaser.audiosprite)}

  Creates a new AudioSprite object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The Game.cache key of the sound that this object will use. |

 ##### Returns

   [Phaser.AudioSprite](phaser.audiosprite) -   The newly created AudioSprite object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 262](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L262))   ### 
bitmapData(width, height, key, addToCache) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Create a BitmapData object.

 A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | number |  <optional> |  256  | The width of the BitmapData in pixels. |
| `height` | number |  <optional> |  256  | The height of the BitmapData in pixels. |
| `key` | string |  <optional> |  ''  | Asset key for the BitmapData when stored in the Cache (see addToCache parameter). |
| `addToCache` | boolean |  <optional> |  false  | Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key) |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   The newly created BitmapData object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 526](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L526))   ### 
bitmapText(x, y, font, text, size, group) → {[Phaser.BitmapText](phaser.bitmaptext)}

  Create a new BitmapText object.

 BitmapText objects work by taking a texture file and an XML file that describes the font structure.  
It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to  
match the font structure.

 BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability  
to use Web Fonts. However you trade this flexibility for pure rendering speed. You can also create visually compelling BitmapTexts by  
processing the font texture in an image editor first, applying fills and any other effects required.

 To create multi-line text insert \r, \n or \r\n escape codes into the text string.

 To create a BitmapText data files you can use:

 BMFont (Windows, free): http://www.angelcode.com/products/bmfont/  
Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner  
Littera (Web-based, free): http://kvazars.com/littera/

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | X coordinate to display the BitmapText object at. |
| `y` | number |  |  | Y coordinate to display the BitmapText object at. |
| `font` | string |  |  | The key of the BitmapText as stored in Phaser.Cache. |
| `text` | string |  <optional> |  ''  | The text that will be rendered. This can also be set later via BitmapText.text. |
| `size` | number |  <optional> |  32  | The size the font will be rendered at in pixels. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.BitmapText](phaser.bitmaptext) -   The newly created bitmapText object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 425](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L425))   ### 
button(x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame, group) → {[Phaser.Button](phaser.button)}

  Creates a new Button object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate of the Button. The coordinate is relative to any parent container this button may be in. |
| `y` | number |  <optional> |  0  | The y coordinate of the Button. The coordinate is relative to any parent container this button may be in. |
| `key` | string |  <optional> |  | The image key as defined in the Game.Cache to use as the texture for this button. |
| `callback` | function |  <optional> |  | The function to call when this button is pressed |
| `callbackContext` | object |  <optional> |  | The context in which the callback will be called (usually 'this') |
| `overFrame` | string | number |  <optional> |  | 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. |
| `outFrame` | string | number |  <optional> |  | 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. |
| `downFrame` | string | number |  <optional> |  | 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. |
| `upFrame` | string | number |  <optional> |  | 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. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.Button](phaser.button) -   The newly created Button object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 337](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L337))   ### 
creature(x, y, key, group) → {[Phaser.Creature](phaser.creature)}

  Create a new Creature Animation object.

 Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

 It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

 Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

 Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them  
loaded before your Phaser game boots.

 See the Phaser custom build process for more details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate of the creature. The coordinate is relative to any parent container this creature may be in. |
| `y` | number |  <optional> |  0  | The y coordinate of the creature. The coordinate is relative to any parent container this creature may be in. |
| `key` | string | [PIXI.Texture](pixi.texture) |  <optional> |  | 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. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.Creature](phaser.creature) -   The newly created Sprite object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L125))   ### 
emitter(x, y, maxParticles) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  Create a new Emitter.

 A particle emitter can be used for one-time explosions or for  
continuous effects like rain and fire. All it really does is launch Particle objects out  
at set intervals, and fixes their positions and velocities accordingly.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate within the Emitter that the particles are emitted from. |
| `y` | number |  <optional> |  0  | The y coordinate within the Emitter that the particles are emitted from. |
| `maxParticles` | number |  <optional> |  50  | The total number of particles in this emitter. |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   The newly created emitter object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 378](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L378))   ### 
existing(object) → {any}

  Adds an existing display object to the game world.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | any | An instance of Phaser.Sprite, Phaser.Button or any other display object. |

 ##### Returns

   any -   The child that was added to the World.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L35))   ### 
filter(filter) → {[Phaser.Filter](phaser.filter)}

  A WebGL shader/filter that can be applied to Sprites.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `filter` | string | The name of the filter you wish to create, for example HueRotate or SineWave. |
|  | any | Whatever parameters are needed to be passed to the filter init function. |

 ##### Returns

   [Phaser.Filter](phaser.filter) -   The newly created Phaser.Filter object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 554](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L554))   ### 
graphics(x, y, group) → {[Phaser.Graphics](phaser.graphics)}

  Creates a new Graphics object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate of the Graphic. The coordinate is relative to any parent container this object may be in. |
| `y` | number |  <optional> |  0  | The y coordinate of the Graphic. The coordinate is relative to any parent container this object may be in. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.Graphics](phaser.graphics) -   The newly created graphics object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 361](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L361))   ### 
group(parent, name, addToStage, enableBody, physicsBodyType) → {[Phaser.Group](phaser.group)}

  A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | any |  <optional> |  | 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. |
| `name` | string |  <optional> |  'group'  | A name for this Group. Not used internally but useful for debugging. |
| `addToStage` | boolean |  <optional> |  false  | If set to true this Group will be added directly to the Game.Stage instead of Game.World. |
| `enableBody` | boolean |  <optional> |  false  | If true all Sprites created with `Group.create` or `Group.createMulitple` will have a physics body created on them. Change the body type with physicsBodyType. |
| `physicsBodyType` | number |  <optional> |  0  | 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. |

 ##### Returns

   [Phaser.Group](phaser.group) -   The newly created Group.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 173](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L173))   ### 
image(x, y, key, frame, group) → {[Phaser.Image](phaser.image)}

  Create a new `Image` object.

 An Image is a light-weight object you can use to display anything that doesn't need physics or animation.

 It can still rotate, scale, crop and receive input events.  
This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate of the Image. The coordinate is relative to any parent container this Image may be in. |
| `y` | number |  <optional> |  0  | The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](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. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.Image](phaser.image) -   The newly created Image object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L78))   ### 
physicsGroup(physicsBodyType, parent, name, addToStage) → {[Phaser.Group](phaser.group)}

  A Group is a container for display objects that allows for fast pooling, recycling and collision checks.

 A Physics Group is the same as an ordinary Group except that is has enableBody turned on by default, so any Sprites it creates  
are automatically given a physics body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `physicsBodyType` | number |  <optional> |  Phaser.Physics.ARCADE  | 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. |
| `parent` | any |  <optional> |  | 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. |
| `name` | string |  <optional> |  'group'  | A name for this Group. Not used internally but useful for debugging. |
| `addToStage` | boolean |  <optional> |  false  | If set to true this Group will be added directly to the Game.Stage instead of Game.World. |

 ##### Returns

   [Phaser.Group](phaser.group) -   The newly created Group.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 190](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L190))   ### 
plugin(plugin, parameter) → {[Phaser.Plugin](phaser.plugin)}

  Add a new Plugin into the PluginManager.

 The Plugin must have 2 properties: `game` and `parent`. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `plugin` | object | [Phaser.Plugin](phaser.plugin) |  | The Plugin to add into the PluginManager. This can be a function or an existing object. |
| `parameter` | \* |  <repeatable> | Additional parameters that will be passed to the Plugin.init method. |

 ##### Returns

   [Phaser.Plugin](phaser.plugin) -   The Plugin that was added to the manager.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 574](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L574))   ### 
renderTexture(width, height, key, addToCache) → {[Phaser.RenderTexture](phaser.rendertexture)}

  A dynamic initially blank canvas to which images can be drawn.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | number |  <optional> |  100  | the width of the RenderTexture. |
| `height` | number |  <optional> |  100  | the height of the RenderTexture. |
| `key` | string |  <optional> |  ''  | Asset key for the RenderTexture when stored in the Cache (see addToCache parameter). |
| `addToCache` | boolean |  <optional> |  false  | Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key) |

 ##### Returns

   [Phaser.RenderTexture](phaser.rendertexture) -   The newly created RenderTexture object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 484](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L484))   ### 
retroFont(font, characterWidth, characterHeight, chars, charsPerRow, xSpacing, ySpacing, xOffset, yOffset) → {[Phaser.RetroFont](phaser.retrofont)}

  Create a new RetroFont object.

 A RetroFont can be used as a texture for an Image or Sprite and optionally add it to the Cache.  
A RetroFont uses a bitmap which contains fixed with characters for the font set. You use character spacing to define the set.  
If you need variable width character support then use a BitmapText object instead. The main difference between a RetroFont and a BitmapText  
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.  
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,  
i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `font` | string |  |  | The key of the image in the Game.Cache that the RetroFont will use. |
| `characterWidth` | number |  |  | The width of each character in the font set. |
| `characterHeight` | number |  |  | The height of each character in the font set. |
| `chars` | string |  |  | The characters used in the font set, in display order. You can use the TEXT\_SET consts for common font set arrangements. |
| `charsPerRow` | number |  |  | The number of characters per row in the font set. |
| `xSpacing` | number |  <optional> |  0  | If the characters in the font set have horizontal spacing between them set the required amount here. |
| `ySpacing` | number |  <optional> |  0  | If the characters in the font set have vertical spacing between them set the required amount here. |
| `xOffset` | number |  <optional> |  0  | If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. |
| `yOffset` | number |  <optional> |  0  | If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. |

 ##### Returns

   [Phaser.RetroFont](phaser.retrofont) -   The newly created RetroFont texture which can be applied to an Image or Sprite.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 397](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L397))   ### 
rope(x, y, key, frame, points, group) → {[Phaser.Rope](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.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](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](phaser.group) |  <optional> |  | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.Rope](phaser.rope) -   The newly created Rope object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 296](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L296))   ### 
sound(key, volume, loop, connect) → {[Phaser.Sound](phaser.sound)}

  Creates a new Sound object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The Game.cache key of the sound that this object will use. |
| `volume` | number |  <optional> |  1  | The volume at which the sound will be played. |
| `loop` | boolean |  <optional> |  false  | Whether or not the sound will loop. |
| `connect` | boolean |  <optional> |  true  | Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   The newly created sound object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L246))   ### 
sprite(x, y, key, frame, group) → {[Phaser.Sprite](phaser.sprite)}

  Create a new Sprite with specific position and sprite sheet key.

 At its most basic a Sprite consists of a set of coordinates and a texture that is used when rendered.  
They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input),  
events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate of the sprite. The coordinate is relative to any parent container this sprite may be in. |
| `y` | number |  <optional> |  0  | The y coordinate of the sprite. The coordinate is relative to any parent container this sprite may be in. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](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. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.Sprite](phaser.sprite) -   The newly created Sprite object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L102))   ### 
spriteBatch(parent, name, addToStage) → {[Phaser.SpriteBatch](phaser.spritebatch)}

  A SpriteBatch is a really fast version of a Phaser Group built solely for speed.  
Use when you need a lot of sprites or particles all sharing the same texture.  
The speed gains are specifically for WebGL. In Canvas mode you won't see any real difference.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Group](phaser.group) | null |  |  | The parent Group that will hold this Sprite Batch. Set to `undefined` or `null` to add directly to game.world. |
| `name` | string |  <optional> |  'group'  | A name for this Sprite Batch. Not used internally but useful for debugging. |
| `addToStage` | boolean |  <optional> |  false  | If set to true this Sprite Batch will be added directly to the Game.Stage instead of the parent. |

 ##### Returns

   [Phaser.SpriteBatch](phaser.spritebatch) -   The newly created Sprite Batch.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 209](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L209))   ### 
text(x, y, text, style, group) → {[Phaser.Text](phaser.text)}

  Creates a new Text object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate of the Text. The coordinate is relative to any parent container this text may be in. |
| `y` | number |  <optional> |  0  | The y coordinate of the Text. The coordinate is relative to any parent container this text may be in. |
| `text` | string |  <optional> |  ''  | The text string that will be displayed. |
| `style` | object |  <optional> |  | The style object containing style attributes like font, font size , etc. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.Text](phaser.text) -   The newly created text object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 318](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L318))   ### 
tilemap(key, tileWidth, tileHeight, width, height) → {[Phaser.Tilemap](phaser.tilemap)}

  Creates a new Phaser.Tilemap object.

 The map can either be populated with data from a Tiled JSON file or from a CSV file.  
To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key.  
When using CSV data you must provide the key and the tileWidth and tileHeight parameters.  
If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here.  
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.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  <optional> |  | 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 `null`. |
| `tileWidth` | number |  <optional> |  32  | The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. |
| `tileHeight` | number |  <optional> |  32  | The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. |
| `width` | number |  <optional> |  10  | The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. |
| `height` | number |  <optional> |  10  | The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. |

 ##### Returns

   [Phaser.Tilemap](phaser.tilemap) -   The newly created tilemap object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 461](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L461))   ### 
tileSprite(x, y, width, height, key, frame, group) → {[Phaser.TileSprite](phaser.tilesprite)}

  Creates a new TileSprite object.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | The x coordinate of the TileSprite. The coordinate is relative to any parent container this TileSprite may be in. |
| `y` | number |  | The y coordinate of the TileSprite. The coordinate is relative to any parent container this TileSprite may be in. |
| `width` | number |  | The width of the TileSprite. |
| `height` | number |  | The height of the TileSprite. |
| `key` | string | [Phaser.BitmapData](phaser.bitmapdata) | [PIXI.Texture](pixi.texture) |  | 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. |
| `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. |
| `group` | [Phaser.Group](phaser.group) |  <optional> | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.TileSprite](phaser.tilesprite) -   The newly created TileSprite object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 275](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L275))   ### 
tween(object) → {[Phaser.Tween](phaser.tween)}

  Create a tween on a specific object.

 The object can be any JavaScript object or Phaser object such as Sprite.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | object | Object the tween will be run on. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   The newly created Phaser.Tween object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 158](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L158))   ### 
video(key, url) → {[Phaser.Video](phaser.video)}

  Create a Video object.

 This will return a Phaser.Video object which you can pass to a Sprite to be used as a texture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | null |  <optional> |  null  | The key of the video file in the Phaser.Cache that this Video object will play. Set to `null` or leave undefined if you wish to use a webcam as the source. See `startMediaStream` to start webcam capture. |
| `url` | string | null |  <optional> |  null  | 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) |

 ##### Returns

   [Phaser.Video](phaser.video) -   The newly created Video object.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 510](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L510))   ### 
weapon(quantity, key, frame, group) → {[Phaser.Weapon](phaser.weapon)}

  Weapons provide the ability to easily create a bullet pool and manager.

 Weapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties.  
The Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.

 The Bullets are created inside of `Weapon.bullets`, which is a Phaser.Group instance. Anything you  
can usually do with a Group, such as move it around the display list, iterate it, etc can be done  
to the bullets Group too.

 Bullets can have textures and even animations. You can control the speed at which they are fired,  
the firing rate, the firing angle, and even set things like gravity for them.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | integer |  <optional> |  1  | The quantity of bullets to seed the Weapon with. If -1 it will set the pool to automatically expand. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | 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. |
| `frame` | string | number |  <optional> |  | 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. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  | Optional Group to add the Weapon to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.Weapon](phaser.weapon) -   A Weapon instance.

    Source code: [gameobjects/GameObjectFactory.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/GameObjectFactory.js#L48))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.GameObjectFactory.html>

Class: Phaser.Image
===================

 Constructor
-----------

 ### 
new Image(game, x, y, key, frame)

  An Image is a light-weight object you can use to display anything that doesn't need physics or animation.  
It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `x` | number |  <optional> |  0  | The x coordinate of the Image. The coordinate is relative to any parent container this Image may be in. |
| `y` | number |  <optional> |  0  | The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [PIXI.Texture](pixi.texture) |  <optional> |  | The texture used by the Image during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Image 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. |

  Source code: [gameobjects/Image.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Image.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Image.js#L36))   Extends
-------

 * [PIXI.Sprite](pixi.sprite)
* [Phaser.Component.Core](phaser.component.core)
* [Phaser.Component.Angle](phaser.component.angle)
* [Phaser.Component.Animation](phaser.component.animation)
* [Phaser.Component.AutoCull](phaser.component.autocull)
* [Phaser.Component.Bounds](phaser.component.bounds)
* [Phaser.Component.BringToTop](phaser.component.bringtotop)
* [Phaser.Component.Crop](phaser.component.crop)
* [Phaser.Component.Destroy](phaser.component.destroy)
* [Phaser.Component.FixedToCamera](phaser.component.fixedtocamera)
* [Phaser.Component.InputEnabled](phaser.component.inputenabled)
* [Phaser.Component.LifeSpan](phaser.component.lifespan)
* [Phaser.Component.LoadTexture](phaser.component.loadtexture)
* [Phaser.Component.Overlap](phaser.component.overlap)
* [Phaser.Component.Reset](phaser.component.reset)
* [Phaser.Component.ScaleMinMax](phaser.component.scaleminmax)
* [Phaser.Component.Smoothed](phaser.component.smoothed)

 Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
anchor :Point

  The anchor sets the origin point of the texture.  
The default is 0,0 this means the texture's origin is the top left  
Setting than anchor to 0.5,0.5 means the textures origin is centered  
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

   Inherited From * [PIXI.Sprite#anchor](pixi.sprite#anchor)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L17))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

 Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

   Inherited From * [PIXI.Sprite#blendMode](pixi.sprite#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L82))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
cropRect : [Phaser.Rectangle](phaser.rectangle)

  The Rectangle used to crop the texture this Game Object uses.  
Set this property via `crop`.  
If you modify this property directly you must call `updateCrop` in order to have the change take effect.

   Inherited From * [Phaser.Component.Crop#cropRect](phaser.component.crop#cropRect)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L24))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Sprite is processed by the core Phaser game loops and Group loops.

   Inherited From * [PIXI.Sprite#exists](pixi.sprite#exists)
 Default Value * true
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L103))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
frame : integer

  Gets or sets the current frame index of the texture being used to render this Game Object.

 To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,  
for example: `player.frame = 4`.

 If the frame index given doesn't exist it will revert to the first frame found in the texture.

 If you are using a texture atlas then you should use the `frameName` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frame](phaser.component.loadtexture#frame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L254))   ### 
frameName : string

  Gets or sets the current frame name of the texture being used to render this Game Object.

 To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use,  
for example: `player.frameName = "idle"`.

 If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

 If you are using a sprite sheet then you should use the `frame` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frameName](phaser.component.loadtexture#frameName)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L279))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
height : number

  The height of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#height](pixi.sprite#height)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L144))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Inherited From * [Phaser.Component.InputEnabled#input](phaser.component.inputenabled#input)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Inherited From * [Phaser.Component.InputEnabled#inputEnabled](phaser.component.inputenabled#inputEnabled)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
scaleMax : [Phaser.Point](phaser.point)

  The maximum scale this Game Object will scale up to. 

 It allows you to prevent a parent from scaling this Game Object higher than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMax](phaser.component.scaleminmax#scaleMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L46))   ### 
scaleMin : [Phaser.Point](phaser.point)

  The minimum scale this Game Object will scale down to.

 It allows you to prevent a parent from scaling this Game Object lower than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMin](phaser.component.scaleminmax#scaleMin)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L36))   ### 
shader : [PIXI.AbstractFilter](pixi.abstractfilter)

  The shader that will be used to render this Sprite.  
Set to null to remove a current shader.

   Inherited From * [PIXI.Sprite#shader](pixi.sprite#shader)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L93))   ### 
smoothed : boolean

  Enable or disable texture smoothing for this Game Object.

 It only takes effect if the Game Object is using an image based texture.

 Smoothing is enabled by default.

   Inherited From * [Phaser.Component.Smoothed#smoothed](phaser.component.smoothed#smoothed)
 Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L25))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture that the sprite is using

   Inherited From * [PIXI.Sprite#texture](pixi.sprite#texture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L28))   ### 
tint : number

  The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

   Inherited From * [PIXI.Sprite#tint](pixi.sprite#tint)
 Default Value * 0xFFFFFF
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L54))   ### 
tintedTexture :Canvas

  A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

   Inherited From * [PIXI.Sprite#tintedTexture](pixi.sprite#tintedTexture)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L73))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
transformCallback : Function

  The callback that will apply any scale limiting to the worldTransform.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallback](phaser.component.scaleminmax#transformCallback)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L20))   ### 
transformCallbackContext : Object

  The context under which `transformCallback` is called.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallbackContext](phaser.component.scaleminmax#transformCallbackContext)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L26))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [gameobjects/Image.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Image.js) ([Line 47](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Image.js#L47))   ### 
width : number

  The width of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#width](pixi.sprite#width)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L125))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#bringToTop](phaser.component.bringtotop#bringToTop)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
crop(rect, copy)

  Crop allows you to crop the texture being used to display this Game Object.  
Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

 Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,  
or by modifying `cropRect` property directly and then calling `updateCrop`.

 The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object  
so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

 A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`,  
in which case the values are duplicated to a local object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) |  |  | The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. |
| `copy` | boolean |  <optional> |  false  | If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect. |

  Inherited From * [Phaser.Component.Crop#crop](phaser.component.crop#crop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L49))   ### 
destroy(destroyChildren, destroyTexture)

  Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present  
and nulls its reference to `game`, freeing it up for garbage collection.

 If this Game Object has the Events component it will also dispatch the `onDestroy` event.

 You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called as well? |
| `destroyTexture` | boolean |  <optional> |  false  | Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Component.Destroy#destroy](phaser.component.destroy#destroy)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L37))   ### 
getBounds(matrix) → {Rectangle}

  Returns the bounds of the Sprite as a rectangle.  
The bounds calculation takes the worldTransform into account.

 It is important to note that the transform is not updated when you call this method.  
So if this Sprite is the child of a Display Object which has had its transform  
updated since the last render pass, those changes will not yet have been applied  
to this Sprites worldTransform. If you need to ensure that all parent transforms  
are factored into this getBounds operation then you should call `updateTransform`  
on the root most object in this Sprites display list first.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Matrix | the transformation matrix of the sprite |

 ##### Returns

   Rectangle -   the framing rectangle

    Inherited From * [PIXI.Sprite#getBounds](pixi.sprite#getBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L199))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.Sprite#getLocalBounds](pixi.sprite#getLocalBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L315))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
loadTexture(key, frame, stopAnimation)

  Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

 If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

 You should only use `loadTexture` if you want to replace the base texture entirely.

 Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

 You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite.  
Doing this then sets the key to be the `frame` argument (the frame is set to zero). 

 This allows you to create sprites using `load.image` during development, and then change them  
to use a Texture Atlas later in development by simply searching your code for 'PENDING\_ATLAS'  
and swapping it to be the key of the atlas data.

 Note: You cannot use a RenderTexture as a texture for a TileSprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `stopAnimation` | boolean |  <optional> |  true  | If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. |

  Inherited From * [Phaser.Component.LoadTexture#loadTexture](phaser.component.loadtexture#loadTexture)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L51))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveDown](phaser.component.bringtotop#moveDown)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveUp](phaser.component.bringtotop#moveUp)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
overlap(displayObject) → {boolean}

  Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,  
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

 This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

 Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.  
It should be fine for low-volume testing where physics isn't required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Button](phaser.button) | PIXI.DisplayObject | The display object to check against. |

 ##### Returns

   boolean -   True if the bounds of this Game Object intersects at any point with the bounds of the given display object.

    Inherited From * [Phaser.Component.Overlap#overlap](phaser.component.overlap#overlap)
 Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L29))   ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays an Animation.

 The animation should have previously been created via `animations.add`.

 If the animation is already playing calling this again won't do anything.  
If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'. |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation.

    Inherited From * [Phaser.Component.Animation#play](phaser.component.animation#play)
 Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L31))   ### 
<internal> postUpdate()

  Internal method called by the World postUpdate cycle.

   Inherited From * [Phaser.Component.Core#postUpdate](phaser.component.core#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L338))   ### 
preUpdate()

  Automatically called by World.preUpdate.

   Source code: [gameobjects/Image.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Image.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Image.js#L79))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
reset(x, y, health) → {PIXI.DisplayObject}

  Resets the Game Object.

 This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`,  
`visible` and `renderable` to true.

 If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

 If this Game Object has a Physics Body it will reset the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Game Object at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Game Object at. |
| `health` | number |  <optional> |  1  | The health to give the Game Object if it has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.Reset#reset](phaser.component.reset#reset)
 Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L30))   ### 
resetFrame()

  Resets the texture frame dimensions that the Game Object uses for rendering.

   Inherited From * [Phaser.Component.LoadTexture#resetFrame](phaser.component.loadtexture#resetFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L232))   ### 
resizeFrame(parent, width, height)

  Resizes the Frame dimensions that the Game Object uses for rendering.

 You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData  
it can be useful to adjust the dimensions directly in this way.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | object | The parent texture object that caused the resize, i.e. a Phaser.Video object. |
| `width` | integer | The new width of the texture. |
| `height` | integer | The new height of the texture. |

  Inherited From * [Phaser.Component.LoadTexture#resizeFrame](phaser.component.loadtexture#resizeFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L220))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#sendToBack](phaser.component.bringtotop#sendToBack)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setFrame(frame)

  Sets the texture frame the Game Object uses for rendering.

 This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The Frame to be used by the texture. |

  Inherited From * [Phaser.Component.LoadTexture#setFrame](phaser.component.loadtexture#setFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L155))   ### 
setScaleMinMax(minX, minY, maxX, maxY)

  Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

 For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored  
and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

 By setting these values you can carefully control how Game Objects deal with responsive scaling.

 If only one parameter is given then that value will be used for both scaleMin and scaleMax:  
`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

 If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:  
`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

 If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly,  
or pass `null` for the `maxX` and `maxY` parameters.

 Call `setScaleMinMax(null)` to clear all previously set values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `minX` | number | null | The minimum horizontal scale value this Game Object can scale down to. |
| `minY` | number | null | The minimum vertical scale value this Game Object can scale down to. |
| `maxX` | number | null | The maximum horizontal scale value this Game Object can scale up to. |
| `maxY` | number | null | The maximum vertical scale value this Game Object can scale up to. |

  Inherited From * [Phaser.Component.ScaleMinMax#setScaleMinMax](phaser.component.scaleminmax#setScaleMinMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L110))   ### 
setTexture(texture, destroy)

  Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous  
texture this Sprite was using.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) |  |  | The PIXI texture that is displayed by the sprite |
| `destroy` | Boolean |  <optional> |  false  | Call Texture.destroy on the current texture before replacing it with the new one? |

  Inherited From * [PIXI.Sprite#setTexture](pixi.sprite#setTexture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L163))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Override this method in your own custom objects to handle any update requirements.  
It is called immediately after `preUpdate` and before `postUpdate`.  
Remember if this Game Object has any children you should call update on those too.

   Inherited From * [Phaser.Component.Core#update](phaser.component.core#update)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L328))   ### 
updateCrop()

  If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,  
or the rectangle it references, then you need to update the crop frame by calling this method.

   Inherited From * [Phaser.Component.Crop#updateCrop](phaser.component.crop#updateCrop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L86))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Image.html>

Class: Phaser.RenderTexture
===========================

 Constructor
-----------

 ### 
new RenderTexture(game, width, height, key, scaleMode, resolution)

  A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and  
render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | Current game instance. |
| `width` | number |  <optional> |  100  | The width of the render texture. |
| `height` | number |  <optional> |  100  | The height of the render texture. |
| `key` | string |  <optional> |  ''  | The key of the RenderTexture in the Cache, if stored there. |
| `scaleMode` | number |  <optional> |  Phaser.scaleModes.DEFAULT  | One of the Phaser.scaleModes consts. |
| `resolution` | number |  <optional> |  1  | The resolution of the texture being generated. |

  Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L21))   Extends
-------

 * [PIXI.RenderTexture](pixi.rendertexture)

 Public Properties
-----------------

  ### 
baseTexture : [PIXI.BaseTexture](pixi.basetexture)

  The base texture object that this texture uses

   Inherited From * [PIXI.RenderTexture#baseTexture](pixi.rendertexture#baseTexture)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L78))   ### 
crop :Rectangle

  This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,  
irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)

   Inherited From * [PIXI.RenderTexture#crop](pixi.rendertexture#crop)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L69))   ### 
frame :Rectangle

  The framing rectangle of the render texture

   Inherited From * [PIXI.RenderTexture#frame](pixi.rendertexture#frame)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L61))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L30))   ### 
height : number

  The height of the render texture

   Inherited From * [PIXI.RenderTexture#height](pixi.rendertexture#height)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L45))   ### 
isTiling : boolean

  Is this a tiling texture? As used by the likes of a TilingSprite.

   Inherited From * [PIXI.Texture#isTiling](pixi.texture#isTiling)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L79))   ### 
key : string

  The key of the RenderTexture in the Cache, if stored there.

   Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L35))   ### 
noFrame : boolean

  Does this Texture have any frame data assigned to it?

   Inherited From * [PIXI.Texture#noFrame](pixi.texture#noFrame)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L28))   ### 
renderer : [PIXI.CanvasRenderer](pixi.canvasrenderer) | [PIXI.WebGLRenderer](pixi.webglrenderer)

  The renderer this RenderTexture uses. A RenderTexture can only belong to one renderer at the moment if its webGL.

  ##### Type

 * [PIXI.CanvasRenderer](pixi.canvasrenderer) | [PIXI.WebGLRenderer](pixi.webglrenderer)

  Inherited From * [PIXI.RenderTexture#renderer](pixi.rendertexture#renderer)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 99](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L99))   ### 
requiresReTint : boolean

  This will let a renderer know that a tinted parent has updated its texture.

   Inherited From * [PIXI.Texture#requiresReTint](pixi.texture#requiresReTint)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L95))   ### 
requiresUpdate : boolean

  This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)

   Inherited From * [PIXI.Texture#requiresUpdate](pixi.texture#requiresUpdate)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L87))   ### 
resolution : number

  The Resolution of the texture.

   Inherited From * [PIXI.RenderTexture#resolution](pixi.rendertexture#resolution)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L53))   ### 
trim :Rectangle

  The texture trim data.

   Inherited From * [PIXI.Texture#trim](pixi.texture#trim)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L63))   ### 
type : number

  Base Phaser object type.

   Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L40))   ### 
valid : boolean

  Inherited From * [PIXI.RenderTexture#valid](pixi.rendertexture#valid)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L125))   ### 
width : number

  The with of the render texture

   Inherited From * [PIXI.RenderTexture#width](pixi.rendertexture#width)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L37))    Public Methods
--------------

  ### 
clear()

  Clears the RenderTexture.

   Inherited From * [PIXI.RenderTexture#clear](pixi.rendertexture#clear)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 175](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L175))   ### 
destroy(destroyBase)

  Destroys this texture

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `destroyBase` | Boolean | Whether to destroy the base texture as well |

  Inherited From * [PIXI.Texture#destroy](pixi.texture#destroy)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L165))   ### 
getBase64() → {String}

  Will return a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that.

  ##### Returns

   String -   A base64 encoded string of the texture.

    Inherited From * [PIXI.RenderTexture#getBase64](pixi.rendertexture#getBase64)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 309](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L309))   ### 
getCanvas() → {HTMLCanvasElement}

  Creates a Canvas element, renders this RenderTexture to it and then returns it.

  ##### Returns

   HTMLCanvasElement -   A Canvas element with the texture rendered on.

    Inherited From * [PIXI.RenderTexture#getCanvas](pixi.rendertexture#getCanvas)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 320](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L320))   ### 
getImage() → {Image}

  Will return a HTML Image of the texture

  ##### Returns

   Image -    Inherited From * [PIXI.RenderTexture#getImage](pixi.rendertexture#getImage)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 296](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L296))   ### 
render(displayObject, matrix, clear)

  This function will draw the display object to the RenderTexture.

 In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object.  
This is now a Matrix allowing you much more control over how the Display Object is rendered.  
If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.

 If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either  
pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Group](phaser.group) |  |  | The display object to render to this texture. |
| `matrix` | [Phaser.Matrix](phaser.matrix) |  <optional> |  | Optional matrix to apply to the display object before rendering. If null or undefined it will use the worldTransform matrix of the given display object. |
| `clear` | boolean |  <optional> |  false  | If true the texture will be cleared before the display object is drawn. |

  Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 117](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L117))   ### 
renderRawXY(displayObject, x, y, clear)

  This function will draw the display object to the RenderTexture at the given coordinates.

 When the display object is drawn it doesn't take into account scale, rotation or translation.

 If you need those then use RenderTexture.renderXY instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Group](phaser.group) |  |  | The display object to render to this texture. |
| `x` | number |  |  | The x position to render the object at. |
| `y` | number |  |  | The y position to render the object at. |
| `clear` | boolean |  <optional> |  false  | If true the texture will be cleared before the display object is drawn. |

  Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L89))   ### 
renderXY(displayObject, x, y, clear)

  This function will draw the display object to the RenderTexture at the given coordinates.

 When the display object is drawn it takes into account scale and rotation.

 If you don't want those then use RenderTexture.renderRawXY instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Group](phaser.group) |  |  | The display object to render to this texture. |
| `x` | number |  |  | The x position to render the object at. |
| `y` | number |  |  | The y position to render the object at. |
| `clear` | boolean |  <optional> |  false  | If true the texture will be cleared before the display object is drawn. |

  Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L57))   ### 
resize(width, height, updateBase)

  Resizes the RenderTexture.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | Number | The width to resize to. |
| `height` | Number | The height to resize to. |
| `updateBase` | Boolean | Should the baseTexture.width and height values be resized as well? |

  Inherited From * [PIXI.RenderTexture#resize](pixi.rendertexture#resize)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L139))   ### 
setFrame(frame)

  Specifies the region of the baseTexture that this texture will use.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | Rectangle | The frame of the texture to set it to |

  Inherited From * [PIXI.Texture#setFrame](pixi.texture#setFrame)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 178](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L178))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.RenderTexture.html>

Class: Phaser.AnimationManager
==============================

 Constructor
-----------

 ### 
new AnimationManager(sprite)

  The Animation Manager is used to add, play and update Phaser Animations.  
Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | A reference to the Game Object that owns this AnimationManager. |

  Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L15))   Public Properties
-----------------

  ### 
currentAnim : [Phaser.Animation](phaser.animation)

  The currently displayed animation, if any.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L40))   ### 
currentFrame : [Phaser.Frame](phaser.frame)

  The currently displayed Frame of animation, if any.  
This property is only set once an Animation starts playing. Until that point it remains set as `null`.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L34))   ### 
frame : number

  Gets or sets the current frame index and updates the Texture Cache for display.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 500](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L500))   ### 
[readonly] frameData : [Phaser.FrameData](phaser.framedata)

  The current animations FrameData.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 436](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L436))   ### 
frameName : string

  Gets or sets the current frame name and updates the Texture Cache for display.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 531](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L531))   ### 
[readonly] frameTotal : number

  The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L449))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L25))   ### 
isLoaded : boolean

  Set to true once animation data has been loaded.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L52))   ### 
name : string

  Gets the current animation name, if set.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 483](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L483))   ### 
paused : boolean

  Gets and sets the paused state of the current animation.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 463](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L463))   ### 
sprite : [Phaser.Sprite](phaser.sprite)

  A reference to the parent Sprite that owns this AnimationManager.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L20))   ### 
updateIfVisible : boolean

  Should the animation data continue to update even if the Sprite.visible is set to false.

   Default Value * true
 Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L46))    Public Methods
--------------

  ### 
add(name, frames, frameRate, loop, useNumericIndex) → {[Phaser.Animation](phaser.animation)}

  Adds a new animation under the given key. Optionally set the frames, frame rate and loop.  
Animations added in this way are played back with the play function.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk". |
| `frames` | Array |  <optional> |  null  | An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used. |
| `frameRate` | number |  <optional> |  60  | The speed at which the animation should play. The speed is given in frames per second. |
| `loop` | boolean |  <optional> |  false  | Whether or not the animation is looped or just plays once. |
| `useNumericIndex` | boolean |  <optional> |  true  | Are the given frames using numeric indexes (default) or strings? |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   The Animation object that was created.

    Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L170))   ### 
destroy()

  Destroys all references this AnimationManager contains.  
Iterates through the list of animations stored in this manager and calls destroy on each of them.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 404](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L404))   ### 
getAnimation(name) → {[Phaser.Animation](phaser.animation)}

  Returns an animation that was previously added by name.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name of the animation to be returned, e.g. "fire". |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   The Animation instance, if found, otherwise null.

    Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 371](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L371))   ### 
next(quantity)

  Advances by the given number of frames in the current animation, taking the loop value into consideration.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | number |  <optional> |  1  | The number of frames to advance. |

  Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 339](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L339))   ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Play an animation based on the given key. The animation should previously have been added via `animations.add`

 If the requested animation is already playing this request will be ignored.  
If you need to reset an already running animation do so directly on the Animation object itself.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation instance.

    Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 253](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L253))   ### 
previous(quantity)

  Moves backwards the given number of frames in the current animation, taking the loop value into consideration.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | number |  <optional> |  1  | The number of frames to move back. |

  Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 355](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L355))   ### 
refreshFrame()

  Refreshes the current frame data back to the parent Sprite and also resets the texture data.

   Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 392](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L392))   ### 
stop(name, resetFrame)

  Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped.  
The currentAnim property of the AnimationManager is automatically set to the animation given.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  <optional> |  null  | The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped. |
| `resetFrame` | boolean |  <optional> |  false  | When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false) |

  Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 296](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L296))   ### 
<internal> update() → {boolean}

  The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events.

  ##### Returns

   boolean -   True if a new animation frame has been set, otherwise false.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L315))   ### 
validateFrames(frames, useNumericIndex) → {boolean}

  Check whether the frames in the given array are valid and exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `frames` | Array |  |  | An array of frames to be validated. |
| `useNumericIndex` | boolean |  <optional> |  true  | Validate the frames based on their numeric index (true) or string index (false) |

 ##### Returns

   boolean -   True if all given Frames are valid, otherwise false.

    Source code: [animation/AnimationManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js) ([Line 219](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationManager.js#L219))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.AnimationManager.html>

Class: Phaser.TileSprite
========================

 Constructor
-----------

 ### 
new TileSprite(game, x, y, width, height, key, frame)

  A TileSprite is a Sprite that has a repeating texture. The texture can be scrolled and scaled independently of the TileSprite itself.  
Textures will automatically wrap and are designed so that you can create game backdrops using seamless textures as a source.

 TileSprites have no input handler or physics bodies by default, both need enabling in the same way as for normal Sprites.

 You shouldn't ever create a TileSprite any larger than your actual screen size. If you want to create a large repeating background  
that scrolls across the whole map of your game, then you create a TileSprite that fits the screen size and then use the `tilePosition`  
property to scroll the texture as the player moves. If you create a TileSprite that is thousands of pixels in size then it will  
consume huge amounts of memory and cause performance issues. Remember: use `tilePosition` to scroll your texture and `tileScale` to  
adjust the scale of the texture - don't resize the sprite itself or make it larger than it needs.

 An important note about texture dimensions:

 When running under Canvas a TileSprite can use any texture size without issue. When running under WebGL the texture should ideally be  
a power of two in size (i.e. 4, 8, 16, 32, 64, 128, 256, 512, etc pixels width by height). If the texture isn't a power of two  
it will be rendered to a blank canvas that is the correct size, which means you may have 'blank' areas appearing to the right and  
bottom of your frame. To avoid this ensure your textures are perfect powers of two.

 TileSprites support animations in the same way that Sprites do. You add and play animations using the AnimationManager. However  
if your game is running under WebGL please note that each frame of the animation must be a power of two in size, or it will receive  
additional padding to enforce it to be so.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `x` | number | The x coordinate (in world space) to position the TileSprite at. |
| `y` | number | The y coordinate (in world space) to position the TileSprite at. |
| `width` | number | The width of the TileSprite. |
| `height` | number | The height of the TileSprite. |
| `key` | string | [Phaser.BitmapData](phaser.bitmapdata) | [PIXI.Texture](pixi.texture) | 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. |
| `frame` | string | number | If this TileSprite 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. |

  Source code: [gameobjects/TileSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js#L59))   Extends
-------

 * [PIXI.TilingSprite](pixi.tilingsprite)
* [Phaser.Component.Core](phaser.component.core)
* [Phaser.Component.Angle](phaser.component.angle)
* [Phaser.Component.Animation](phaser.component.animation)
* [Phaser.Component.AutoCull](phaser.component.autocull)
* [Phaser.Component.Bounds](phaser.component.bounds)
* [Phaser.Component.BringToTop](phaser.component.bringtotop)
* [Phaser.Component.Destroy](phaser.component.destroy)
* [Phaser.Component.FixedToCamera](phaser.component.fixedtocamera)
* [Phaser.Component.Health](phaser.component.health)
* [Phaser.Component.InCamera](phaser.component.incamera)
* [Phaser.Component.InputEnabled](phaser.component.inputenabled)
* [Phaser.Component.InWorld](phaser.component.inworld)
* [Phaser.Component.LifeSpan](phaser.component.lifespan)
* [Phaser.Component.LoadTexture](phaser.component.loadtexture)
* [Phaser.Component.Overlap](phaser.component.overlap)
* [Phaser.Component.PhysicsBody](phaser.component.physicsbody)
* [Phaser.Component.Reset](phaser.component.reset)
* [Phaser.Component.Smoothed](phaser.component.smoothed)

 Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
anchor :Point

  The anchor sets the origin point of the texture.  
The default is 0,0 this means the texture's origin is the top left  
Setting than anchor to 0.5,0.5 means the textures origin is centered  
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

   Inherited From * [PIXI.Sprite#anchor](pixi.sprite#anchor)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L17))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
blendMode : number

  The blend mode to be applied to the sprite

   Inherited From * [PIXI.TilingSprite#blendMode](pixi.tilingsprite#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L86))   ### 
body : [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated  
properties and methods via it.

 By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

 To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object  
and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

 You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

 Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5,  
so the physics body is centered on the Game Object.

 If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  ##### Type

 * [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  Inherited From * [Phaser.Component.PhysicsBody#body](phaser.component.physicsbody#body)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L91))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
canvasBuffer :PIXICanvasBuffer

  The CanvasBuffer object that the tiled texture is drawn to.

   Inherited From * [PIXI.TilingSprite#canvasBuffer](pixi.tilingsprite#canvasBuffer)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L95))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
checkWorldBounds : boolean

  If this is set to `true` the Game Object checks if it is within the World bounds each frame. 

 When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

 If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

 It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

 When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.InWorld#checkWorldBounds](phaser.component.inworld#checkWorldBounds)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L98))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
damage

  Damages the Game Object. This removes the given amount of health from the `health` property.

 If health is taken below or is equal to zero then the `kill` method is called.

   Inherited From * [Phaser.Component.Health#damage](phaser.component.health#damage)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L46))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Sprite is processed by the core Phaser game loops and Group loops.

   Inherited From * [PIXI.Sprite#exists](pixi.sprite#exists)
 Default Value * true
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L103))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
frame : integer

  Gets or sets the current frame index of the texture being used to render this Game Object.

 To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,  
for example: `player.frame = 4`.

 If the frame index given doesn't exist it will revert to the first frame found in the texture.

 If you are using a texture atlas then you should use the `frameName` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frame](phaser.component.loadtexture#frame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L254))   ### 
frameName : string

  Gets or sets the current frame name of the texture being used to render this Game Object.

 To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use,  
for example: `player.frameName = "idle"`.

 If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

 If you are using a sprite sheet then you should use the `frame` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frameName](phaser.component.loadtexture#frameName)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L279))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
heal

  Heal the Game Object. This adds the given amount of health to the `health` property.

   Inherited From * [Phaser.Component.Health#heal](phaser.component.health#heal)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L90))   ### 
health : number

  The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

 It can be used in combination with the `damage` method or modified directly.

   Inherited From * [Phaser.Component.Health#health](phaser.component.health#health)
 Default Value * 1
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L26))   ### 
height : number

  The height of the tiling sprite

   Inherited From * [PIXI.TilingSprite#height](pixi.tilingsprite#height)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L27))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Inherited From * [Phaser.Component.InputEnabled#input](phaser.component.inputenabled#input)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Inherited From * [Phaser.Component.InputEnabled#inputEnabled](phaser.component.inputenabled#inputEnabled)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   ### 
[readonly] inWorld : boolean

  Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

   Inherited From * [Phaser.Component.InWorld#inWorld](phaser.component.inworld#inWorld)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L129))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
maxHealth : number

  The Game Objects maximum health value. This works in combination with the `heal` method to ensure  
the health value never exceeds the maximum.

   Inherited From * [Phaser.Component.Health#maxHealth](phaser.component.health#maxHealth)
 Default Value * 100
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L35))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
outOfBoundsKill : boolean

  If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

   Inherited From * [Phaser.Component.InWorld#outOfBoundsKill](phaser.component.inworld#outOfBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L106))   ### 
outOfCameraBoundsKill : boolean

  If this and the `autoCull` property are both set to `true`, then the `kill` method  
is called as soon as the Game Object leaves the camera bounds.

   Inherited From * [Phaser.Component.InWorld#outOfCameraBoundsKill](phaser.component.inworld#outOfCameraBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L115))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Source code: [gameobjects/TileSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js#L78))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
refreshTexture : boolean

  If true the TilingSprite will run generateTexture on its **next** render pass.  
This is set by the likes of Phaser.LoadTexture.setFrame.

   Inherited From * [PIXI.TilingSprite#refreshTexture](pixi.tilingsprite#refreshTexture)
 Default Value * true
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L119))   ### 
renderable : boolean

  Whether this sprite is renderable or not

   Inherited From * [PIXI.TilingSprite#renderable](pixi.tilingsprite#renderable)
 Default Value * true
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L59))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
setHealth

  Sets the health property of the Game Object to the given amount.  
Will never exceed the `maxHealth` value.

   Inherited From * [Phaser.Component.Health#setHealth](phaser.component.health#setHealth)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L70))   ### 
shader : [PIXI.AbstractFilter](pixi.abstractfilter)

  The shader that will be used to render this Sprite.  
Set to null to remove a current shader.

   Inherited From * [PIXI.Sprite#shader](pixi.sprite#shader)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L93))   ### 
smoothed : boolean

  Enable or disable texture smoothing for this Game Object.

 It only takes effect if the Game Object is using an image based texture.

 Smoothing is enabled by default.

   Inherited From * [Phaser.Component.Smoothed#smoothed](phaser.component.smoothed#smoothed)
 Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L25))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture that the sprite is using

   Inherited From * [PIXI.Sprite#texture](pixi.sprite#texture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L28))   ### 
textureDebug : boolean

  If enabled a green rectangle will be drawn behind the generated tiling texture, allowing you to visually  
debug the texture being used.

   Inherited From * [PIXI.TilingSprite#textureDebug](pixi.tilingsprite#textureDebug)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L77))   ### 
tilePattern :PIXITexture

  The Context fill pattern that is used to draw the TilingSprite in Canvas mode only (will be null in WebGL).

   Inherited From * [PIXI.TilingSprite#tilePattern](pixi.tilingsprite#tilePattern)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 111](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L111))   ### 
tilePosition :Point

  The offset position of the image that is being tiled

   Inherited From * [PIXI.TilingSprite#tilePosition](pixi.tilingsprite#tilePosition)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L51))   ### 
tileScale :Point

  The scaling of the image that is being tiled

   Inherited From * [PIXI.TilingSprite#tileScale](pixi.tilingsprite#tileScale)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L35))   ### 
tileScaleOffset :Point

  A point that represents the scale of the texture object

   Inherited From * [PIXI.TilingSprite#tileScaleOffset](pixi.tilingsprite#tileScaleOffset)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L43))   ### 
tilingTexture :PIXITexture

  An internal Texture object that holds the tiling texture that was generated from TilingSprite.texture.

   Inherited From * [PIXI.TilingSprite#tilingTexture](pixi.tilingsprite#tilingTexture)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L103))   ### 
tint : number

  The tint applied to the sprite. This is a hex value

   Inherited From * [PIXI.TilingSprite#tint](pixi.tilingsprite#tint)
 Default Value * 0xFFFFFF
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L68))   ### 
tintedTexture :Canvas

  A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

   Inherited From * [PIXI.Sprite#tintedTexture](pixi.sprite#tintedTexture)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L73))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [gameobjects/TileSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js#L72))   ### 
width : number

  The width of the tiling sprite

   Inherited From * [PIXI.TilingSprite#width](pixi.tilingsprite#width)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L19))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
x : number

  The position of the Game Object on the x axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#x](phaser.component.physicsbody#x)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L98))   ### 
y : number

  The position of the Game Object on the y axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#y](phaser.component.physicsbody#y)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L124))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
autoScroll(x, y)

  Sets this TileSprite to automatically scroll in the given direction until stopped via TileSprite.stopScroll().  
The scroll speed is specified in pixels per second.  
A negative x value will scroll to the left. A positive x value will scroll to the right.  
A negative y value will scroll up. A positive y value will scroll down.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Horizontal scroll speed in pixels per second. |
| `y` | number | Vertical scroll speed in pixels per second. |

  Source code: [gameobjects/TileSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js#L149))   ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#bringToTop](phaser.component.bringtotop#bringToTop)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
destroy(destroyChildren)

  Destroys the TileSprite. This removes it from its parent group, destroys the event and animation handlers if present  
and nulls its reference to game, freeing it up for garbage collection.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called? |

  Source code: [gameobjects/TileSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js) ([Line 178](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js#L178))   ### 
generateTilingTexture(forcePowerOfTwo, renderSession)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `forcePowerOfTwo` | Boolean | Whether we want to force the texture to be a power of two |
| `renderSession` | RenderSession | - |

  Inherited From * [PIXI.TilingSprite#generateTilingTexture](pixi.tilingsprite#generateTilingTexture)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 332](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L332))   ### 
getBounds() → {Rectangle}

  Returns the framing rectangle of the sprite as a PIXI.Rectangle object

  ##### Returns

   Rectangle -   the framing rectangle

    Inherited From * [PIXI.TilingSprite#getBounds](pixi.tilingsprite#getBounds)
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 417](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L417))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.Sprite#getLocalBounds](pixi.sprite#getLocalBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L315))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
loadTexture(key, frame, stopAnimation)

  Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

 If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

 You should only use `loadTexture` if you want to replace the base texture entirely.

 Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

 You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite.  
Doing this then sets the key to be the `frame` argument (the frame is set to zero). 

 This allows you to create sprites using `load.image` during development, and then change them  
to use a Texture Atlas later in development by simply searching your code for 'PENDING\_ATLAS'  
and swapping it to be the key of the atlas data.

 Note: You cannot use a RenderTexture as a texture for a TileSprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `stopAnimation` | boolean |  <optional> |  true  | If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. |

  Inherited From * [Phaser.Component.LoadTexture#loadTexture](phaser.component.loadtexture#loadTexture)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L51))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveDown](phaser.component.bringtotop#moveDown)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveUp](phaser.component.bringtotop#moveUp)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
overlap(displayObject) → {boolean}

  Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,  
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

 This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

 Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.  
It should be fine for low-volume testing where physics isn't required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Button](phaser.button) | PIXI.DisplayObject | The display object to check against. |

 ##### Returns

   boolean -   True if the bounds of this Game Object intersects at any point with the bounds of the given display object.

    Inherited From * [Phaser.Component.Overlap#overlap](phaser.component.overlap#overlap)
 Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L29))   ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays an Animation.

 The animation should have previously been created via `animations.add`.

 If the animation is already playing calling this again won't do anything.  
If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'. |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation.

    Inherited From * [Phaser.Component.Animation#play](phaser.component.animation#play)
 Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L31))   ### 
<internal> postUpdate()

  Internal method called by the World postUpdate cycle.

   Inherited From * [Phaser.Component.Core#postUpdate](phaser.component.core#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L338))   ### 
preUpdate()

  Automatically called by World.preUpdate.

   Source code: [gameobjects/TileSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js) ([Line 122](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js#L122))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
reset(x, y) → {[Phaser.TileSprite](phaser.tilesprite)}

  Resets the TileSprite. This places the TileSprite at the given x/y world coordinates, resets the tilePosition and then  
sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state.  
If the TileSprite has a physics body that too is reset.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate (in world space) to position the Sprite at. |
| `y` | number | The y coordinate (in world space) to position the Sprite at. |

 ##### Returns

   [Phaser.TileSprite](phaser.tilesprite) -   This instance.

    Source code: [gameobjects/TileSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js) ([Line 194](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js#L194))   ### 
resetFrame()

  Resets the texture frame dimensions that the Game Object uses for rendering.

   Inherited From * [Phaser.Component.LoadTexture#resetFrame](phaser.component.loadtexture#resetFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L232))   ### 
resizeFrame(parent, width, height)

  Resizes the Frame dimensions that the Game Object uses for rendering.

 You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData  
it can be useful to adjust the dimensions directly in this way.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | object | The parent texture object that caused the resize, i.e. a Phaser.Video object. |
| `width` | integer | The new width of the texture. |
| `height` | integer | The new height of the texture. |

  Inherited From * [Phaser.Component.LoadTexture#resizeFrame](phaser.component.loadtexture#resizeFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L220))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#sendToBack](phaser.component.bringtotop#sendToBack)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setFrame(frame)

  Sets the texture frame the Game Object uses for rendering.

 This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The Frame to be used by the texture. |

  Inherited From * [Phaser.Component.LoadTexture#setFrame](phaser.component.loadtexture#setFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L155))   ### 
setTexture(texture, destroy)

  Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous  
texture this Sprite was using.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) |  |  | The PIXI texture that is displayed by the sprite |
| `destroy` | Boolean |  <optional> |  false  | Call Texture.destroy on the current texture before replacing it with the new one? |

  Inherited From * [PIXI.Sprite#setTexture](pixi.sprite#setTexture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L163))   ### 
stopScroll()

  Stops an automatically scrolling TileSprite.

   Source code: [gameobjects/TileSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js) ([Line 166](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/TileSprite.js#L166))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Override this method in your own custom objects to handle any update requirements.  
It is called immediately after `preUpdate` and before `postUpdate`.  
Remember if this Game Object has any children you should call update on those too.

   Inherited From * [Phaser.Component.Core#update](phaser.component.core#update)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L328))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.TileSprite.html>

Class: Phaser.AnimationParser
=============================

 Constructor
-----------

 ### 
new AnimationParser()

  Responsible for parsing sprite sheet and JSON data into the internal FrameData format that Phaser uses for animations.

   Source code: [animation/AnimationParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js) ([Line 13](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js#L13))   Public Methods
--------------

  ### 
<static> JSONData(game, json) → {[Phaser.FrameData](phaser.framedata)}

  Parse the JSON data and extract the animation frame data from it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `json` | object | The JSON data from the Texture Atlas. Must be in Array format. |

 ##### Returns

   [Phaser.FrameData](phaser.framedata) -   A FrameData object containing the parsed frames.

    Source code: [animation/AnimationParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js#L93))   ### 
<static> JSONDataHash(game, json) → {[Phaser.FrameData](phaser.framedata)}

  Parse the JSON data and extract the animation frame data from it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `json` | object | The JSON data from the Texture Atlas. Must be in JSON Hash format. |

 ##### Returns

   [Phaser.FrameData](phaser.framedata) -   A FrameData object containing the parsed frames.

    Source code: [animation/AnimationParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js) ([Line 204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js#L204))   ### 
<static> JSONDataPyxel(game, json) → {[Phaser.FrameData](phaser.framedata)}

  Parse the JSON data and extract the animation frame data from it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `json` | object | The JSON data from the Texture Atlas. Must be in Pyxel JSON format. |

 ##### Returns

   [Phaser.FrameData](phaser.framedata) -   A FrameData object containing the parsed frames.

    Source code: [animation/AnimationParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js) ([Line 147](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js#L147))   ### 
<static> spriteSheet(game, key, frameWidth, frameHeight, frameMax, margin, spacing) → {[Phaser.FrameData](phaser.framedata)}

  Parse a Sprite Sheet and extract the animation frame data from it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `key` | string | Image |  |  | The Game.Cache asset key of the Sprite Sheet image or an actual HTML Image element. |
| `frameWidth` | number |  |  | The fixed width of each frame of the animation. |
| `frameHeight` | number |  |  | The fixed height of each frame of the animation. |
| `frameMax` | number |  <optional> |  -1  | The total number of animation frames to extract from the Sprite Sheet. The default value of -1 means "extract all frames". |
| `margin` | number |  <optional> |  0  | If the frames have been drawn with a margin, specify the amount here. |
| `spacing` | number |  <optional> |  0  | If the frames have been drawn with spacing between them, specify the amount here. |

 ##### Returns

   [Phaser.FrameData](phaser.framedata) -   A FrameData object containing the parsed frames.

    Source code: [animation/AnimationParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js#L15))   ### 
<static> XMLData(game, xml) → {[Phaser.FrameData](phaser.framedata)}

  Parse the XML data and extract the animation frame data from it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `xml` | object | The XML data from the Texture Atlas. Must be in Starling XML format. |

 ##### Returns

   [Phaser.FrameData](phaser.framedata) -   A FrameData object containing the parsed frames.

    Source code: [animation/AnimationParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js) ([Line 261](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/AnimationParser.js#L261))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.AnimationParser.html>

Class: Phaser.FrameData
=======================

 Constructor
-----------

 ### 
new FrameData()

  FrameData is a container for Frame objects, which are the internal representation of animation data in Phaser.

   Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 13](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L13))   Public Properties
-----------------

  ### 
[readonly] total : number

  The total number of frames in this FrameData set.

   Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 267](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L267))    Public Methods
--------------

  ### 
addFrame(frame) → {[Phaser.Frame](phaser.frame)}

  Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The frame to add to this FrameData set. |

 ##### Returns

   [Phaser.Frame](phaser.frame) -   The frame that was just added.

    Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L31))   ### 
checkFrameName(name) → {boolean}

  Check if there is a Frame with the given name.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name of the frame you want to check. |

 ##### Returns

   boolean -   True if the frame is found, otherwise false.

    Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L89))   ### 
clone() → {[Phaser.FrameData](phaser.framedata)}

  Makes a copy of this FrameData including copies (not references) to all of the Frames it contains.

  ##### Returns

   [Phaser.FrameData](phaser.framedata) -   A clone of this object, including clones of the Frame objects it contains.

    Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L107))   ### 
destroy()

  Destroys this FrameData collection by nulling the \_frames and \_frameNames arrays.

   Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 251](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L251))   ### 
getFrame(index) → {[Phaser.Frame](phaser.frame)}

  Get a Frame by its numerical index.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | number | The index of the frame you want to get. |

 ##### Returns

   [Phaser.Frame](phaser.frame) -   The frame, if found.

    Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L53))   ### 
getFrameByName(name) → {[Phaser.Frame](phaser.frame)}

  Get a Frame by its frame name.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name of the frame you want to get. |

 ##### Returns

   [Phaser.Frame](phaser.frame) -   The frame, if found.

    Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 71](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L71))   ### 
getFrameIndexes(frames, useNumericIndex, output) → {Array}

  Returns all of the Frame indexes in this FrameData set.  
The frames indexes are returned in the output array, or if none is provided in a new Array object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `frames` | Array |  <optional> |  | An Array containing the indexes of the frames to retrieve. If undefined or the array is empty then all frames in the FrameData are returned. |
| `useNumericIndex` | boolean |  <optional> |  true  | Are the given frames using numeric indexes (default) or strings? (false) |
| `output` | Array |  <optional> |  | If given the results will be appended to the end of this array otherwise a new array will be created. |

 ##### Returns

   Array -   An array of all Frame indexes matching the given names or IDs.

    Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L204))   ### 
getFrameRange(start, end, output) → {Array}

  Returns a range of frames based on the given start and end frame indexes and returns them in an Array.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `start` | number |  | The starting frame index. |
| `end` | number |  | The ending frame index. |
| `output` | Array |  <optional> | If given the results will be appended to the end of this array otherwise a new array will be created. |

 ##### Returns

   Array -   An array of Frames between the start and end index values, or an empty array if none were found.

    Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L135))   ### 
getFrames(frames, useNumericIndex, output) → {Array}

  Returns all of the Frames in this FrameData set where the frame index is found in the input array.  
The frames are returned in the output array, or if none is provided in a new Array object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `frames` | Array |  <optional> |  | An Array containing the indexes of the frames to retrieve. If the array is empty or undefined then all frames in the FrameData are returned. |
| `useNumericIndex` | boolean |  <optional> |  true  | Are the given frames using numeric indexes (default) or strings? (false) |
| `output` | Array |  <optional> |  | If given the results will be appended to the end of this array otherwise a new array will be created. |

 ##### Returns

   Array -   An array of all Frames in this FrameData set matching the given names or IDs.

    Source code: [animation/FrameData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js) ([Line 157](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/FrameData.js#L157))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.FrameData.html>

Class: Phaser.Rope
==================

 Constructor
-----------

 ### 
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](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.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [PIXI.Texture](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](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js#L42))   Extends
-------

 * [PIXI.Rope](pixi.rope)
* [Phaser.Component.Core](phaser.component.core)
* [Phaser.Component.Angle](phaser.component.angle)
* [Phaser.Component.Animation](phaser.component.animation)
* [Phaser.Component.AutoCull](phaser.component.autocull)
* [Phaser.Component.Bounds](phaser.component.bounds)
* [Phaser.Component.BringToTop](phaser.component.bringtotop)
* [Phaser.Component.Crop](phaser.component.crop)
* [Phaser.Component.Delta](phaser.component.delta)
* [Phaser.Component.Destroy](phaser.component.destroy)
* [Phaser.Component.FixedToCamera](phaser.component.fixedtocamera)
* [Phaser.Component.InWorld](phaser.component.inworld)
* [Phaser.Component.LifeSpan](phaser.component.lifespan)
* [Phaser.Component.LoadTexture](phaser.component.loadtexture)
* [Phaser.Component.Overlap](phaser.component.overlap)
* [Phaser.Component.PhysicsBody](phaser.component.physicsbody)
* [Phaser.Component.Reset](phaser.component.reset)
* [Phaser.Component.ScaleMinMax](phaser.component.scaleminmax)
* [Phaser.Component.Smoothed](phaser.component.smoothed)

 Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

   Inherited From * [PIXI.Strip#blendMode](pixi.strip#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L51))   ### 
body : [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated  
properties and methods via it.

 By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

 To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object  
and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

 You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

 Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5,  
so the physics body is centered on the Game Object.

 If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  ##### Type

 * [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  Inherited From * [Phaser.Component.PhysicsBody#body](phaser.component.physicsbody#body)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L91))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
canvasPadding : number

  Triangles in canvas mode are automatically antialiased, use this value to force triangles to overlap a bit with each other.

   Inherited From * [PIXI.Strip#canvasPadding](pixi.strip#canvasPadding)
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L60))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
checkWorldBounds : boolean

  If this is set to `true` the Game Object checks if it is within the World bounds each frame. 

 When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

 If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

 It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

 When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.InWorld#checkWorldBounds](phaser.component.inworld#checkWorldBounds)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L98))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
cropRect : [Phaser.Rectangle](phaser.rectangle)

  The Rectangle used to crop the texture this Game Object uses.  
Set this property via `crop`.  
If you modify this property directly you must call `updateCrop` in order to have the change take effect.

   Inherited From * [Phaser.Component.Crop#cropRect](phaser.component.crop#cropRect)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L24))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] deltaX : number

  Returns the delta x value. The difference between world.x now and in the previous frame.

 The value will be positive if the Game Object has moved to the right or negative if to the left.

   Inherited From * [Phaser.Component.Delta#deltaX](phaser.component.delta#deltaX)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L24))   ### 
[readonly] deltaY : number

  Returns the delta y value. The difference between world.y now and in the previous frame.

 The value will be positive if the Game Object has moved down or negative if up.

   Inherited From * [Phaser.Component.Delta#deltaY](phaser.component.delta#deltaY)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L42))   ### 
[readonly] deltaZ : number

  Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

   Inherited From * [Phaser.Component.Delta#deltaZ](phaser.component.delta#deltaZ)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L58))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
dirty : boolean

  Whether the strip is dirty or not

   Inherited From * [PIXI.Strip#dirty](pixi.strip#dirty)
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L43))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Game Object is processed by the core game loop.  
If this Game Object has a physics body it also controls if its physics body is updated or not.  
When `exists` is set to `false` it will remove its physics body from the physics world if it has one.  
It also toggles the `visible` property to false as well.

 Setting `exists` to true will add its physics body back in to the physics world, if it has one.  
It will also set the `visible` property to `true`.

   Inherited From * [Phaser.Component.Core#exists](phaser.component.core#exists)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L284))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
frame : integer

  Gets or sets the current frame index of the texture being used to render this Game Object.

 To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,  
for example: `player.frame = 4`.

 If the frame index given doesn't exist it will revert to the first frame found in the texture.

 If you are using a texture atlas then you should use the `frameName` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frame](phaser.component.loadtexture#frame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L254))   ### 
frameName : string

  Gets or sets the current frame name of the texture being used to render this Game Object.

 To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use,  
for example: `player.frameName = "idle"`.

 If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

 If you are using a sprite sheet then you should use the `frame` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frameName](phaser.component.loadtexture#frameName)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L279))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
[readonly] inWorld : boolean

  Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

   Inherited From * [Phaser.Component.InWorld#inWorld](phaser.component.inworld#inWorld)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L129))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
outOfBoundsKill : boolean

  If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

   Inherited From * [Phaser.Component.InWorld#outOfBoundsKill](phaser.component.inworld#outOfBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L106))   ### 
outOfCameraBoundsKill : boolean

  If this and the `autoCull` property are both set to `true`, then the `kill` method  
is called as soon as the Game Object leaves the camera bounds.

   Inherited From * [Phaser.Component.InWorld#outOfCameraBoundsKill](phaser.component.inworld#outOfCameraBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L115))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
scaleMax : [Phaser.Point](phaser.point)

  The maximum scale this Game Object will scale up to. 

 It allows you to prevent a parent from scaling this Game Object higher than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMax](phaser.component.scaleminmax#scaleMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L46))   ### 
scaleMin : [Phaser.Point](phaser.point)

  The minimum scale this Game Object will scale down to.

 It allows you to prevent a parent from scaling this Game Object lower than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMin](phaser.component.scaleminmax#scaleMin)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L36))   ### 
segments

  The segments that make up the rope body as an array of Phaser.Rectangles

   ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `updateAnimation` | Array.<Phaser.Rectangles> | Returns an array of Phaser.Rectangles that represent the segments of the given rope |

  Source code: [gameobjects/Rope.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js) ([Line 175](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js#L175))   ### 
smoothed : boolean

  Enable or disable texture smoothing for this Game Object.

 It only takes effect if the Game Object is using an image based texture.

 Smoothing is enabled by default.

   Inherited From * [Phaser.Component.Smoothed#smoothed](phaser.component.smoothed#smoothed)
 Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L25))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture of the strip

   Inherited From * [PIXI.Strip#texture](pixi.strip#texture)
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L20))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
transformCallback : Function

  The callback that will apply any scale limiting to the worldTransform.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallback](phaser.component.scaleminmax#transformCallback)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L20))   ### 
transformCallbackContext : Object

  The context under which `transformCallback` is called.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallbackContext](phaser.component.scaleminmax#transformCallbackContext)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L26))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [gameobjects/Rope.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js#L57))   ### 
updateAnimation : Function

  A Rope will call its updateAnimation function on each update loop if it has one. Set to a function if you'd like the rope to animate during the update phase. Set to false or null to remove it.

   Source code: [gameobjects/Rope.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js#L144))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
x : number

  The position of the Game Object on the x axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#x](phaser.component.physicsbody#x)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L98))   ### 
y : number

  The position of the Game Object on the y axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#y](phaser.component.physicsbody#y)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L124))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#bringToTop](phaser.component.bringtotop#bringToTop)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
crop(rect, copy)

  Crop allows you to crop the texture being used to display this Game Object.  
Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

 Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,  
or by modifying `cropRect` property directly and then calling `updateCrop`.

 The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object  
so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

 A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`,  
in which case the values are duplicated to a local object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) |  |  | The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. |
| `copy` | boolean |  <optional> |  false  | If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect. |

  Inherited From * [Phaser.Component.Crop#crop](phaser.component.crop#crop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L49))   ### 
destroy(destroyChildren, destroyTexture)

  Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present  
and nulls its reference to `game`, freeing it up for garbage collection.

 If this Game Object has the Events component it will also dispatch the `onDestroy` event.

 You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called as well? |
| `destroyTexture` | boolean |  <optional> |  false  | Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Component.Destroy#destroy](phaser.component.destroy#destroy)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L37))   ### 
getBounds(matrix) → {Rectangle}

  Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Matrix | the transformation matrix of the sprite |

 ##### Returns

   Rectangle -   the framing rectangle

    Inherited From * [PIXI.Strip#getBounds](pixi.strip#getBounds)
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 405](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L405))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
loadTexture(key, frame, stopAnimation)

  Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

 If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

 You should only use `loadTexture` if you want to replace the base texture entirely.

 Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

 You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite.  
Doing this then sets the key to be the `frame` argument (the frame is set to zero). 

 This allows you to create sprites using `load.image` during development, and then change them  
to use a Texture Atlas later in development by simply searching your code for 'PENDING\_ATLAS'  
and swapping it to be the key of the atlas data.

 Note: You cannot use a RenderTexture as a texture for a TileSprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `stopAnimation` | boolean |  <optional> |  true  | If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. |

  Inherited From * [Phaser.Component.LoadTexture#loadTexture](phaser.component.loadtexture#loadTexture)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L51))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveDown](phaser.component.bringtotop#moveDown)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveUp](phaser.component.bringtotop#moveUp)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
overlap(displayObject) → {boolean}

  Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,  
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

 This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

 Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.  
It should be fine for low-volume testing where physics isn't required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Button](phaser.button) | PIXI.DisplayObject | The display object to check against. |

 ##### Returns

   boolean -   True if the bounds of this Game Object intersects at any point with the bounds of the given display object.

    Inherited From * [Phaser.Component.Overlap#overlap](phaser.component.overlap#overlap)
 Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L29))   ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays an Animation.

 The animation should have previously been created via `animations.add`.

 If the animation is already playing calling this again won't do anything.  
If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'. |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation.

    Inherited From * [Phaser.Component.Animation#play](phaser.component.animation#play)
 Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L31))   ### 
<internal> postUpdate()

  Internal method called by the World postUpdate cycle.

   Inherited From * [Phaser.Component.Core#postUpdate](phaser.component.core#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L338))   ### 
preUpdate()

  Automatically called by World.preUpdate.

   Source code: [gameobjects/Rope.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js#L93))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
reset(x, y) → {[Phaser.Rope](phaser.rope)}

  Resets the Rope. This places the Rope at the given x/y world coordinates and then  
sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state.  
If the Rope has a physics body that too is reset.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate (in world space) to position the Sprite at. |
| `y` | number | The y coordinate (in world space) to position the Sprite at. |

 ##### Returns

   [Phaser.Rope](phaser.rope) -   This instance.

    Source code: [gameobjects/Rope.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js#L125))   ### 
resetFrame()

  Resets the texture frame dimensions that the Game Object uses for rendering.

   Inherited From * [Phaser.Component.LoadTexture#resetFrame](phaser.component.loadtexture#resetFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L232))   ### 
resizeFrame(parent, width, height)

  Resizes the Frame dimensions that the Game Object uses for rendering.

 You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData  
it can be useful to adjust the dimensions directly in this way.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | object | The parent texture object that caused the resize, i.e. a Phaser.Video object. |
| `width` | integer | The new width of the texture. |
| `height` | integer | The new height of the texture. |

  Inherited From * [Phaser.Component.LoadTexture#resizeFrame](phaser.component.loadtexture#resizeFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L220))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#sendToBack](phaser.component.bringtotop#sendToBack)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setFrame(frame)

  Sets the texture frame the Game Object uses for rendering.

 This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The Frame to be used by the texture. |

  Inherited From * [Phaser.Component.LoadTexture#setFrame](phaser.component.loadtexture#setFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L155))   ### 
setScaleMinMax(minX, minY, maxX, maxY)

  Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

 For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored  
and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

 By setting these values you can carefully control how Game Objects deal with responsive scaling.

 If only one parameter is given then that value will be used for both scaleMin and scaleMax:  
`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

 If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:  
`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

 If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly,  
or pass `null` for the `maxX` and `maxY` parameters.

 Call `setScaleMinMax(null)` to clear all previously set values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `minX` | number | null | The minimum horizontal scale value this Game Object can scale down to. |
| `minY` | number | null | The minimum vertical scale value this Game Object can scale down to. |
| `maxX` | number | null | The maximum horizontal scale value this Game Object can scale up to. |
| `maxY` | number | null | The maximum vertical scale value this Game Object can scale up to. |

  Inherited From * [Phaser.Component.ScaleMinMax#setScaleMinMax](phaser.component.scaleminmax#setScaleMinMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L110))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Override and use this function in your own custom objects to handle any update requirements you may have.

   Source code: [gameobjects/Rope.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Rope.js#L110))   ### 
updateCrop()

  If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,  
or the rectangle it references, then you need to update the crop frame by calling this method.

   Inherited From * [Phaser.Component.Crop#updateCrop](phaser.component.crop#updateCrop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L86))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Rope.html>

Class: Phaser.RetroFont
=======================

 Constructor
-----------

 ### 
new RetroFont(game, key, characterWidth, characterHeight, chars, charsPerRow, xSpacing, ySpacing, xOffset, yOffset)

  A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont  
is the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | Current game instance. |
| `key` | string |  |  | The font set graphic set as stored in the Game.Cache. |
| `characterWidth` | number |  |  | The width of each character in the font set. |
| `characterHeight` | number |  |  | The height of each character in the font set. |
| `chars` | string |  |  | The characters used in the font set, in display order. You can use the TEXT\_SET consts for common font set arrangements. |
| `charsPerRow` | number |  <optional> |  | The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth. |
| `xSpacing` | number |  <optional> |  0  | If the characters in the font set have horizontal spacing between them set the required amount here. |
| `ySpacing` | number |  <optional> |  0  | If the characters in the font set have vertical spacing between them set the required amount here. |
| `xOffset` | number |  <optional> |  0  | If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. |
| `yOffset` | number |  <optional> |  0  | If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. |

  Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L25))   Extends
-------

 * [Phaser.RenderTexture](phaser.rendertexture)

 Public Properties
-----------------

  ### 
[static] ALIGN\_CENTER : string

  Align each line of multi-line text in the center.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 196](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L196))   ### 
[static] ALIGN\_LEFT : string

  Align each line of multi-line text to the left.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 182](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L182))   ### 
[static] ALIGN\_RIGHT : string

  Align each line of multi-line text to the right.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 189](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L189))   ### 
[static] TEXT\_SET1 : string

  Text Set 1 = !"#$%&'()\*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^\_`abcdefghijklmnopqrstuvwxyz{ | }~

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L203))   ### 
[static] TEXT\_SET2 : string

  Text Set 2 = !"#$%&'()\*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 210](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L210))   ### 
[static] TEXT\_SET3 : string

  Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L217))   ### 
[static] TEXT\_SET4 : string

  Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 224](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L224))   ### 
[static] TEXT\_SET5 : string

  Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-\*:0123456789

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 231](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L231))   ### 
[static] TEXT\_SET6 : string

  Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.'

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 238](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L238))   ### 
[static] TEXT\_SET7 : string

  Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 245](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L245))   ### 
[static] TEXT\_SET8 : string

  Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 252](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L252))   ### 
[static] TEXT\_SET9 : string

  Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L259))   ### 
[static] TEXT\_SET10 : string

  Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 266](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L266))   ### 
[static] TEXT\_SET11 : string

  Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 273](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L273))   ### 
align : string

  Alignment of the text when multiLine = true or a fixedWidth is set. Set to RetroFont.ALIGN\_LEFT (default), RetroFont.ALIGN\_RIGHT or RetroFont.ALIGN\_CENTER.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L77))   ### 
autoUpperCase : boolean

  Automatically convert any text to upper case. Lots of old bitmap fonts only contain upper-case characters, so the default is true.

   Default Value * true
 Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L89))   ### 
baseTexture : [PIXI.BaseTexture](pixi.basetexture)

  The base texture object that this texture uses

   Inherited From * [PIXI.RenderTexture#baseTexture](pixi.rendertexture#baseTexture)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L78))   ### 
characterHeight : number

  The height of each character in the font set.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L45))   ### 
characterPerRow : number

  The number of characters per row in the font set.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L60))   ### 
characterSpacingX : number

  If the characters in the font set have horizontal spacing between them set the required amount here.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L50))   ### 
characterSpacingY : number

  If the characters in the font set have vertical spacing between them set the required amount here.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L55))   ### 
characterWidth : number

  The width of each character in the font set.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L40))   ### 
crop :Rectangle

  This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,  
irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)

   Inherited From * [PIXI.RenderTexture#crop](pixi.rendertexture#crop)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L69))   ### 
customSpacingX : number

  Adds horizontal spacing between each character of the font, in pixels.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L95))   ### 
customSpacingY : number

  Adds vertical spacing between each line of multi-line text, set in pixels.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 101](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L101))   ### 
fixedWidth : number

  If you need this RetroFont image to have a fixed width you can set the width in this value.  
If text is wider than the width specified it will be cropped off.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 108](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L108))   ### 
fontSet :Image

  A reference to the image stored in the Game.Cache that contains the font.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L113))   ### 
frame :Rectangle

  The framing rectangle of the render texture

   Inherited From * [PIXI.RenderTexture#frame](pixi.rendertexture#frame)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L61))   ### 
frameData : [Phaser.FrameData](phaser.framedata)

  The FrameData representing this Retro Font.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L130))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Inherited From * [Phaser.RenderTexture#game](phaser.rendertexture#game)
 Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L30))   ### 
height : number

  The height of the render texture

   Inherited From * [PIXI.RenderTexture#height](pixi.rendertexture#height)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L45))   ### 
isTiling : boolean

  Is this a tiling texture? As used by the likes of a TilingSprite.

   Inherited From * [PIXI.Texture#isTiling](pixi.texture#isTiling)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L79))   ### 
key : string

  The key of the RenderTexture in the Cache, if stored there.

   Inherited From * [Phaser.RenderTexture#key](phaser.rendertexture#key)
 Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L35))   ### 
multiLine : boolean

  If set to true all carriage-returns in text will form new lines (see align). If false the font will only contain one single line of text (the default)

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L83))   ### 
noFrame : boolean

  Does this Texture have any frame data assigned to it?

   Inherited From * [PIXI.Texture#noFrame](pixi.texture#noFrame)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L28))   ### 
[readonly] offsetX : number

  If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L66))   ### 
[readonly] offsetY : number

  If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L72))   ### 
renderer : [PIXI.CanvasRenderer](pixi.canvasrenderer) | [PIXI.WebGLRenderer](pixi.webglrenderer)

  The renderer this RenderTexture uses. A RenderTexture can only belong to one renderer at the moment if its webGL.

  ##### Type

 * [PIXI.CanvasRenderer](pixi.canvasrenderer) | [PIXI.WebGLRenderer](pixi.webglrenderer)

  Inherited From * [PIXI.RenderTexture#renderer](pixi.rendertexture#renderer)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 99](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L99))   ### 
requiresReTint : boolean

  This will let a renderer know that a tinted parent has updated its texture.

   Inherited From * [PIXI.Texture#requiresReTint](pixi.texture#requiresReTint)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L95))   ### 
requiresUpdate : boolean

  This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)

   Inherited From * [PIXI.Texture#requiresUpdate](pixi.texture#requiresUpdate)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L87))   ### 
resolution : number

  The Resolution of the texture.

   Inherited From * [PIXI.RenderTexture#resolution](pixi.rendertexture#resolution)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L53))   ### 
smoothed : boolean

  Sets if the stamp is smoothed or not.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 585](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L585))   ### 
[readonly] stamp : [Phaser.Image](phaser.image)

  The image that is stamped to the RenderTexture for each character in the font.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L163))   ### 
text : string

  Set this value to update the text in this sprite. Carriage returns are automatically stripped out if multiLine is false. Text is converted to upper case if autoUpperCase is true.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 547](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L547))   ### 
trim :Rectangle

  The texture trim data.

   Inherited From * [PIXI.Texture#trim](pixi.texture#trim)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L63))   ### 
type : number

  Base Phaser object type.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L170))   ### 
valid : boolean

  Inherited From * [PIXI.RenderTexture#valid](pixi.rendertexture#valid)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L125))   ### 
width : number

  The with of the render texture

   Inherited From * [PIXI.RenderTexture#width](pixi.rendertexture#width)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L37))    Public Methods
--------------

  ### 
buildRetroFontText()

  Updates the texture with the new text.

   Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L328))   ### 
clear()

  Clears the RenderTexture.

   Inherited From * [PIXI.RenderTexture#clear](pixi.rendertexture#clear)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 175](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L175))   ### 
destroy(destroyBase)

  Destroys this texture

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `destroyBase` | Boolean | Whether to destroy the base texture as well |

  Inherited From * [PIXI.Texture#destroy](pixi.texture#destroy)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L165))   ### 
getBase64() → {String}

  Will return a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that.

  ##### Returns

   String -   A base64 encoded string of the texture.

    Inherited From * [PIXI.RenderTexture#getBase64](pixi.rendertexture#getBase64)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 309](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L309))   ### 
getCanvas() → {HTMLCanvasElement}

  Creates a Canvas element, renders this RenderTexture to it and then returns it.

  ##### Returns

   HTMLCanvasElement -   A Canvas element with the texture rendered on.

    Inherited From * [PIXI.RenderTexture#getCanvas](pixi.rendertexture#getCanvas)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 320](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L320))   ### 
getImage() → {Image}

  Will return a HTML Image of the texture

  ##### Returns

   Image -    Inherited From * [PIXI.RenderTexture#getImage](pixi.rendertexture#getImage)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 296](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L296))   ### 
getLongestLine() → {number}

  Works out the longest line of text in \_text and returns its length

  ##### Returns

   number -   The length of the longest line of text.

    Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 459](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L459))   ### 
pasteLine(line, x, y, customSpacingX)

  Internal function that takes a single line of text (2nd parameter) and pastes it into the BitmapData at the given coordinates.  
Used by getLine and getMultiLine

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `line` | string | The single line of text to paste. |
| `x` | number | The x coordinate. |
| `y` | number | The y coordinate. |
| `customSpacingX` | number | Custom X spacing. |

  Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 420](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L420))   ### 
<internal> removeUnsupportedCharacters(stripCR) → {string}

  Internal helper function that removes all unsupported characters from the \_text String, leaving only characters contained in the font set.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `stripCR` | boolean |  <optional> |  true  | Should it strip carriage returns as well? |

 ##### Returns

   string -   A clean version of the string.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 486](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L486))   ### 
render(displayObject, matrix, clear)

  This function will draw the display object to the RenderTexture.

 In versions of Phaser prior to 2.4.0 the second parameter was a Phaser.Point object.  
This is now a Matrix allowing you much more control over how the Display Object is rendered.  
If you need to replicate the earlier behavior please use Phaser.RenderTexture.renderXY instead.

 If you wish for the displayObject to be rendered taking its current scale, rotation and translation into account then either  
pass `null`, leave it undefined or pass `displayObject.worldTransform` as the matrix value.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Group](phaser.group) |  |  | The display object to render to this texture. |
| `matrix` | [Phaser.Matrix](phaser.matrix) |  <optional> |  | Optional matrix to apply to the display object before rendering. If null or undefined it will use the worldTransform matrix of the given display object. |
| `clear` | boolean |  <optional> |  false  | If true the texture will be cleared before the display object is drawn. |

  Inherited From * [Phaser.RenderTexture#render](phaser.rendertexture#render)
 Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 117](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L117))   ### 
renderRawXY(displayObject, x, y, clear)

  This function will draw the display object to the RenderTexture at the given coordinates.

 When the display object is drawn it doesn't take into account scale, rotation or translation.

 If you need those then use RenderTexture.renderXY instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Group](phaser.group) |  |  | The display object to render to this texture. |
| `x` | number |  |  | The x position to render the object at. |
| `y` | number |  |  | The y position to render the object at. |
| `clear` | boolean |  <optional> |  false  | If true the texture will be cleared before the display object is drawn. |

  Inherited From * [Phaser.RenderTexture#renderRawXY](phaser.rendertexture#renderRawXY)
 Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L89))   ### 
renderXY(displayObject, x, y, clear)

  This function will draw the display object to the RenderTexture at the given coordinates.

 When the display object is drawn it takes into account scale and rotation.

 If you don't want those then use RenderTexture.renderRawXY instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Group](phaser.group) |  |  | The display object to render to this texture. |
| `x` | number |  |  | The x position to render the object at. |
| `y` | number |  |  | The y position to render the object at. |
| `clear` | boolean |  <optional> |  false  | If true the texture will be cleared before the display object is drawn. |

  Inherited From * [Phaser.RenderTexture#renderXY](phaser.rendertexture#renderXY)
 Source code: [gameobjects/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RenderTexture.js#L57))   ### 
resize(width, height, updateBase)

  Resizes the RenderTexture.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | Number | The width to resize to. |
| `height` | Number | The height to resize to. |
| `updateBase` | Boolean | Should the baseTexture.width and height values be resized as well? |

  Inherited From * [PIXI.RenderTexture#resize](pixi.rendertexture#resize)
 Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L139))   ### 
setFixedWidth(width, lineAlignment)

  If you need this RetroFont to have a fixed width and custom alignment you can set the width here.  
If text is wider than the width specified it will be cropped off.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | number |  |  | Width in pixels of this RetroFont. Set to zero to disable and re-enable automatic resizing. |
| `lineAlignment` | string |  <optional> |  'left'  | Align the text within this width. Set to RetroFont.ALIGN\_LEFT (default), RetroFont.ALIGN\_RIGHT or RetroFont.ALIGN\_CENTER. |

  Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 275](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L275))   ### 
setFrame(frame)

  Specifies the region of the baseTexture that this texture will use.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | Rectangle | The frame of the texture to set it to |

  Inherited From * [PIXI.Texture#setFrame](pixi.texture#setFrame)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 178](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L178))   ### 
setText(content, multiLine, characterSpacing, lineSpacing, lineAlignment, allowLowerCase)

  A helper function that quickly sets lots of variables at once, and then updates the text.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `content` | string |  |  | The text of this sprite. |
| `multiLine` | boolean |  <optional> |  false  | Set to true if you want to support carriage-returns in the text and create a multi-line sprite instead of a single line. |
| `characterSpacing` | number |  <optional> |  0  | To add horizontal spacing between each character specify the amount in pixels. |
| `lineSpacing` | number |  <optional> |  0  | To add vertical spacing between each line of text, set the amount in pixels. |
| `lineAlignment` | string |  <optional> |  'left'  | Align each line of multi-line text. Set to RetroFont.ALIGN\_LEFT, RetroFont.ALIGN\_RIGHT or RetroFont.ALIGN\_CENTER. |
| `allowLowerCase` | boolean |  <optional> |  false  | Lots of bitmap font sets only include upper-case characters, if yours needs to support lower case then set this to true. |

  Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L293))   ### 
updateOffset(xOffset, yOffset)

  Updates the x and/or y offset that the font is rendered from. This updates all of the texture frames, so be careful how often it is called.  
Note that the values given for the x and y properties are either ADDED to or SUBTRACTED from (if negative) the existing offsetX/Y values of the characters.  
So if the current offsetY is 8 and you want it to start rendering from y16 you would call updateOffset(0, 8) to add 8 to the current y offset.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `xOffset` | number |  <optional> |  0  | If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. |
| `yOffset` | number |  <optional> |  0  | If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. |

  Source code: [gameobjects/RetroFont.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js) ([Line 514](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/RetroFont.js#L514))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.RetroFont.html>

Class: Phaser.Animation
=======================

 Constructor
-----------

 ### 
new Animation(game, parent, name, frameData, frames, frameRate, loop)

  An Animation instance contains a single animation and the controls to play it.

 It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `parent` | [Phaser.Sprite](phaser.sprite) |  |  | A reference to the owner of this Animation. |
| `name` | string |  |  | The unique name for this animation, used in playback commands. |
| `frameData` | [Phaser.FrameData](phaser.framedata) |  |  | The FrameData object that contains all frames used by this Animation. |
| `frames` | Array.<number> | Array.<string> |  |  | An array of numbers or strings indicating which frames to play in which order. |
| `frameRate` | number |  <optional> |  60  | The speed at which the animation should play. The speed is given in frames per second. |
| `loop` | boolean |  <optional> |  false  | Whether or not the animation is looped or just plays once. |

  Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L22))   Public Properties
-----------------

  ### 
currentFrame : [Phaser.Frame](phaser.frame)

  The currently displayed frame of the Animation.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L125))   ### 
delay : number

  The delay in ms between each frame of the Animation, based on the given frameRate.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L58))   ### 
enableUpdate : boolean

  Gets or sets if this animation will dispatch the onUpdate events upon changing frame.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 800](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L800))   ### 
frame : number

  Gets or sets the current frame index and updates the Texture Cache for display.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 739](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L739))   ### 
[readonly] frameTotal : number

  The total number of frames in the currently loaded FrameData, or -1 if no FrameData is loaded.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 726](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L726))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L29))   ### 
isFinished : boolean

  The finished state of the Animation. Set to true once playback completes, false during playback.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L80))   ### 
isPaused : boolean

  The paused state of the Animation.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L92))   ### 
isPlaying : boolean

  The playing state of the Animation. Set to false once playback completes, true during playback.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L86))   ### 
isReversed : boolean

  Indicates if the animation will play backwards.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 157](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L157))   ### 
killOnComplete : boolean

  Should the parent of this Animation be killed when the animation completes?

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 74](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L74))   ### 
loop : boolean

  The loop state of the Animation.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L63))   ### 
loopCount : number

  The number of times the animation has looped since it was last started.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L68))   ### 
name : string

  The user defined name given to this Animation.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L46))   ### 
onComplete : [Phaser.Signal](phaser.signal)

  This event is dispatched when this Animation completes playback. If the animation is set to loop this is never fired, listen for onLoop instead.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L146))   ### 
onLoop : [Phaser.Signal](phaser.signal)

  This event is dispatched when this Animation loops.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 151](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L151))   ### 
onStart : [Phaser.Signal](phaser.signal)

  This event is dispatched when this Animation starts playback.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L130))   ### 
onUpdate : [Phaser.Signal](phaser.signal) | null

  This event is dispatched when the Animation changes frame.  
By default this event is disabled due to its intensive nature. Enable it with: `Animation.enableUpdate = true`.  
Note that the event is only dispatched with the current frame. In a low-FPS environment Animations  
will automatically frame-skip to try and claw back time, so do not base your code on expecting to  
receive a perfectly sequential set of frames from this event.

  ##### Type

 * [Phaser.Signal](phaser.signal) | null

  Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 141](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L141))   ### 
paused : boolean

  Gets and sets the paused state of this Animation.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 672](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L672))   ### 
reversed : boolean

  Gets and sets the isReversed state of this Animation.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 706](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L706))   ### 
speed : number

  Gets or sets the current speed of the animation in frames per second. Changing this in a playing animation will take effect from the next frame. Value must be greater than 0.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 777](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L777))    Public Methods
--------------

  ### 
<static> generateFrameNames(prefix, start, stop, suffix, zeroPad) → {Array.<string>}

  Really handy function for when you are creating arrays of animation data but it's using frame names and not numbers.  
For example imagine you've got 30 frames named: 'explosion\_0001-large' to 'explosion*0030-large'  
You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion*', 1, 30, '-large', 4);

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `prefix` | string |  |  | The start of the filename. If the filename was 'explosion*0001-large' the prefix would be 'explosion*'. |
| `start` | number |  |  | The number to start sequentially counting from. If your frames are named 'explosion\_0001' to 'explosion\_0034' the start is 1. |
| `stop` | number |  |  | The number to count to. If your frames are named 'explosion\_0001' to 'explosion\_0034' the stop value is 34. |
| `suffix` | string |  <optional> |  ''  | The end of the filename. If the filename was 'explosion\_0001-large' the prefix would be '-large'. |
| `zeroPad` | number |  <optional> |  0  | The number of zeros to pad the min and max values with. If your frames are named 'explosion\_0001' to 'explosion\_0034' then the zeroPad is 4. |

 ##### Returns

   Array.<string> -   An array of framenames.

    Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 828](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L828))   ### 
complete()

  Called internally when the animation finishes playback.  
Sets the isPlaying and isFinished states and dispatches the onAnimationComplete event if it exists on the parent and local onComplete event.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 642](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L642))   ### 
destroy()

  Cleans up this animation ready for deletion. Nulls all values and references.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 608](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L608))   ### 
next(quantity)

  Advances by the given number of frames in the Animation, taking the loop value into consideration.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | number |  <optional> |  1  | The number of frames to advance. |

  Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 531](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L531))   ### 
onPause()

  Called when the Game enters a paused state.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 365](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L365))   ### 
onResume()

  Called when the Game resumes from a paused state.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 379](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L379))   ### 
play(frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays this animation.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   * A reference to this Animation instance.

    Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L167))   ### 
previous(quantity)

  Moves backwards the given number of frames in the Animation, taking the loop value into consideration.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | number |  <optional> |  1  | The number of frames to move back. |

  Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 563](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L563))   ### 
restart()

  Sets this animation back to the first frame and restarts the animation.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L218))   ### 
reverse() → {[Phaser.Animation](phaser.animation)}

  Reverses the animation direction.

  ##### Returns

   [Phaser.Animation](phaser.animation) -   The animation instance.

    Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L246))   ### 
reverseOnce() → {[Phaser.Animation](phaser.animation)}

  Reverses the animation direction for the current/next animation only  
Once the onComplete event is called this method will be called again and revert  
the reversed state.

  ##### Returns

   [Phaser.Animation](phaser.animation) -   The animation instance.

    Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 260](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L260))   ### 
setFrame(frameId, useLocalFrameIndex)

  Sets this animations playback to a given frame with the given ID.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `frameId` | string | number |  <optional> |  | The identifier of the frame to set. Can be the name of the frame, the sprite index of the frame, or the animation-local frame index. |
| `useLocalFrameIndex` | boolean |  <optional> |  false  | If you provide a number for frameId, should it use the numeric indexes of the frameData, or the 0-indexed frame index local to the animation. |

  Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 276](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L276))   ### 
stop(resetFrame, dispatchComplete)

  Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation.  
If `dispatchComplete` is true it will dispatch the complete events, otherwise they'll be ignored.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `resetFrame` | boolean |  <optional> |  false  | If true after the animation stops the currentFrame value will be set to the first frame in this animation. |
| `dispatchComplete` | boolean |  <optional> |  false  | Dispatch the Animation.onComplete and parent.onAnimationComplete events? |

  Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 334](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L334))   ### 
update()

  Updates this animation. Called automatically by the AnimationManager.

   Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 393](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L393))   ### 
updateFrameData(frameData)

  Changes the FrameData object this Animation is using.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frameData` | [Phaser.FrameData](phaser.framedata) | The FrameData object that contains all frames used by this Animation. |

  Source code: [animation/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js) ([Line 595](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Animation.js#L595))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Animation.html>

Class: Phaser.Frame
===================

 Constructor
-----------

 ### 
new Frame(index, x, y, width, height, name)

  A Frame is a single frame of an animation and is part of a FrameData collection.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | number | The index of this Frame within the FrameData set it is being added to. |
| `x` | number | X position of the frame within the texture image. |
| `y` | number | Y position of the frame within the texture image. |
| `width` | number | Width of the frame within the texture image. |
| `height` | number | Height of the frame within the texture image. |
| `name` | string | The name of the frame. In Texture Atlas data this is usually set to the filename. |

  Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L19))   Public Properties
-----------------

  ### 
bottom : number

  The bottom of the frame (y + height).

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 126](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L126))   ### 
centerX : number

  Center X position within the image to cut from.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L54))   ### 
centerY : number

  Center Y position within the image to cut from.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L59))   ### 
distance : number

  The distance from the top left to the bottom-right of this Frame.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L64))   ### 
height : number

  Height of the frame.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L44))   ### 
index : number

  The index of this Frame within the FrameData set it is being added to.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L24))   ### 
name : string

  Useful for Texture Atlas files (is set to the filename value).

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L49))   ### 
right : number

  The right of the Frame (x + width).

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 121](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L121))   ### 
rotated : boolean

  Rotated? (not yet implemented)

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L70))   ### 
rotationDirection : string

  Either 'cw' or 'ccw', rotation is always 90 degrees.

   Default Value * 'cw'
 Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 76](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L76))   ### 
sourceSizeH : number

  Height of the original sprite before it was trimmed.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L92))   ### 
sourceSizeW : number

  Width of the original sprite before it was trimmed.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L87))   ### 
spriteSourceSizeH : number

  Height of the trimmed sprite.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 116](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L116))   ### 
spriteSourceSizeW : number

  Width of the trimmed sprite.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L110))   ### 
spriteSourceSizeX : number

  X position of the trimmed sprite inside original sprite.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L98))   ### 
spriteSourceSizeY : number

  Y position of the trimmed sprite inside original sprite.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L104))   ### 
trimmed : boolean

  Was it trimmed when packed?

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L82))   ### 
width : number

  Width of the frame.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L39))   ### 
x : number

  X position within the image to cut from.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L29))   ### 
y : number

  Y position within the image to cut from.

   Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L34))    Public Methods
--------------

  ### 
clone() → {[Phaser.Frame](phaser.frame)}

  Clones this Frame into a new Phaser.Frame object and returns it.  
Note that all properties are cloned, including the name, index and UUID.

  ##### Returns

   [Phaser.Frame](phaser.frame) -   An exact copy of this Frame object.

    Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 183](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L183))   ### 
getRect(out) → {[Phaser.Rectangle](phaser.rectangle)}

  Returns a Rectangle set to the dimensions of this Frame.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `out` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | A rectangle to copy the frame dimensions to. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   A rectangle.

    Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 206](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L206))   ### 
resize(width, height)

  Adjusts of all the Frame properties based on the given width and height values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | integer | The new width of the Frame. |
| `height` | integer | The new height of the Frame. |

  Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L132))   ### 
setTrim(trimmed, actualWidth, actualHeight, destX, destY, destWidth, destHeight)

  If the frame was trimmed when added to the Texture Atlas this records the trim and source data.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `trimmed` | boolean | If this frame was trimmed or not. |
| `actualWidth` | number | The width of the frame before being trimmed. |
| `actualHeight` | number | The height of the frame before being trimmed. |
| `destX` | number | The destination X position of the trimmed frame for display. |
| `destY` | number | The destination Y position of the trimmed frame for display. |
| `destWidth` | number | The destination width of the trimmed frame for display. |
| `destHeight` | number | The destination height of the trimmed frame for display. |

  Source code: [animation/Frame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/animation/Frame.js#L153))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Frame.html>

Class: Phaser.Button
====================

 Constructor
-----------

 ### 
new Button(game, x, y, key, callback, callbackContext, overFrame, outFrame, downFrame, upFrame)

  Create a new `Button` object. A Button is a special type of Sprite that is set-up to handle Pointer events automatically.

 The four states a Button responds to are:

 * 'Over' - when the Pointer moves over the Button. This is also commonly known as 'hover'.
* 'Out' - when the Pointer that was previously over the Button moves out of it.
* 'Down' - when the Pointer is pressed down on the Button. I.e. touched on a touch enabled device or clicked with the mouse.
* 'Up' - when the Pointer that was pressed down on the Button is released again.

 A different texture/frame and activation sound can be specified for any of the states.

 Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | Current game instance. |
| `x` | number |  <optional> |  0  | X position of the Button. |
| `y` | number |  <optional> |  0  | Y position of the Button. |
| `key` | string |  <optional> |  | The image key (in the Game.Cache) to use as the texture for this Button. |
| `callback` | function |  <optional> |  | The function to call when this Button is pressed. |
| `callbackContext` | object |  <optional> |  | The context in which the callback will be called (usually 'this'). |
| `overFrame` | string | integer |  <optional> |  | The frame / frameName when the button is in the Over state. |
| `outFrame` | string | integer |  <optional> |  | The frame / frameName when the button is in the Out state. |
| `downFrame` | string | integer |  <optional> |  | The frame / frameName when the button is in the Down state. |
| `upFrame` | string | integer |  <optional> |  | The frame / frameName when the button is in the Up state. |

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L35))   Extends
-------

 * [Phaser.Image](phaser.image)

 Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
anchor :Point

  The anchor sets the origin point of the texture.  
The default is 0,0 this means the texture's origin is the top left  
Setting than anchor to 0.5,0.5 means the textures origin is centered  
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

   Inherited From * [PIXI.Sprite#anchor](pixi.sprite#anchor)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L17))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

 Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

   Inherited From * [PIXI.Sprite#blendMode](pixi.sprite#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L82))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
cropRect : [Phaser.Rectangle](phaser.rectangle)

  The Rectangle used to crop the texture this Game Object uses.  
Set this property via `crop`.  
If you modify this property directly you must call `updateCrop` in order to have the change take effect.

   Inherited From * [Phaser.Component.Crop#cropRect](phaser.component.crop#cropRect)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L24))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Sprite is processed by the core Phaser game loops and Group loops.

   Inherited From * [PIXI.Sprite#exists](pixi.sprite#exists)
 Default Value * true
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L103))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
forceOut : boolean | [Phaser.PointerMode](phaser.pointermode)

  When the Button is touched / clicked and then released you can force it to enter a state of "out" instead of "up".

 This can also accept a pointer mode bitmask for more refined control.

  ##### Type

 * boolean | [Phaser.PointerMode](phaser.pointermode)

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L199))   ### 
frame : integer

  Gets or sets the current frame index of the texture being used to render this Game Object.

 To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,  
for example: `player.frame = 4`.

 If the frame index given doesn't exist it will revert to the first frame found in the texture.

 If you are using a texture atlas then you should use the `frameName` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frame](phaser.component.loadtexture#frame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L254))   ### 
frameName : string

  Gets or sets the current frame name of the texture being used to render this Game Object.

 To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use,  
for example: `player.frameName = "idle"`.

 If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

 If you are using a sprite sheet then you should use the `frame` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frameName](phaser.component.loadtexture#frameName)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L279))   ### 
freezeFrames : boolean

  When true the the texture frame will not be automatically switched on up/down/over/out events.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 189](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L189))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
height : number

  The height of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#height](pixi.sprite#height)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L144))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Inherited From * [Phaser.Component.InputEnabled#input](phaser.component.inputenabled#input)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Inherited From * [Phaser.Component.InputEnabled#inputEnabled](phaser.component.inputenabled#inputEnabled)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   ### 
justReleasedPreventsOver : [Phaser.PointerMode](phaser.pointermode)

  Suppress the over event if a pointer was just released and it matches the given pointer mode bitmask.

 This behavior was introduced in Phaser 2.3.1; this property is a soft-revert of the change.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 182](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L182))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
[readonly] onDownSound : [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) | null

  The Sound to be played when this Buttons Down state is activated.

  ##### Type

 * [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) | null

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L105))   ### 
[readonly] onDownSoundMarker : string

  The Sound Marker used in conjunction with the onDownSound.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 133](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L133))   ### 
onInputDown : [Phaser.Signal](phaser.signal)

  The Signal (or event) dispatched when this Button is in an Down state.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 158](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L158))   ### 
onInputOut : [Phaser.Signal](phaser.signal)

  The Signal (or event) dispatched when this Button is in an Out state.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 152](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L152))   ### 
onInputOver : [Phaser.Signal](phaser.signal)

  The Signal (or event) dispatched when this Button is in an Over state.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L146))   ### 
onInputUp : [Phaser.Signal](phaser.signal)

  The Signal (or event) dispatched when this Button is in an Up state.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 164](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L164))   ### 
[readonly] onOutSound : [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) | null

  The Sound to be played when this Buttons Out state is activated.

  ##### Type

 * [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) | null

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L98))   ### 
[readonly] onOutSoundMarker : string

  The Sound Marker used in conjunction with the onOutSound.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 126](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L126))   ### 
onOverMouseOnly : boolean

  If true then onOver events (such as onOverSound) will only be triggered if the Pointer object causing them was the Mouse Pointer.  
The frame will still be changed as applicable.

   Default Value * true
 Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 173](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L173))   ### 
[readonly] onOverSound : [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) | null

  The Sound to be played when this Buttons Over state is activated.

  ##### Type

 * [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) | null

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L91))   ### 
[readonly] onOverSoundMarker : string

  The Sound Marker used in conjunction with the onOverSound.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L119))   ### 
[readonly] onUpSound : [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) | null

  The Sound to be played when this Buttons Up state is activated.

  ##### Type

 * [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) | null

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L112))   ### 
[readonly] onUpSoundMarker : string

  The Sound Marker used in conjunction with the onUpSound.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 140](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L140))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L56))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
scaleMax : [Phaser.Point](phaser.point)

  The maximum scale this Game Object will scale up to. 

 It allows you to prevent a parent from scaling this Game Object higher than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMax](phaser.component.scaleminmax#scaleMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L46))   ### 
scaleMin : [Phaser.Point](phaser.point)

  The minimum scale this Game Object will scale down to.

 It allows you to prevent a parent from scaling this Game Object lower than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMin](phaser.component.scaleminmax#scaleMin)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L36))   ### 
shader : [PIXI.AbstractFilter](pixi.abstractfilter)

  The shader that will be used to render this Sprite.  
Set to null to remove a current shader.

   Inherited From * [PIXI.Sprite#shader](pixi.sprite#shader)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L93))   ### 
smoothed : boolean

  Enable or disable texture smoothing for this Game Object.

 It only takes effect if the Game Object is using an image based texture.

 Smoothing is enabled by default.

   Inherited From * [Phaser.Component.Smoothed#smoothed](phaser.component.smoothed#smoothed)
 Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L25))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture that the sprite is using

   Inherited From * [PIXI.Sprite#texture](pixi.sprite#texture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L28))   ### 
tint : number

  The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

   Inherited From * [PIXI.Sprite#tint](pixi.sprite#tint)
 Default Value * 0xFFFFFF
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L54))   ### 
tintedTexture :Canvas

  A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

   Inherited From * [PIXI.Sprite#tintedTexture](pixi.sprite#tintedTexture)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L73))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
transformCallback : Function

  The callback that will apply any scale limiting to the worldTransform.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallback](phaser.component.scaleminmax#transformCallback)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L20))   ### 
transformCallbackContext : Object

  The context under which `transformCallback` is called.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallbackContext](phaser.component.scaleminmax#transformCallbackContext)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L26))   ### 
[readonly] type : number

  The Phaser Object Type.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L50))   ### 
width : number

  The width of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#width](pixi.sprite#width)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L125))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#bringToTop](phaser.component.bringtotop#bringToTop)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
clearFrames()

  Clears all of the frames set on this Button.

   Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 233](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L233))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
crop(rect, copy)

  Crop allows you to crop the texture being used to display this Game Object.  
Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

 Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,  
or by modifying `cropRect` property directly and then calling `updateCrop`.

 The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object  
so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

 A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`,  
in which case the values are duplicated to a local object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) |  |  | The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. |
| `copy` | boolean |  <optional> |  false  | If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect. |

  Inherited From * [Phaser.Component.Crop#crop](phaser.component.crop#crop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L49))   ### 
destroy(destroyChildren, destroyTexture)

  Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present  
and nulls its reference to `game`, freeing it up for garbage collection.

 If this Game Object has the Events component it will also dispatch the `onDestroy` event.

 You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called as well? |
| `destroyTexture` | boolean |  <optional> |  false  | Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Component.Destroy#destroy](phaser.component.destroy#destroy)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L37))   ### 
getBounds(matrix) → {Rectangle}

  Returns the bounds of the Sprite as a rectangle.  
The bounds calculation takes the worldTransform into account.

 It is important to note that the transform is not updated when you call this method.  
So if this Sprite is the child of a Display Object which has had its transform  
updated since the last render pass, those changes will not yet have been applied  
to this Sprites worldTransform. If you need to ensure that all parent transforms  
are factored into this getBounds operation then you should call `updateTransform`  
on the root most object in this Sprites display list first.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Matrix | the transformation matrix of the sprite |

 ##### Returns

   Rectangle -   the framing rectangle

    Inherited From * [PIXI.Sprite#getBounds](pixi.sprite#getBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L199))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.Sprite#getLocalBounds](pixi.sprite#getLocalBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L315))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
loadTexture(key, frame, stopAnimation)

  Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

 If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

 You should only use `loadTexture` if you want to replace the base texture entirely.

 Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

 You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite.  
Doing this then sets the key to be the `frame` argument (the frame is set to zero). 

 This allows you to create sprites using `load.image` during development, and then change them  
to use a Texture Atlas later in development by simply searching your code for 'PENDING\_ATLAS'  
and swapping it to be the key of the atlas data.

 Note: You cannot use a RenderTexture as a texture for a TileSprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `stopAnimation` | boolean |  <optional> |  true  | If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. |

  Inherited From * [Phaser.Component.LoadTexture#loadTexture](phaser.component.loadtexture#loadTexture)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L51))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveDown](phaser.component.bringtotop#moveDown)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveUp](phaser.component.bringtotop#moveUp)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
<internal> onInputDownHandler(sprite, pointer)

  Internal function that handles input events.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sprite` | [Phaser.Button](phaser.button) | The Button that the event occurred on. |
| `pointer` | [Phaser.Pointer](phaser.pointer) | The Pointer that activated the Button. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 531](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L531))   ### 
<internal> onInputOutHandler(sprite, pointer)

  Internal function that handles input events.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sprite` | [Phaser.Button](phaser.button) | The Button that the event occurred on. |
| `pointer` | [Phaser.Pointer](phaser.pointer) | The Pointer that activated the Button. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 511](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L511))   ### 
<internal> onInputOverHandler(sprite, pointer)

  Internal function that handles input events.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sprite` | [Phaser.Button](phaser.button) | The Button that the event occurred on. |
| `pointer` | [Phaser.Pointer](phaser.pointer) | The Pointer that activated the Button. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 478](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L478))   ### 
<internal> onInputUpHandler(sprite, pointer)

  Internal function that handles input events.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sprite` | [Phaser.Button](phaser.button) | The Button that the event occurred on. |
| `pointer` | [Phaser.Pointer](phaser.pointer) | The Pointer that activated the Button. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 551](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L551))   ### 
overlap(displayObject) → {boolean}

  Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,  
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

 This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

 Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.  
It should be fine for low-volume testing where physics isn't required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Button](phaser.button) | PIXI.DisplayObject | The display object to check against. |

 ##### Returns

   boolean -   True if the bounds of this Game Object intersects at any point with the bounds of the given display object.

    Inherited From * [Phaser.Component.Overlap#overlap](phaser.component.overlap#overlap)
 Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L29))   ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays an Animation.

 The animation should have previously been created via `animations.add`.

 If the animation is already playing calling this again won't do anything.  
If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'. |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation.

    Inherited From * [Phaser.Component.Animation#play](phaser.component.animation#play)
 Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L31))   ### 
<internal> postUpdate()

  Internal method called by the World postUpdate cycle.

   Inherited From * [Phaser.Component.Core#postUpdate](phaser.component.core#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L338))   ### 
preUpdate()

  Automatically called by World.preUpdate.

   Inherited From * [Phaser.Image#preUpdate](phaser.image#preUpdate)
 Source code: [gameobjects/Image.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Image.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Image.js#L79))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
<internal> removedFromWorld()

  Called when this Button is removed from the World.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 244](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L244))   ### 
reset(x, y, health) → {PIXI.DisplayObject}

  Resets the Game Object.

 This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`,  
`visible` and `renderable` to true.

 If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

 If this Game Object has a Physics Body it will reset the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Game Object at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Game Object at. |
| `health` | number |  <optional> |  1  | The health to give the Game Object if it has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.Reset#reset](phaser.component.reset#reset)
 Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L30))   ### 
resetFrame()

  Resets the texture frame dimensions that the Game Object uses for rendering.

   Inherited From * [Phaser.Component.LoadTexture#resetFrame](phaser.component.loadtexture#resetFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L232))   ### 
resizeFrame(parent, width, height)

  Resizes the Frame dimensions that the Game Object uses for rendering.

 You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData  
it can be useful to adjust the dimensions directly in this way.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | object | The parent texture object that caused the resize, i.e. a Phaser.Video object. |
| `width` | integer | The new width of the texture. |
| `height` | integer | The new height of the texture. |

  Inherited From * [Phaser.Component.LoadTexture#resizeFrame](phaser.component.loadtexture#resizeFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L220))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#sendToBack](phaser.component.bringtotop#sendToBack)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setDownSound(sound, marker)

  The Sound to be played when a Pointer presses down on this Button.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sound` | [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) |  | The Sound that will be played. |
| `marker` | string |  <optional> | A Sound Marker that will be used in the playback. |

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 450](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L450))   ### 
setFrame(frame)

  Sets the texture frame the Game Object uses for rendering.

 This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The Frame to be used by the texture. |

  Inherited From * [Phaser.Component.LoadTexture#setFrame](phaser.component.loadtexture#setFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L155))   ### 
setFrames(overFrame, outFrame, downFrame, upFrame)

  Used to manually set the frames that will be used for the different states of the Button.

 Frames can be specified as either an integer (the frame ID) or a string (the frame name); these are the same values that can be used with a Sprite constructor.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `overFrame` | string | integer |  <optional> | The frame / frameName when the button is in the Over state. |
| `outFrame` | string | integer |  <optional> | The frame / frameName when the button is in the Out state. |
| `downFrame` | string | integer |  <optional> | The frame / frameName when the button is in the Down state. |
| `upFrame` | string | integer |  <optional> | The frame / frameName when the button is in the Up state. |

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 320](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L320))   ### 
setOutSound(sound, marker)

  The Sound to be played when a Pointer moves out of this Button.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sound` | [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) |  | The Sound that will be played. |
| `marker` | string |  <optional> | A Sound Marker that will be used in the playback. |

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 436](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L436))   ### 
setOverSound(sound, marker)

  The Sound to be played when a Pointer moves over this Button.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sound` | [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) |  | The Sound that will be played. |
| `marker` | string |  <optional> | A Sound Marker that will be used in the playback. |

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 422](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L422))   ### 
setScaleMinMax(minX, minY, maxX, maxY)

  Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

 For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored  
and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

 By setting these values you can carefully control how Game Objects deal with responsive scaling.

 If only one parameter is given then that value will be used for both scaleMin and scaleMax:  
`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

 If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:  
`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

 If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly,  
or pass `null` for the `maxX` and `maxY` parameters.

 Call `setScaleMinMax(null)` to clear all previously set values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `minX` | number | null | The minimum horizontal scale value this Game Object can scale down to. |
| `minY` | number | null | The minimum vertical scale value this Game Object can scale down to. |
| `maxX` | number | null | The maximum horizontal scale value this Game Object can scale up to. |
| `maxY` | number | null | The maximum vertical scale value this Game Object can scale up to. |

  Inherited From * [Phaser.Component.ScaleMinMax#setScaleMinMax](phaser.component.scaleminmax#setScaleMinMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L110))   ### 
setSounds(overSound, overMarker, downSound, downMarker, outSound, outMarker, upSound, upMarker)

  Sets the sounds to be played whenever this Button is interacted with. Sounds can be either full Sound objects, or markers pointing to a section of a Sound object.  
The most common forms of sounds are 'hover' effects and 'click' effects, which is why the order of the parameters is overSound then downSound.

 Call this function with no parameters to reset all sounds on this Button.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `overSound` | [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) |  <optional> | Over Button Sound. |
| `overMarker` | string |  <optional> | Over Button Sound Marker. |
| `downSound` | [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) |  <optional> | Down Button Sound. |
| `downMarker` | string |  <optional> | Down Button Sound Marker. |
| `outSound` | [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) |  <optional> | Out Button Sound. |
| `outMarker` | string |  <optional> | Out Button Sound Marker. |
| `upSound` | [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) |  <optional> | Up Button Sound. |
| `upMarker` | string |  <optional> | Up Button Sound Marker. |

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 396](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L396))   ### 
setTexture(texture, destroy)

  Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous  
texture this Sprite was using.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) |  |  | The PIXI texture that is displayed by the sprite |
| `destroy` | Boolean |  <optional> |  false  | Call Texture.destroy on the current texture before replacing it with the new one? |

  Inherited From * [PIXI.Sprite#setTexture](pixi.sprite#setTexture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L163))   ### 
setUpSound(sound, marker)

  The Sound to be played when a Pointer has pressed down and is released from this Button.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sound` | [Phaser.Sound](phaser.sound) | [Phaser.AudioSprite](phaser.audiosprite) |  | The Sound that will be played. |
| `marker` | string |  <optional> | A Sound Marker that will be used in the playback. |

  Source code: [gameobjects/Button.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js) ([Line 464](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Button.js#L464))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Override this method in your own custom objects to handle any update requirements.  
It is called immediately after `preUpdate` and before `postUpdate`.  
Remember if this Game Object has any children you should call update on those too.

   Inherited From * [Phaser.Component.Core#update](phaser.component.core#update)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L328))   ### 
updateCrop()

  If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,  
or the rectangle it references, then you need to update the crop frame by calling this method.

   Inherited From * [Phaser.Component.Crop#updateCrop](phaser.component.crop#updateCrop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L86))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Button.html>

Class: Phaser.Graphics
======================

 Constructor
-----------

 ### 
new Graphics(game, x, y)

  A Graphics object is a way to draw primitives to your game. Primitives include forms of geometry, such as Rectangles,  
Circles and Polygons. They also include lines, arcs and curves. When you initially create a Graphics object it will  
be empty. To 'draw' to it you first specify a lineStyle or fillStyle (or both), and then draw a shape. For example:

 
```
graphics.beginFill(0xff0000);
graphics.drawCircle(50, 50, 100);
graphics.endFill();
```

This will draw a circle shape to the Graphics object, with a diameter of 100, located at x: 50, y: 50.

 When a Graphics object is rendered it will render differently based on if the game is running under Canvas or  
WebGL. Under Canvas it will use the HTML Canvas context drawing operations to draw the path. Under WebGL the  
graphics data is decomposed into polygons. Both of these are expensive processes, especially with complex shapes.

 If your Graphics object doesn't change much (or at all) once you've drawn your shape to it, then you will help  
performance by calling `Graphics.generateTexture`. This will 'bake' the Graphics object into a Texture, and return it.  
You can then use this Texture for Sprites or other display objects. If your Graphics object updates frequently then  
you should avoid doing this, as it will constantly generate new textures, which will consume memory.

 As you can tell, Graphics objects are a bit of a trade-off. While they are extremely useful, you need to be careful  
in their complexity and quantity of them in your game.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | Current game instance. |
| `x` | number |  <optional> |  0  | X position of the new graphics object. |
| `y` | number |  <optional> |  0  | Y position of the new graphics object. |

  Source code: [gameobjects/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js#L50))   Extends
-------

 * [PIXI.Graphics](pixi.graphics)
* [Phaser.Component.Core](phaser.component.core)
* [Phaser.Component.Angle](phaser.component.angle)
* [Phaser.Component.AutoCull](phaser.component.autocull)
* [Phaser.Component.Bounds](phaser.component.bounds)
* [Phaser.Component.Destroy](phaser.component.destroy)
* [Phaser.Component.FixedToCamera](phaser.component.fixedtocamera)
* [Phaser.Component.InputEnabled](phaser.component.inputenabled)
* [Phaser.Component.InWorld](phaser.component.inworld)
* [Phaser.Component.LifeSpan](phaser.component.lifespan)
* [Phaser.Component.PhysicsBody](phaser.component.physicsbody)
* [Phaser.Component.Reset](phaser.component.reset)

 Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
blendMode : number

  The blend mode to be applied to the graphic shape. Apply a value of PIXI.blendModes.NORMAL to reset the blend mode.

   Inherited From * [PIXI.Graphics#blendMode](pixi.graphics#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L61))   ### 
body : [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated  
properties and methods via it.

 By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

 To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object  
and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

 You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

 Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5,  
so the physics body is centered on the Game Object.

 If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  ##### Type

 * [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  Inherited From * [Phaser.Component.PhysicsBody#body](phaser.component.physicsbody#body)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L91))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
boundsPadding : number

  The bounds' padding used for bounds calculation.

   Inherited From * [PIXI.Graphics#boundsPadding](pixi.graphics#boundsPadding)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 96](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L96))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
checkWorldBounds : boolean

  If this is set to `true` the Game Object checks if it is within the World bounds each frame. 

 When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

 If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

 It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

 When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.InWorld#checkWorldBounds](phaser.component.inworld#checkWorldBounds)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L98))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Game Object is processed by the core game loop.  
If this Game Object has a physics body it also controls if its physics body is updated or not.  
When `exists` is set to `false` it will remove its physics body from the physics world if it has one.  
It also toggles the `visible` property to false as well.

 Setting `exists` to true will add its physics body back in to the physics world, if it has one.  
It will also set the `visible` property to `true`.

   Inherited From * [Phaser.Component.Core#exists](phaser.component.core#exists)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L284))   ### 
fillAlpha : number

  The alpha value used when filling the Graphics object.

   Inherited From * [PIXI.Graphics#fillAlpha](pixi.graphics#fillAlpha)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 18](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L18))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Inherited From * [Phaser.Component.InputEnabled#input](phaser.component.inputenabled#input)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Inherited From * [Phaser.Component.InputEnabled#inputEnabled](phaser.component.inputenabled#inputEnabled)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   ### 
[readonly] inWorld : boolean

  Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

   Inherited From * [Phaser.Component.InWorld#inWorld](phaser.component.inworld#inWorld)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L129))   ### 
isMask : boolean

  Whether this shape is being used as a mask.

   Inherited From * [PIXI.Graphics#isMask](pixi.graphics#isMask)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 88](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L88))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
lineColor : string

  The color of any lines drawn.

   Inherited From * [PIXI.Graphics#lineColor](pixi.graphics#lineColor)
 Default Value * 0
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L34))   ### 
lineWidth : number

  The width (thickness) of any lines drawn.

   Inherited From * [PIXI.Graphics#lineWidth](pixi.graphics#lineWidth)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L26))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
outOfBoundsKill : boolean

  If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

   Inherited From * [Phaser.Component.InWorld#outOfBoundsKill](phaser.component.inworld#outOfBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L106))   ### 
outOfCameraBoundsKill : boolean

  If this and the `autoCull` property are both set to `true`, then the `kill` method  
is called as soon as the Game Object leaves the camera bounds.

   Inherited From * [Phaser.Component.InWorld#outOfCameraBoundsKill](phaser.component.inworld#outOfCameraBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L115))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Source code: [gameobjects/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js#L65))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
tint : number

  The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to reset the tint.

   Inherited From * [PIXI.Graphics#tint](pixi.graphics#tint)
 Default Value * 0xFFFFFF
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L52))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
type : number

  The const type of this object.

   Source code: [gameobjects/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js#L59))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
x : number

  The position of the Game Object on the x axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#x](phaser.component.physicsbody#x)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L98))   ### 
y : number

  The position of the Game Object on the y axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#y](phaser.component.physicsbody#y)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L124))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
arc(cx, cy, radius, startAngle, endAngle, anticlockwise, segments) → {[PIXI.Graphics](pixi.graphics)}

  The arc method creates an arc/curve (used to create circles, or parts of circles).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `cx` | Number | The x-coordinate of the center of the circle |
| `cy` | Number | The y-coordinate of the center of the circle |
| `radius` | Number | The radius of the circle |
| `startAngle` | Number | The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle) |
| `endAngle` | Number | The ending angle, in radians |
| `anticlockwise` | Boolean | Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise. |
| `segments` | Number | Optional. The number of segments to use when calculating the arc. The default is 40. If you need more fidelity use a higher number. |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#arc](pixi.graphics#arc)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 405](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L405))   ### 
beginFill(color, alpha) → {[PIXI.Graphics](pixi.graphics)}

  Specifies a simple one-color fill that subsequent calls to other Graphics methods  
(such as lineTo() or drawCircle()) use when drawing.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | Number | the color of the fill |
| `alpha` | Number | the alpha of the fill |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#beginFill](pixi.graphics#beginFill)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 491](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L491))   ### 
bezierCurveTo(cpX, cpY, cpX2, cpY2, toX, toY) → {[PIXI.Graphics](pixi.graphics)}

  Calculate the points for a bezier curve and then draws it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `cpX` | Number | Control point x |
| `cpY` | Number | Control point y |
| `cpX2` | Number | Second Control point x |
| `cpY2` | Number | Second Control point y |
| `toX` | Number | Destination point x |
| `toY` | Number | Destination point y |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#bezierCurveTo](pixi.graphics#bezierCurveTo)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 276](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L276))   ### 
clear() → {[PIXI.Graphics](pixi.graphics)}

  Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.

  ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#clear](pixi.graphics#clear)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 633](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L633))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
destroy(destroyChildren)

  Destroy this Graphics instance.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called? |

  Source code: [gameobjects/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js) ([Line 139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js#L139))   ### 
destroyCachedSprite()

  Destroys a previous cached sprite.

   Inherited From * [PIXI.Graphics#destroyCachedSprite](pixi.graphics#destroyCachedSprite)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 1173](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L1173))   ### 
drawCircle(x, y, diameter) → {[PIXI.Graphics](pixi.graphics)}

  Draws a circle.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | The X coordinate of the center of the circle |
| `y` | Number | The Y coordinate of the center of the circle |
| `diameter` | Number | The diameter of the circle |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#drawCircle](pixi.graphics#drawCircle)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 565](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L565))   ### 
drawEllipse(x, y, width, height) → {[PIXI.Graphics](pixi.graphics)}

  Draws an ellipse.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | The X coordinate of the center of the ellipse |
| `y` | Number | The Y coordinate of the center of the ellipse |
| `width` | Number | The half width of the ellipse |
| `height` | Number | The half height of the ellipse |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#drawEllipse](pixi.graphics#drawEllipse)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 581](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L581))   ### 
drawPolygon(path) → {[PIXI.Graphics](pixi.graphics)}

  Draws a polygon using the given path.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `path` | Array | PhaserPolygon | The path data used to construct the polygon. Can either be an array of points or a Phaser.Polygon object. |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#drawPolygon](pixi.graphics#drawPolygon)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 598](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L598))   ### 
drawRect(x, y, width, height) → {[PIXI.Graphics](pixi.graphics)}

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | The X coord of the top-left of the rectangle |
| `y` | Number | The Y coord of the top-left of the rectangle |
| `width` | Number | The width of the rectangle |
| `height` | Number | The height of the rectangle |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#drawRect](pixi.graphics#drawRect)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 534](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L534))   ### 
drawRoundedRect(x, y, width, height, radius)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | The X coord of the top-left of the rectangle |
| `y` | Number | The Y coord of the top-left of the rectangle |
| `width` | Number | The width of the rectangle |
| `height` | Number | The height of the rectangle |
| `radius` | Number | Radius of the rectangle corners. In WebGL this must be a value between 0 and 9. |

  Inherited From * [PIXI.Graphics#drawRoundedRect](pixi.graphics#drawRoundedRect)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 550](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L550))   ### 
drawShape(shape) → {[PIXI.GraphicsData](pixi.graphicsdata)}

  Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `shape` | Circle | Rectangle | Ellipse | Line | Polygon | The Shape object to draw. |

 ##### Returns

   [PIXI.GraphicsData](pixi.graphicsdata) -   The generated GraphicsData object.

    Inherited From * [PIXI.Graphics#drawShape](pixi.graphics#drawShape)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 1184](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L1184))   ### 
endFill() → {[PIXI.Graphics](pixi.graphics)}

  Applies a fill to the lines and shapes that were added since the last call to the beginFill() method.

  ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#endFill](pixi.graphics#endFill)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 519](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L519))   ### 
generateTexture(resolution, scaleMode, padding) → {[PIXI.Texture](pixi.texture)}

  Useful function that returns a texture of the graphics object that can then be used to create sprites  
This can be quite useful if your geometry is complicated and needs to be reused multiple times.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `resolution` | Number |  <optional> |  1  | The resolution of the texture being generated |
| `scaleMode` | Number |  <optional> |  0  | Should be one of the PIXI.scaleMode consts |
| `padding` | Number |  <optional> |  0  | Add optional extra padding to the generated texture (default 0) |

 ##### Returns

   [PIXI.Texture](pixi.texture) -   a texture of the graphics object

    Inherited From * [PIXI.Graphics#generateTexture](pixi.graphics#generateTexture)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 654](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L654))   ### 
getBounds() → {Rectangle}

  Retrieves the bounds of the graphic shape as a rectangle object

  ##### Returns

   Rectangle -   the rectangular bounding area

    Inherited From * [PIXI.Graphics#getBounds](pixi.graphics#getBounds)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 848](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L848))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the graphic shape as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.Graphics#getLocalBounds](pixi.graphics#getLocalBounds)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 936](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L936))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
lineStyle(lineWidth, color, alpha) → {[PIXI.Graphics](pixi.graphics)}

  Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `lineWidth` | Number | width of the line to draw, will update the objects stored style |
| `color` | Number | color of the line to draw, will update the objects stored style |
| `alpha` | Number | alpha of the line to draw, will update the objects stored style |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#lineStyle](pixi.graphics#lineStyle)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L149))   ### 
lineTo(x, y) → {[PIXI.Graphics](pixi.graphics)}

  Draws a line using the current line style from the current drawing position to (x, y);  
The current drawing position is then set to (x, y).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | the X coordinate to draw to |
| `y` | Number | the Y coordinate to draw to |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#lineTo](pixi.graphics#lineTo)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L198))   ### 
moveTo(x, y) → {[PIXI.Graphics](pixi.graphics)}

  Moves the current drawing position to x, y.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | the X coordinate to move to |
| `y` | Number | the Y coordinate to move to |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#moveTo](pixi.graphics#moveTo)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 183](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L183))   ### 
postUpdate()

  Automatically called by World

   Source code: [gameobjects/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js) ([Line 117](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js#L117))   ### 
preUpdate()

  Automatically called by World.preUpdate.

   Source code: [gameobjects/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Graphics.js#L106))   ### 
quadraticCurveTo(cpX, cpY, toX, toY) → {[PIXI.Graphics](pixi.graphics)}

  Calculate the points for a quadratic bezier curve and then draws it.  
Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `cpX` | Number | Control point x |
| `cpY` | Number | Control point y |
| `toX` | Number | Destination point x |
| `toY` | Number | Destination point y |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Inherited From * [PIXI.Graphics#quadraticCurveTo](pixi.graphics#quadraticCurveTo)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L221))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
reset(x, y, health) → {PIXI.DisplayObject}

  Resets the Game Object.

 This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`,  
`visible` and `renderable` to true.

 If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

 If this Game Object has a Physics Body it will reset the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Game Object at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Game Object at. |
| `health` | number |  <optional> |  1  | The health to give the Game Object if it has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.Reset#reset](phaser.component.reset#reset)
 Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L30))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Override this method in your own custom objects to handle any update requirements.  
It is called immediately after `preUpdate` and before `postUpdate`.  
Remember if this Game Object has any children you should call update on those too.

   Inherited From * [Phaser.Component.Core#update](phaser.component.core#update)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L328))   ### 
updateLocalBounds()

  Update the bounds of the object

   Inherited From * [PIXI.Graphics#updateLocalBounds](pixi.graphics#updateLocalBounds)
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 997](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L997))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Graphics.html>

Class: Phaser.Ellipse
=====================

 Constructor
-----------

 ### 
new Ellipse(x, y, width, height)

  Creates a Ellipse object. A curve on a plane surrounding two focal points.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The X coordinate of the upper-left corner of the framing rectangle of this ellipse. |
| `y` | number |  <optional> |  0  | The Y coordinate of the upper-left corner of the framing rectangle of this ellipse. |
| `width` | number |  <optional> |  0  | The overall width of this ellipse. |
| `height` | number |  <optional> |  0  | The overall height of this ellipse. |

  Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 18](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L18))   Public Properties
-----------------

  ### 
bottom : number

  The sum of the y and height properties. Changing the bottom property of an Ellipse doesn't adjust the y property, but does change the height. Gets or sets the bottom of the ellipse.

   Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 251](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L251))   ### 
empty : boolean

  Determines whether or not this Ellipse object is empty. Will return a value of true if the Ellipse objects dimensions are less than or equal to 0; otherwise false.  
If set to true it will reset all of the Ellipse objects properties to 0. An Ellipse object is empty if its width or height is less than or equal to 0. Gets or sets the empty state of the ellipse.

   Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 276](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L276))   ### 
height : number

  The overall height of this ellipse.

   Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L43))   ### 
left

  The left coordinate of the Ellipse. The same as the X coordinate.

   Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 190](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L190))   ### 
right : number

  The x coordinate of the rightmost point of the Ellipse. Changing the right property of an Ellipse object has no effect on the x property, but does adjust the width. Gets or sets the value of the rightmost point of the ellipse.

   Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 209](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L209))   ### 
top : number

  The top of the Ellipse. The same as its y property. Gets or sets the top of the ellipse.

   Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 234](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L234))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L49))   ### 
width : number

  The overall width of this ellipse.

   Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L38))   ### 
x : number

  The X coordinate of the upper-left corner of the framing rectangle of this ellipse.

   Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L28))   ### 
y : number

  The Y coordinate of the upper-left corner of the framing rectangle of this ellipse.

   Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L33))    Public Methods
--------------

  ### 
<static> contains(a, x, y) → {boolean}

  Return true if the given x/y coordinates are within the Ellipse object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Ellipse](phaser.ellipse) | The Ellipse to be checked. |
| `x` | number | The X value of the coordinate to test. |
| `y` | number | The Y value of the coordinate to test. |

 ##### Returns

   boolean -   True if the coordinates are within this ellipse, otherwise false.

    Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 299](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L299))   ### 
clone(output) → {[Phaser.Ellipse](phaser.ellipse)}

  Returns a new Ellipse object with the same values for the x, y, width, and height properties as this Ellipse object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `output` | [Phaser.Ellipse](phaser.ellipse) | Optional Ellipse object. If given the values will be set into the object, otherwise a brand new Ellipse object will be created and returned. |

 ##### Returns

   [Phaser.Ellipse](phaser.ellipse) -   The cloned Ellipse object.

    Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 117](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L117))   ### 
contains(x, y) → {boolean}

  Return true if the given x/y coordinates are within this Ellipse object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The X value of the coordinate to test. |
| `y` | number | The Y value of the coordinate to test. |

 ##### Returns

   boolean -   True if the coordinates are within this ellipse, otherwise false.

    Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L138))   ### 
copyFrom(source) → {[Phaser.Ellipse](phaser.ellipse)}

  Copies the x, y, width and height properties from any given object to this Ellipse.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `source` | any | The object to copy from. |

 ##### Returns

   [Phaser.Ellipse](phaser.ellipse) -   This Ellipse object.

    Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L87))   ### 
copyTo(dest) → {object}

  Copies the x, y, width and height properties from this Ellipse to any given object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `dest` | any | The object to copy to. |

 ##### Returns

   object -   This dest object.

    Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L100))   ### 
getBounds() → {[Phaser.Rectangle](phaser.rectangle)}

  Returns the framing rectangle of the ellipse as a Phaser.Rectangle object.

  ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   The bounds of the Ellipse.

    Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L75))   ### 
random(out) → {[Phaser.Point](phaser.point)}

  Returns a uniformly distributed random point from anywhere within this Ellipse.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `out` | [Phaser.Point](phaser.point) | object |  <optional> | A Phaser.Point, or any object with public x/y properties, that the values will be set in. If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an existing object. |

 ##### Returns

   [Phaser.Point](phaser.point) -   An object containing the random point in its `x` and `y` properties.

    Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 152](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L152))   ### 
setTo(x, y, width, height) → {[Phaser.Ellipse](phaser.ellipse)}

  Sets the members of the Ellipse to the specified values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The X coordinate of the upper-left corner of the framing rectangle of this ellipse. |
| `y` | number | The Y coordinate of the upper-left corner of the framing rectangle of this ellipse. |
| `width` | number | The overall width of this ellipse. |
| `height` | number | The overall height of this ellipse. |

 ##### Returns

   [Phaser.Ellipse](phaser.ellipse) -   This Ellipse object.

    Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L55))   ### 
toString() → {string}

  Returns a string representation of this object.

  ##### Returns

   string -   A string representation of the instance.

    Source code: [geom/Ellipse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Ellipse.js#L177))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Ellipse.html>

Class: Phaser.Polygon
=====================

 Constructor
-----------

 ### 
new Polygon(points)

  Creates a new Polygon.

 The points can be set from a variety of formats:

 * An array of Point objects: `[new Phaser.Point(x1, y1), ...]`
* An array of objects with public x/y properties: `[obj1, obj2, ...]`
* An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`
* As separate Point arguments: `setTo(new Phaser.Point(x1, y1), ...)`
* As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)`
* As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)`

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `points` | Array.<[Phaser.Point](phaser.point)> | Array.<number> | [Phaser.Point](phaser.point) | number | The points to set. |

  Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L24))   Public Properties
-----------------

  ### 
area : number

  The area of this Polygon.

   Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L29))   ### 
closed : boolean

  Is the Polygon closed or not?

   Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L45))   ### 
flattened : boolean

  Has this Polygon been flattened by a call to `Polygon.flatten` ?

   Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L50))   ### 
points : Array.<[Phaser.Point](phaser.point)>

  This method is *deprecated* and should not be used. It may be removed in the future.   Sets and modifies the points of this polygon.

 See [setTo](phaser.polygon#setTo) for the different kinds of arrays formats that can be assigned. The array of vertex points.

  ##### Type

 * Array.<[Phaser.Point](phaser.point)>

  Deprecated: * Use `setTo`.
 Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 294](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L294))   ### 
type : number

  The base object type.

   Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L55))    Public Methods
--------------

  ### 
clone(output) → {[Phaser.Polygon](phaser.polygon)}

  Creates a copy of the given Polygon.  
This is a deep clone, the resulting copy contains new Phaser.Point objects

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `output` | [Phaser.Polygon](phaser.polygon) |  <optional> |  (new Polygon)  | The polygon to update. If not specified a new polygon will be created. |

 ##### Returns

   [Phaser.Polygon](phaser.polygon) -   The cloned (`output`) polygon object.

    Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L109))   ### 
contains(x, y) → {boolean}

  Checks whether the x and y coordinates are contained within this polygon.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The X value of the coordinate to test. |
| `y` | number | The Y value of the coordinate to test. |

 ##### Returns

   boolean -   True if the coordinates are within this polygon, otherwise false.

    Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 134](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L134))   ### 
flatten() → {[Phaser.Polygon](phaser.polygon)}

  Flattens this Polygon so the points are a sequence of numbers.  
Any Point objects found are removed and replaced with two numbers.  
Also sets the Polygon.flattened property to `true`.

  ##### Returns

   [Phaser.Polygon](phaser.polygon) -   This Polygon object

    Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L91))   ### 
setTo(points) → {[Phaser.Polygon](phaser.polygon)}

  Sets this Polygon to the given points.

 The points can be set from a variety of formats:

 * An array of Point objects: `[new Phaser.Point(x1, y1), ...]`
* An array of objects with public x/y properties: `[obj1, obj2, ...]`
* An array of paired numbers that represent point coordinates: `[x1,y1, x2,y2, ...]`
* An array of arrays with two elements representing x/y coordinates: `[[x1, y1], [x2, y2], ...]`
* As separate Point arguments: `setTo(new Phaser.Point(x1, y1), ...)`
* As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)`
* As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)`

 `setTo` may also be called without any arguments to remove all points.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `points` | Array.<[Phaser.Point](phaser.point)> | Array.<number> | [Phaser.Point](phaser.point) | number | The points to set. |

 ##### Returns

   [Phaser.Polygon](phaser.polygon) -   This Polygon object

    Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L186))   ### 
toNumberArray(output) → {array}

  Export the points as an array of flat numbers, following the sequence [ x,y, x,y, x,y ]

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `output` | array |  <optional> | The array to append the points to. If not specified a new array will be created. |

 ##### Returns

   array -   The flattened array.

    Source code: [geom/Polygon.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Polygon.js#L61))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Polygon.html>

Class: Phaser.RoundedRectangle
==============================

 Constructor
-----------

 ### 
new RoundedRectangle(x, y, width, height, radius)

  The Rounded Rectangle object is an area defined by its position and has nice rounded corners,  
as indicated by its top-left corner point (x, y) and by its width and its height.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate of the top-left corner of the Rectangle. |
| `y` | number |  <optional> |  0  | The y coordinate of the top-left corner of the Rectangle. |
| `width` | number |  <optional> |  0  | The width of the Rectangle. Should always be either zero or a positive value. |
| `height` | number |  <optional> |  0  | The height of the Rectangle. Should always be either zero or a positive value. |
| `radius` | number |  <optional> |  20  | Controls the radius of the rounded corners. |

  Source code: [geom/RoundedRectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js#L20))   Public Properties
-----------------

  ### 
height : number

  The height of the Rectangle. This value should never be set to a negative.

   Source code: [geom/RoundedRectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js#L46))   ### 
radius : number

  The radius of the rounded corners.

   Source code: [geom/RoundedRectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js#L51))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [geom/RoundedRectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js#L57))   ### 
width : number

  The width of the Rectangle. This value should never be set to a negative.

   Source code: [geom/RoundedRectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js) ([Line 41](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js#L41))   ### 
x : number

  The x coordinate of the top-left corner of the Rectangle.

   Source code: [geom/RoundedRectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js#L31))   ### 
y : number

  The y coordinate of the top-left corner of the Rectangle.

   Source code: [geom/RoundedRectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js#L36))    Public Methods
--------------

  ### 
clone() → {[Phaser.RoundedRectangle](phaser.roundedrectangle)}

  Returns a new RoundedRectangle object with the same values for the x, y, width, height and  
radius properties as this RoundedRectangle object.

  ##### Returns

   [Phaser.RoundedRectangle](phaser.roundedrectangle) -    Source code: [geom/RoundedRectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js) ([Line 62](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js#L62))   ### 
contains(x, y) → {boolean}

  Determines whether the specified coordinates are contained within the region defined by this Rounded Rectangle object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate of the point to test. |
| `y` | number | The y coordinate of the point to test. |

 ##### Returns

   boolean -   A value of true if the RoundedRectangle Rectangle object contains the specified point; otherwise false.

    Source code: [geom/RoundedRectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/RoundedRectangle.js#L75))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.RoundedRectangle.html>

Class: Phaser.BitmapText
========================

 Constructor
-----------

 ### 
new BitmapText(game, x, y, font, text, size, align)

  BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.  
It then generates a new Sprite object for each letter of the text, proportionally spaced out and aligned to  
match the font structure.

 BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability  
to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by  
processing the font texture in an image editor, applying fills and any other effects required.

 To create multi-line text insert \r, \n or \r\n escape codes into the text string.

 If you are having performance issues due to the volume of sprites being rendered, and do not require the text to be constantly  
updating, you can use BitmapText.generateTexture to create a static texture from this BitmapText.

 To create a BitmapText data files you can use:

 BMFont (Windows, free): http://www.angelcode.com/products/bmfont/  
Glyph Designer (OS X, commercial): http://www.71squared.com/en/glyphdesigner  
Littera (Web-based, free): http://kvazars.com/littera/

 For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of  
converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: http://codebeautify.org/xmltojson

 If you were using an older version of Phaser (< 2.4) and using the DOMish parser hack, please remove this. It isn't required any longer.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `x` | number |  |  | X coordinate to display the BitmapText object at. |
| `y` | number |  |  | Y coordinate to display the BitmapText object at. |
| `font` | string |  |  | The key of the BitmapText as stored in Phaser.Cache. |
| `text` | string |  <optional> |  ''  | The text that will be rendered. This can also be set later via BitmapText.text. |
| `size` | number |  <optional> |  32  | The size the font will be rendered at in pixels. |
| `align` | string |  <optional> |  'left'  | The alignment of multi-line text. Has no effect if there is only one line of text. |

  Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L54))   Extends
-------

 * [PIXI.DisplayObjectContainer](pixi.displayobjectcontainer)
* [Phaser.Component.Core](phaser.component.core)
* [Phaser.Component.Angle](phaser.component.angle)
* [Phaser.Component.AutoCull](phaser.component.autocull)
* [Phaser.Component.Bounds](phaser.component.bounds)
* [Phaser.Component.Destroy](phaser.component.destroy)
* [Phaser.Component.FixedToCamera](phaser.component.fixedtocamera)
* [Phaser.Component.InputEnabled](phaser.component.inputenabled)
* [Phaser.Component.InWorld](phaser.component.inworld)
* [Phaser.Component.LifeSpan](phaser.component.lifespan)
* [Phaser.Component.PhysicsBody](phaser.component.physicsbody)
* [Phaser.Component.Reset](phaser.component.reset)

 Public Properties
-----------------

  ### 
align : string

  Alignment for multi-line text ('left', 'center' or 'right'), does not affect single lines of text.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 535](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L535))   ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
anchor : [Phaser.Point](phaser.point)

  The anchor value of this BitmapText.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L92))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
body : [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated  
properties and methods via it.

 By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

 To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object  
and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

 You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

 Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5,  
so the physics body is centered on the Game Object.

 If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  ##### Type

 * [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  Inherited From * [Phaser.Component.PhysicsBody#body](phaser.component.physicsbody#body)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L91))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
checkWorldBounds : boolean

  If this is set to `true` the Game Object checks if it is within the World bounds each frame. 

 When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

 If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

 It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

 When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.InWorld#checkWorldBounds](phaser.component.inworld#checkWorldBounds)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L98))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
dirty : boolean

  The dirty state of this object.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L153))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Game Object is processed by the core game loop.  
If this Game Object has a physics body it also controls if its physics body is updated or not.  
When `exists` is set to `false` it will remove its physics body from the physics world if it has one.  
It also toggles the `visible` property to false as well.

 Setting `exists` to true will add its physics body back in to the physics world, if it has one.  
It will also set the `visible` property to `true`.

   Inherited From * [Phaser.Component.Core#exists](phaser.component.core#exists)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L284))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
font : string

  The font the text will be rendered in, i.e. 'Arial'. Must be loaded in the browser before use.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 579](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L579))   ### 
fontSize : number

  The size of the font in pixels.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 602](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L602))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Inherited From * [Phaser.Component.InputEnabled#input](phaser.component.inputenabled#input)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Inherited From * [Phaser.Component.InputEnabled#inputEnabled](phaser.component.inputenabled#inputEnabled)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   ### 
[readonly] inWorld : boolean

  Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

   Inherited From * [Phaser.Component.InWorld#inWorld](phaser.component.inworld#inWorld)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L129))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
maxWidth : number

  The maximum display width of this BitmapText in pixels.

 If BitmapText.text is longer than maxWidth then the lines will be automatically wrapped  
based on the last whitespace character found in the line.

 If no whitespace was found then no wrapping will take place and consequently the maxWidth value will not be honored.

 Disable maxWidth by setting the value to 0. The maximum width of this BitmapText in pixels.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 648](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L648))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
outOfBoundsKill : boolean

  If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

   Inherited From * [Phaser.Component.InWorld#outOfBoundsKill](phaser.component.inworld#outOfBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L106))   ### 
outOfCameraBoundsKill : boolean

  If this and the `autoCull` property are both set to `true`, then the `kill` method  
is called as soon as the Game Object leaves the camera bounds.

   Inherited From * [Phaser.Component.InWorld#outOfCameraBoundsKill](phaser.component.inworld#outOfCameraBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L115))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L75))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
smoothed : boolean

  Enable or disable texture smoothing for this BitmapText.

 The smoothing is applied to the BaseTexture of this font, which all letters of the text reference.

 Smoothing is enabled by default.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 681](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L681))   ### 
text : string

  The text to be displayed by this BitmapText object.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 626](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L626))   ### 
[readonly] textHeight : number

  The height in pixels of the overall text area, taking into consideration multi-line text.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L87))   ### 
[readonly] textWidth : number

  The width in pixels of the overall text area, taking into consideration multi-line text.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 81](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L81))   ### 
tint : number

  The tint applied to the BitmapText. This is a hex value. Set to white to disable (0xFFFFFF)

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 557](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L557))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L69))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
x : number

  The position of the Game Object on the x axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#x](phaser.component.physicsbody#x)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L98))   ### 
y : number

  The position of the Game Object on the y axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#y](phaser.component.physicsbody#y)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L124))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
cleanText(text, replace) → {string}

  Given a text string this will scan each character in the string to ensure it exists  
in the BitmapText font data. If it doesn't the character is removed, or replaced with the `replace` argument.

 If no font data has been loaded at all this returns an empty string, as nothing can be rendered.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `text` | string |  |  | The text to parse. |
| `replace` | string |  <optional> |  ''  | The replacement string for any missing characters. |

 ##### Returns

   string -   The cleaned text string.

    Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 312](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L312))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
destroy(destroyChildren, destroyTexture)

  Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present  
and nulls its reference to `game`, freeing it up for garbage collection.

 If this Game Object has the Events component it will also dispatch the `onDestroy` event.

 You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called as well? |
| `destroyTexture` | boolean |  <optional> |  false  | Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Component.Destroy#destroy](phaser.component.destroy#destroy)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L37))   ### 
getBounds(targetCoordinateSpace) → {Rectangle}

  Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `targetCoordinateSpace` | PIXIDisplayObject | PIXIMatrix |  <optional> | Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. |

 ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getBounds](pixi.displayobjectcontainer#getBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 280](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L280))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
postUpdate()

  Automatically called by World.preUpdate.

   Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L198))   ### 
preUpdate() → {boolean}

  Automatically called by World.preUpdate.

  ##### Returns

   boolean -   True if the BitmapText was rendered, otherwise false.

    Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 187](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L187))   ### 
purgeGlyphs() → {integer}

  If a BitmapText changes from having a large number of characters to having very few characters it will cause lots of  
Sprites to be retained in the BitmapText.\_glyphs array. Although they are not attached to the display list they  
still take up memory while sat in the glyphs pool waiting to be re-used in the future.

 If you know that the BitmapText will not grow any larger then you can purge out the excess glyphs from the pool  
by calling this method.

 Calling this doesn't prevent you from increasing the length of the text again in the future.

  ##### Returns

   integer -   The amount of glyphs removed from the pool.

    Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 477](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L477))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
reset(x, y, health) → {PIXI.DisplayObject}

  Resets the Game Object.

 This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`,  
`visible` and `renderable` to true.

 If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

 If this Game Object has a Physics Body it will reset the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Game Object at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Game Object at. |
| `health` | number |  <optional> |  1  | The health to give the Game Object if it has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.Reset#reset](phaser.component.reset#reset)
 Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L30))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setText(text)

  The text to be displayed by this BitmapText object.

 It's faster to use `BitmapText.text = string`, but this is kept for backwards compatibility.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `text` | string | The text to be displayed by this BitmapText object. |

  Source code: [gameobjects/BitmapText.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapText.js#L217))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Override this method in your own custom objects to handle any update requirements.  
It is called immediately after `preUpdate` and before `postUpdate`.  
Remember if this Game Object has any children you should call update on those too.

   Inherited From * [Phaser.Component.Core#update](phaser.component.core#update)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L328))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.BitmapText.html>

Class: Phaser.Circle
====================

 Constructor
-----------

 ### 
new Circle(x, y, diameter)

  Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter.  
If you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate of the center of the circle. |
| `y` | number |  <optional> |  0  | The y coordinate of the center of the circle. |
| `diameter` | number |  <optional> |  0  | The diameter of the circle. |

  Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L17))   Public Properties
-----------------

  ### 
[readonly] area : number

  The area of this Circle.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 412](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L412))   ### 
bottom : number

  The sum of the y and radius properties. Changing the bottom property of a Circle object has no effect on the x and y properties, but does change the diameter. Gets or sets the bottom of the circle.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 385](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L385))   ### 
diameter : number

  The largest distance between any two points on the circle. The same as the radius \* 2. Gets or sets the diameter of the circle.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 258](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L258))   ### 
empty : boolean

  Determines whether or not this Circle object is empty. Will return a value of true if the Circle objects diameter is less than or equal to 0; otherwise false.  
If set to true it will reset all of the Circle objects properties to 0. A Circle object is empty if its diameter is less than or equal to 0. Gets or sets the empty state of the circle.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 435](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L435))   ### 
left

  The x coordinate of the leftmost point of the circle. Changing the left property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 304](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L304))   ### 
radius : number

  The length of a line extending from the center of the circle to any point on the circle itself. The same as half the diameter. Gets or sets the radius of the circle.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 281](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L281))   ### 
right : number

  The x coordinate of the rightmost point of the circle. Changing the right property of a Circle object has no effect on the x and y properties. However it does affect the diameter, whereas changing the x value does not affect the diameter property. Gets or sets the value of the rightmost point of the circle.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 331](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L331))   ### 
top : number

  The sum of the y minus the radius property. Changing the top property of a Circle object has no effect on the x and y properties, but does change the diameter. Gets or sets the top of the circle.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 358](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L358))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L54))   ### 
x : number

  The x coordinate of the center of the circle.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L26))   ### 
y : number

  The y coordinate of the center of the circle.

   Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L31))    Public Methods
--------------

  ### 
<static> circumferencePoint(a, angle, asDegrees, out) → {[Phaser.Point](phaser.point)}

  Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | [Phaser.Circle](phaser.circle) |  |  | The first Circle object. |
| `angle` | number |  |  | The angle in radians (unless asDegrees is true) to return the point from. |
| `asDegrees` | boolean |  <optional> |  false  | Is the given angle in radians (false) or degrees (true)? |
| `out` | [Phaser.Point](phaser.point) |  <optional> |  | An optional Point object to put the result in to. If none specified a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The Point object holding the result.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 510](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L510))   ### 
<static> contains(a, x, y) → {boolean}

  Return true if the given x/y coordinates are within the Circle object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Circle](phaser.circle) | The Circle to be checked. |
| `x` | number | The X value of the coordinate to test. |
| `y` | number | The Y value of the coordinate to test. |

 ##### Returns

   boolean -   True if the coordinates are within this circle, otherwise false.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 458](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L458))   ### 
<static> equals(a, b) → {boolean}

  Determines whether the two Circle objects match. This method compares the x, y and diameter properties.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Circle](phaser.circle) | The first Circle object. |
| `b` | [Phaser.Circle](phaser.circle) | The second Circle object. |

 ##### Returns

   boolean -   A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 483](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L483))   ### 
<static> intersects(a, b) → {boolean}

  Determines whether the two Circle objects intersect.  
This method checks the radius distances between the two Circle objects to see if they intersect.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Circle](phaser.circle) | The first Circle object. |
| `b` | [Phaser.Circle](phaser.circle) | The second Circle object. |

 ##### Returns

   boolean -   A value of true if the specified object intersects with this Circle object; otherwise false.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 496](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L496))   ### 
<static> intersectsRectangle(c, r) → {boolean}

  Checks if the given Circle and Rectangle objects intersect.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `c` | [Phaser.Circle](phaser.circle) | The Circle object to test. |
| `r` | [Phaser.Rectangle](phaser.rectangle) | The Rectangle object to test. |

 ##### Returns

   boolean -   True if the two objects intersect, otherwise false.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 536](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L536))   ### 
circumference() → {number}

  The circumference of the circle.

  ##### Returns

   number -   The circumference of the circle.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L60))   ### 
circumferencePoint(angle, asDegrees, out) → {[Phaser.Point](phaser.point)}

  Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `angle` | number |  |  | The angle in radians (unless asDegrees is true) to return the point from. |
| `asDegrees` | boolean |  <optional> |  false  | Is the given angle in radians (false) or degrees (true)? |
| `out` | [Phaser.Point](phaser.point) |  <optional> |  | An optional Point object to put the result in to. If none specified a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The Point object holding the result.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 205](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L205))   ### 
clone(output) → {[Phaser.Circle](phaser.circle)}

  Returns a new Circle object with the same values for the x, y, width, and height properties as this Circle object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `output` | [Phaser.Circle](phaser.circle) | Optional Circle object. If given the values will be set into the object, otherwise a brand new Circle object will be created and returned. |

 ##### Returns

   [Phaser.Circle](phaser.circle) -   The cloned Circle object.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L171))   ### 
contains(x, y) → {boolean}

  Return true if the given x/y coordinates are within this Circle object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The X value of the coordinate to test. |
| `y` | number | The Y value of the coordinate to test. |

 ##### Returns

   boolean -   True if the coordinates are within this circle, otherwise false.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 192](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L192))   ### 
copyFrom(source) → {Circle}

  Copies the x, y and diameter properties from any given object to this Circle.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `source` | any | The object to copy from. |

 ##### Returns

   Circle -   This Circle object.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 128](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L128))   ### 
copyTo(dest) → {object}

  Copies the x, y and diameter properties from this Circle to any given object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `dest` | any | The object to copy to. |

 ##### Returns

   object -   This dest object.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 140](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L140))   ### 
distance(dest, round) → {number}

  Returns the distance from the center of the Circle object to the given object  
(can be Circle, Point or anything with x/y properties)

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `dest` | object |  |  | The target object. Must have visible x and y properties that represent the center of the object. |
| `round` | boolean |  <optional> |  false  | Round the distance to the nearest integer. |

 ##### Returns

   number -   The distance between this Point object and the destination Point object.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L156))   ### 
getBounds() → {[Phaser.Rectangle](phaser.rectangle)}

  Returns the framing rectangle of the circle as a Phaser.Rectangle object.

  ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   The bounds of the Circle.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 97](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L97))   ### 
offset(dx, dy) → {Circle}

  Adjusts the location of the Circle object, as determined by its center coordinate, by the specified amounts.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `dx` | number | Moves the x value of the Circle object by this amount. |
| `dy` | number | Moves the y value of the Circle object by this amount. |

 ##### Returns

   Circle -   This Circle object.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 219](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L219))   ### 
offsetPoint(point) → {Circle}

  Adjusts the location of the Circle object using a Point object as a parameter. This method is similar to the Circle.offset() method, except that it takes a Point object as a parameter.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `point` | Point | A Point object to use to offset this Circle object (or any valid object with exposed x and y properties). |

 ##### Returns

   Circle -   This Circle object.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 235](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L235))   ### 
random(out) → {[Phaser.Point](phaser.point)}

  Returns a uniformly distributed random point from anywhere within this Circle.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `out` | [Phaser.Point](phaser.point) | object |  <optional> | A Phaser.Point, or any object with public x/y properties, that the values will be set in. If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an existing object. |

 ##### Returns

   [Phaser.Point](phaser.point) -   An object containing the random point in its `x` and `y` properties.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L72))   ### 
setTo(x, y, diameter) → {Circle}

  Sets the members of Circle to the specified values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate of the center of the circle. |
| `y` | number | The y coordinate of the center of the circle. |
| `diameter` | number | The diameter of the circle. |

 ##### Returns

   Circle -   This circle object.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L109))   ### 
toString() → {string}

  Returns a string representation of this object.

  ##### Returns

   string -   a string representation of the instance.

    Source code: [geom/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js) ([Line 245](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Circle.js#L245))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Circle.html>

Class: Phaser.Line
==================

 Constructor
-----------

 ### 
new Line(x1, y1, x2, y2)

  Creates a new Line object with a start and an end point.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x1` | number |  <optional> |  0  | The x coordinate of the start of the line. |
| `y1` | number |  <optional> |  0  | The y coordinate of the start of the line. |
| `x2` | number |  <optional> |  0  | The x coordinate of the end of the line. |
| `y2` | number |  <optional> |  0  | The y coordinate of the end of the line. |

  Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L17))   Public Properties
-----------------

  ### 
[readonly] angle : number

  Gets the angle of the line in radians.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 372](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L372))   ### 
[readonly] bottom : number

  Gets the bottom-most point of this line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 476](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L476))   ### 
end : [Phaser.Point](phaser.point)

  The end point of the line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L32))   ### 
[readonly] height : number

  Gets the height of this bounds of this line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 502](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L502))   ### 
[readonly] left : number

  Gets the left-most point of this line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L437))   ### 
[readonly] length : number

  Gets the length of the line segment.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 359](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L359))   ### 
[readonly] normalAngle : number

  Gets the angle in radians of the normal of this line (line.angle - 90 degrees.)

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 541](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L541))   ### 
[readonly] normalX : number

  Gets the x component of the left-hand normal of this line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 515](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L515))   ### 
[readonly] normalY : number

  Gets the y component of the left-hand normal of this line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 528](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L528))   ### 
[readonly] perpSlope : number

  Gets the perpendicular slope of the line (x/y).

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 398](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L398))   ### 
[readonly] right : number

  Gets the right-most point of this line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 450](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L450))   ### 
[readonly] slope : number

  Gets the slope of the line (y/x).

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 385](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L385))   ### 
start : [Phaser.Point](phaser.point)

  The start point of the line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L27))   ### 
[readonly] top : number

  Gets the top-most point of this line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 463](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L463))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L38))   ### 
[readonly] width : number

  Gets the width of this bounds of this line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 489](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L489))   ### 
[readonly] x : number

  Gets the x coordinate of the top left of the bounds around this line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 411](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L411))   ### 
[readonly] y : number

  Gets the y coordinate of the top left of the bounds around this line.

   Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 424](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L424))    Public Methods
--------------

  ### 
<static> intersects(a, b, asSegment, result) → {[Phaser.Point](phaser.point)}

  Checks for intersection between two lines.  
If asSegment is true it will check for segment intersection.  
If asSegment is false it will check for line intersection.  
Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.  
Adapted from code by Keith Hair

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | [Phaser.Line](phaser.line) |  |  | The first Line to be checked. |
| `b` | [Phaser.Line](phaser.line) |  |  | The second Line to be checked. |
| `asSegment` | boolean |  <optional> |  true  | If true it will check for segment intersection, otherwise full line intersection. |
| `result` | [Phaser.Point](phaser.point) |  <optional> |  | A Point object to store the result in, if not given a new one will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The intersection segment of the two lines as a Point, or null if there is no intersection.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 610](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L610))   ### 
<static> intersectsPoints(a, b, e, f, asSegment, result) → {[Phaser.Point](phaser.point)}

  Checks for intersection between two lines as defined by the given start and end points.  
If asSegment is true it will check for line segment intersection. If asSegment is false it will check for line intersection.  
Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.  
Adapted from code by Keith Hair

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  |  | The start of the first Line to be checked. |
| `b` | [Phaser.Point](phaser.point) |  |  | The end of the first line to be checked. |
| `e` | [Phaser.Point](phaser.point) |  |  | The start of the second Line to be checked. |
| `f` | [Phaser.Point](phaser.point) |  |  | The end of the second line to be checked. |
| `asSegment` | boolean |  <optional> |  true  | If true it will check for segment intersection, otherwise full line intersection. |
| `result` | [Phaser.Point](phaser.point) | object |  <optional> |  | A Point object to store the result in, if not given a new one will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The intersection segment of the two lines as a Point, or null if there is no intersection.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 554](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L554))   ### 
<static> intersectsRectangle(line, rect) → {boolean}

  Checks for intersection between the Line and a Rectangle shape, or a rectangle-like  
object, with public `x`, `y`, `right` and `bottom` properties, such as a Sprite or Body.

 An intersection is considered valid if:

 The line starts within, or ends within, the Rectangle.  
The line segment intersects one of the 4 rectangle edges.

 The for the purposes of this function rectangles are considered 'solid'.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `line` | [Phaser.Line](phaser.line) | The line to check for intersection with. |
| `rect` | [Phaser.Rectangle](phaser.rectangle) | object | The rectangle, or rectangle-like object, to check for intersection with. |

 ##### Returns

   boolean -   True if the line intersects with the rectangle edges, or starts or ends within the rectangle.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 630](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L630))   ### 
<static> reflect(a, b) → {number}

  Returns the reflected angle between two lines.  
This is the outgoing angle based on the angle of Line 1 and the normalAngle of Line 2.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Line](phaser.line) | The base line. |
| `b` | [Phaser.Line](phaser.line) | The line to be reflected from the base line. |

 ##### Returns

   number -   The reflected angle in radians.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 722](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L722))   ### 
centerOn(x, y) → {[Phaser.Line](phaser.line)}

  Centers this Line on the given coordinates.

 The line is centered by positioning the start and end points so that the lines midpoint matches  
the coordinates given.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x position to center the line on. |
| `y` | number | The y position to center the line on. |

 ##### Returns

   [Phaser.Line](phaser.line) -   This line object

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 200](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L200))   ### 
clone(output) → {[Phaser.Line](phaser.line)}

  Returns a new Line object with the same values for the start and end properties as this Line object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `output` | [Phaser.Line](phaser.line) | Optional Line object. If given the values will be set into the object, otherwise a brand new Line object will be created and returned. |

 ##### Returns

   [Phaser.Line](phaser.line) -   The cloned Line object.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 336](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L336))   ### 
coordinatesOnLine(stepRate, results) → {array}

  Using Bresenham's line algorithm this will return an array of all coordinates on this line.  
The start and end points are rounded before this runs as the algorithm works on integers.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `stepRate` | number |  <optional> |  1  | How many steps will we return? 1 = every coordinate on the line, 2 = every other coordinate, etc. |
| `results` | array |  <optional> |  | The array to store the results in. If not provided a new one will be generated. |

 ##### Returns

   array -   An array of coordinates.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 278](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L278))   ### 
fromAngle(x, y, angle, length) → {[Phaser.Line](phaser.line)}

  Sets this line to start at the given `x` and `y` coordinates and for the segment to extend at `angle` for the given `length`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate of the start of the line. |
| `y` | number | The y coordinate of the start of the line. |
| `angle` | number | The angle of the line in radians. |
| `length` | number | The length of the line in pixels. |

 ##### Returns

   [Phaser.Line](phaser.line) -   This line object

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L86))   ### 
fromSprite(startSprite, endSprite, useCenter) → {[Phaser.Line](phaser.line)}

  Sets the line to match the x/y coordinates of the two given sprites.  
Can optionally be calculated from their center coordinates.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startSprite` | [Phaser.Sprite](phaser.sprite) |  |  | The coordinates of this Sprite will be set to the Line.start point. |
| `endSprite` | [Phaser.Sprite](phaser.sprite) |  |  | The coordinates of this Sprite will be set to the Line.start point. |
| `useCenter` | boolean |  <optional> |  false  | If true it will use startSprite.center.x, if false startSprite.x. Note that Sprites don't have a center property by default, so only enable if you've over-ridden your Sprite with a custom class. |

 ##### Returns

   [Phaser.Line](phaser.line) -   This line object

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L63))   ### 
intersects(line, asSegment, result) → {[Phaser.Point](phaser.point)}

  Checks for intersection between this line and another Line.  
If asSegment is true it will check for segment intersection. If asSegment is false it will check for line intersection.  
Returns the intersection segment of AB and EF as a Point, or null if there is no intersection.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `line` | [Phaser.Line](phaser.line) |  |  | The line to check against this one. |
| `asSegment` | boolean |  <optional> |  true  | If true it will check for segment intersection, otherwise full line intersection. |
| `result` | [Phaser.Point](phaser.point) |  <optional> |  | A Point object to store the result in, if not given a new one will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The intersection segment of the two lines as a Point, or null if there is no intersection.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 151](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L151))   ### 
midPoint(out) → {[Phaser.Point](phaser.point)}

  Returns a Point object where the x and y values correspond to the center (or midpoint) of the Line segment.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `out` | [Phaser.Point](phaser.point) |  <optional> | A Phaser.Point object into which the result will be populated. If not given a new Point object is created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   A Phaser.Point object with the x and y values set to the center of the line segment.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 182](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L182))   ### 
pointOnLine(x, y) → {boolean}

  Tests if the given coordinates fall on this line. See pointOnSegment to test against just the line segment.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The line to check against this one. |
| `y` | number | The line to check against this one. |

 ##### Returns

   boolean -   True if the point is on the line, false if not.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 224](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L224))   ### 
pointOnSegment(x, y) → {boolean}

  Tests if the given coordinates fall on this line and within the segment. See pointOnLine to test against just the line.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The line to check against this one. |
| `y` | number | The line to check against this one. |

 ##### Returns

   boolean -   True if the point is on the line and segment, false if not.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 238](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L238))   ### 
random(out) → {[Phaser.Point](phaser.point)}

  Picks a random point from anywhere on the Line segment and returns it.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `out` | [Phaser.Point](phaser.point) | object |  <optional> | A Phaser.Point, or any object with public x/y properties, that the values will be set in. If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an object. |

 ##### Returns

   [Phaser.Point](phaser.point) -   An object containing the random point in its `x` and `y` properties.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 257](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L257))   ### 
reflect(line) → {number}

  Returns the reflected angle between two lines.  
This is the outgoing angle based on the angle of this line and the normalAngle of the given line.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `line` | [Phaser.Line](phaser.line) | The line to reflect off this line. |

 ##### Returns

   number -   The reflected angle in radians.

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L168))   ### 
rotate(angle, asDegrees) → {[Phaser.Line](phaser.line)}

  Rotates the line by the amount specified in `angle`.

 Rotation takes place from the center of the line.  
If you wish to rotate around a different point see Line.rotateAround.

 If you wish to rotate the ends of the Line then see Line.start.rotate or Line.end.rotate.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `angle` | number |  |  | The angle in radians (unless asDegrees is true) to rotate the line by. |
| `asDegrees` | boolean |  <optional> |  false  | Is the given angle in radians (false) or degrees (true)? |

 ##### Returns

   [Phaser.Line](phaser.line) -   This line object

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L105))   ### 
rotateAround(x, y, angle, asDegrees) → {[Phaser.Line](phaser.line)}

  Rotates the line by the amount specified in `angle`.

 Rotation takes place around the coordinates given.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate to offset the rotation from. |
| `y` | number |  |  | The y coordinate to offset the rotation from. |
| `angle` | number |  |  | The angle in radians (unless asDegrees is true) to rotate the line by. |
| `asDegrees` | boolean |  <optional> |  false  | Is the given angle in radians (false) or degrees (true)? |

 ##### Returns

   [Phaser.Line](phaser.line) -   This line object

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L130))   ### 
setTo(x1, y1, x2, y2) → {[Phaser.Line](phaser.line)}

  Sets the components of the Line to the specified values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x1` | number |  <optional> |  0  | The x coordinate of the start of the line. |
| `y1` | number |  <optional> |  0  | The y coordinate of the start of the line. |
| `x2` | number |  <optional> |  0  | The x coordinate of the end of the line. |
| `y2` | number |  <optional> |  0  | The y coordinate of the end of the line. |

 ##### Returns

   [Phaser.Line](phaser.line) -   This line object

    Source code: [geom/Line.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Line.js#L44))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Line.html>

Class: Phaser.TimerEvent
========================

 Constructor
-----------

 ### 
new TimerEvent(timer, delay, tick, repeatCount, loop, callback, callbackContext, arguments)

  A TimerEvent is a single event that is processed by a Phaser.Timer.

 It consists of a delay, which is a value in milliseconds after which the event will fire.  
When the event fires it calls a specific callback with the specified arguments.

 TimerEvents are removed by their parent timer once finished firing or repeating.

 Use [Phaser.Timer#add](phaser.timer#add), [Phaser.Timer#repeat](phaser.timer#repeat), or [Phaser.Timer#loop](phaser.timer#loop) methods to create a new event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `timer` | [Phaser.Timer](phaser.timer) | The Timer object that this TimerEvent belongs to. |
| `delay` | number | The delay in ms at which this TimerEvent fires. |
| `tick` | number | The tick is the next game clock time that this event will fire at. |
| `repeatCount` | number | If this TimerEvent repeats it will do so this many times. |
| `loop` | boolean | True if this TimerEvent loops, otherwise false. |
| `callback` | function | The callback that will be called when the TimerEvent occurs. |
| `callbackContext` | object | The context in which the callback will be called. |
| `arguments` | Array.<any> | Additional arguments to be passed to the callback. |

  Source code: [time/TimerEvent.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js#L28))   Public Properties
-----------------

  ### 
args

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `arguments` | Array.<any> | Additional arguments to be passed to the callback. |

  Source code: [time/TimerEvent.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js#L70))   ### 
callback : Function

  The callback that will be called when the TimerEvent occurs.

   Source code: [time/TimerEvent.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js#L60))   ### 
callbackContext : Object

  The context in which the callback will be called.

   Source code: [time/TimerEvent.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js#L65))   ### 
delay : number

  The delay in ms at which this TimerEvent fires.

   Source code: [time/TimerEvent.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js#L40))   ### 
loop : boolean

  True if this TimerEvent loops, otherwise false.

   Source code: [time/TimerEvent.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js#L55))   ### 
<internal> pendingDelete : boolean

  A flag that controls if the TimerEvent is pending deletion.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/TimerEvent.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js) ([Line 76](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js#L76))   ### 
repeatCount : number

  If this TimerEvent repeats it will do so this many times.

   Source code: [time/TimerEvent.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js#L50))   ### 
tick : number

  The tick is the next game clock time that this event will fire at.

   Source code: [time/TimerEvent.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js#L45))   ### 
<internal, readonly> timer : [Phaser.Timer](phaser.timer)

  The Timer object that this TimerEvent belongs to.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/TimerEvent.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/TimerEvent.js#L35))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.TimerEvent.html>

Class: Phaser.Time
==================

 Constructor
-----------

 ### 
new Time(game)

  This is the core internal game clock.

 It manages the elapsed time and calculation of elapsed values, used for game object motion and tweens,  
and also handles the standard Timer pool.

 To create a general timed event, use the master [Phaser.Timer](phaser.timer) accessible through events.

 There are different *types* of time in Phaser:

 * ***Game time*** always runs at the speed of time in real life.

 Unlike wall-clock time, *game time stops when Phaser is paused*.

 Game time is used for [timer events](phaser.timer).
* ***Physics time*** represents the amount of time given to physics calculations.

 *When [slowMotion](phaser.time#slowMotion) is in effect physics time runs slower than game time.*  
Like game time, physics time stops when Phaser is paused.

 Physics time is used for physics calculations and [tweens](phaser.tween).
* [***Wall-clock time***](https://en.wikipedia.org/wiki/Wall-clock_time) represents the duration between two events in real life time.

 This time is independent of Phaser and always progresses, regardless of if Phaser is paused.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L38))   Public Properties
-----------------

  ### 
advancedTiming : boolean

  If true then advanced profiling, including the fps rate, fps min/max, suggestedFps and msMin/msMax are updated.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L165))   ### 
desiredFps : integer

  The desired frame rate of the game.

 This is used is used to calculate the physic / logic multiplier and how to apply catch-up logic updates. The desired frame rate of the game. Defaults to 60.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 596](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L596))   ### 
<internal> desiredFpsMult : integer

  The desiredFps multiplier as used by Game.update.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 126](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L126))   ### 
<internal> elapsed : number

  Elapsed time since the last time update, in milliseconds, based on `now`.

 This value *may* include time that the game is paused/inactive.

 *Note:* This is updated only once per game loop - even if multiple logic update steps are done.  
Use physicsTime as a basis of game/logic calculations instead.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L86))  See  * Phaser.Time.time

   ### 
<internal> elapsedMS : integer

  The time in ms since the last time update, in milliseconds, based on `time`.

 This value is corrected for game pauses and will be "about zero" after a game is resumed.

 *Note:* This is updated once per game loop - even if multiple logic update steps are done.  
Use physicsTime as a basis of game/logic calculations instead.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 99](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L99))   ### 
events : [Phaser.Timer](phaser.timer)

  A [Phaser.Timer](phaser.timer) object bound to the master clock (this Time object) which events can be added to.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 245](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L245))   ### 
[readonly] fps : number

  Advanced timing result: Frames per second.

 Only calculated if [advancedTiming](phaser.time#advancedTiming) is enabled.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 183](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L183))   ### 
fpsMax : number

  Advanced timing result: The highest rate the fps has reached (usually no higher than 60fps).

 Only calculated if [advancedTiming](phaser.time#advancedTiming) is enabled.  
This value can be manually reset.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 201](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L201))   ### 
fpsMin : number

  Advanced timing result: The lowest rate the fps has dropped to.

 Only calculated if [advancedTiming](phaser.time#advancedTiming) is enabled.  
This value can be manually reset.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 192](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L192))   ### 
[readonly] frames : integer

  Advanced timing result: The number of render frames record in the last second.

 Only calculated if [advancedTiming](phaser.time#advancedTiming) is enabled.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L174))   ### 
<internal> game : [Phaser.Game](phaser.game)

  Local reference to game.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L44))   ### 
msMax : number

  Advanced timing result: The maximum amount of time the game has taken between consecutive frames.

 Only calculated if [advancedTiming](phaser.time#advancedTiming) is enabled.  
This value can be manually reset.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L220))   ### 
msMin : number

  Advanced timing result: The minimum amount of time the game has taken between consecutive frames.

 Only calculated if [advancedTiming](phaser.time#advancedTiming) is enabled.  
This value can be manually reset.

   Default Value * 1000
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L211))   ### 
<internal> now : number

  An increasing value representing cumulative milliseconds since an undisclosed epoch.

 While this value is in milliseconds and can be used to compute time deltas,  
it must must *not* be used with `Date.now()` as it may not use the same epoch / starting reference.

 The source may either be from a high-res source (eg. if RAF is available) or the standard Date.now;  
the value can only be relied upon within a particular game instance.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L72))   ### 
pauseDuration : number

  Records how long the game was last paused, in milliseconds.  
(This is not updated until the game is resumed.)

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 227](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L227))   ### 
physicsElapsed : number

  The physics update delta, in fractional seconds.

 This should be used as an applicable multiplier by all logic update steps (eg. `preUpdate/postUpdate/update`)  
to ensure consistent game timing. Game/logic timing can drift from real-world time if the system  
is unable to consistently maintain the desired FPS.

 With fixed-step updates this is normally equivalent to `1.0 / desiredFps`.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L112))   ### 
physicsElapsedMS : number

  The physics update delta, in milliseconds - equivalent to `physicsElapsed * 1000`.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L119))   ### 
<internal> prevTime : number

  The `now` when the previous update occurred.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L58))   ### 
slowMotion : number

  Scaling factor to make the game move smoothly in slow motion

 * 1.0 = normal speed
* 2.0 = half speed

   Default Value * 1
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 158](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L158))   ### 
suggestedFps : number

  The suggested frame rate for your game, based on an averaged real frame rate.  
This value is only populated if `Time.advancedTiming` is enabled.

 *Note:* This is not available until after a few frames have passed; until then  
it's set to the same value as desiredFps.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L149))   ### 
<internal> time : integer

  The `Date.now()` value when the time was last updated.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L51))   ### 
<internal> timeExpected : number

  The time when the next call is expected when using setTimer to control the update loop

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 239](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L239))   ### 
<internal> timeToCall : number

  The value that setTimeout needs to work out when to next update

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 233](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L233))    Public Methods
--------------

  ### 
add(timer) → {[Phaser.Timer](phaser.timer)}

  Adds an existing Phaser.Timer object to the Timer pool.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `timer` | [Phaser.Timer](phaser.timer) | An existing Phaser.Timer object. |

 ##### Returns

   [Phaser.Timer](phaser.timer) -   The given Phaser.Timer object.

    Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 308](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L308))   ### 
<internal> boot()

  Called automatically by Phaser.Game after boot. Should not be called directly.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L293))   ### 
create(autoDestroy) → {[Phaser.Timer](phaser.timer)}

  Creates a new stand-alone Phaser.Timer object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `autoDestroy` | boolean |  <optional> |  true  | A Timer that is set to automatically destroy itself will do so after all of its events have been dispatched (assuming no looping events). |

 ##### Returns

   [Phaser.Timer](phaser.timer) -   The Timer object that was created.

    Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 323](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L323))   ### 
elapsedSecondsSince(since) → {number}

  How long has passed since the given time (in seconds).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `since` | number | The time you want to measure (in seconds). |

 ##### Returns

   number -   Duration between given time and now (in seconds).

    Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L571))   ### 
elapsedSince(since) → {number}

  How long has passed since the given time.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `since` | number | The time you want to measure against. |

 ##### Returns

   number -   The difference between the given time and now.

    Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 560](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L560))   ### 
refresh()

  Refreshes the Time.time and Time.elapsedMS properties from the system clock.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 360](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L360))   ### 
removeAll()

  Remove all Timer objects, regardless of their state and clears all Timers from the [events](phaser.time#events) timer.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 342](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L342))   ### 
reset()

  Resets the private \_started value to now and removes all currently running Timers.

   Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 582](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L582))   ### 
totalElapsedSeconds() → {number}

  The number of seconds that have elapsed since the game was started.

  ##### Returns

   number -   The number of seconds that have elapsed since the game was started.

    Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 550](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L550))   ### 
<internal> update(time)

  Updates the game clock and if enabled the advanced timing data. This is called automatically by Phaser.Game.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `time` | number | The current relative timestamp; see [now](phaser.time#now). |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Time.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js) ([Line 378](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Time.js#L378))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Time.html>

Class: Phaser.Tileset
=====================

 Constructor
-----------

 ### 
new Tileset(name, firstgid, width, height, margin, spacing, properties)

  A Tile set is a combination of an image containing the tiles and collision data per tile.

 Tilesets are normally created automatically when Tiled data is loaded.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the tileset in the map data. |
| `firstgid` | integer |  |  | The first tile index this tileset contains. |
| `width` | integer |  <optional> |  32  | Width of each tile (in pixels). |
| `height` | integer |  <optional> |  32  | Height of each tile (in pixels). |
| `margin` | integer |  <optional> |  0  | The margin around all tiles in the sheet (in pixels). |
| `spacing` | integer |  <optional> |  0  | The spacing between each tile in the sheet (in pixels). |
| `properties` | object |  <optional> |  {}  | Custom Tileset properties. |

  Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L22))   Public Properties
-----------------

  ### 
[readonly] columns : integer

  The number of tile columns in the tileset.

   Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 101](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L101))   ### 
firstgid : integer

  The Tiled firstgid value.  
This is the starting index of the first tile index this Tileset contains.

   Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L40))   ### 
[readonly] image : Object

  The cached image that contains the individual tiles. Use setImage to set.

   Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L85))   ### 
name : string

  The name of the Tileset.

   Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L33))   ### 
properties : Object

  Tileset-specific properties that are typically defined in the Tiled editor.

   Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L77))   ### 
[readonly] rows

  The number of tile rows in the the tileset.

   ##### Properties:

  

| Type | Description |
| --- | --- |
| integer |  |

  Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L93))   ### 
[readonly] tileHeight : integer

  The height of each tile (in pixels).

   Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L54))   ### 
[readonly] tileMargin

  The margin around the tiles in the sheet (in pixels).  
Use `setSpacing` to change.

   ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `tileMarge` | integer |  |

  Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L63))   ### 
[readonly] tileSpacing : integer

  The spacing between each tile in the sheet (in pixels).  
Use `setSpacing` to change.

   Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 71](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L71))   ### 
[readonly] tileWidth : integer

  The width of each tile (in pixels).

   Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 47](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L47))   ### 
[readonly] total : integer

  The total number of tiles in the tileset.

   Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L109))    Public Methods
--------------

  ### 
containsTileIndex() → {boolean}

  Returns true if and only if this tileset contains the given tile index.

  ##### Returns

   boolean -   True if this tileset contains the given index.

    Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L155))   ### 
draw(context, x, y, index)

  Draws a tile from this Tileset at the given coordinates on the context.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `context` | CanvasRenderingContext2D | The context to draw the tile onto. |
| `x` | number | The x coordinate to draw to. |
| `y` | number | The y coordinate to draw to. |
| `index` | integer | The index of the tile within the set to draw. |

  Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 123](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L123))   ### 
setImage(image)

  Set the image associated with this Tileset and update the tile data.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `image` | Image | The image that contains the tiles. |

  Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L171))   ### 
setSpacing(margin, spacing)

  Sets tile spacing and margins.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `margin` | integer |  <optional> |  0  | The margin around the tiles in the sheet (in pixels). |
| `spacing` | integer |  <optional> |  0  | The spacing between the tiles in the sheet (in pixels). |

  Source code: [tilemap/Tileset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tileset.js#L185))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Tileset.html>

Class: Phaser.BitmapData
========================

 Constructor
-----------

 ### 
new BitmapData(game, key, width, height, skipPool)

  A BitmapData object contains a Canvas element to which you can draw anything you like via normal Canvas context operations.  
A single BitmapData can be used as the texture for one or many Images / Sprites.  
So if you need to dynamically create a Sprite texture then they are a good choice.

 Important note: Every BitmapData creates its own Canvas element. Because BitmapData's are now Game Objects themselves, and don't  
live on the display list, they are NOT automatically cleared when you change State. Therefore you *must* call BitmapData.destroy  
in your State's shutdown method if you wish to free-up the resources the BitmapData used, it will not happen for you.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `key` | string |  |  | Internal Phaser reference key for the BitmapData. |
| `width` | number |  <optional> |  256  | The width of the BitmapData in pixels. If undefined or zero it's set to a default value. |
| `height` | number |  <optional> |  256  | The height of the BitmapData in pixels. If undefined or zero it's set to a default value. |
| `skipPool` | boolean |  <optional> |  false  | When this BitmapData generates its internal canvas to use for rendering, it will get the canvas from the CanvasPool if false, or create its own if true. |

  Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L24))   Public Properties
-----------------

  ### 
baseTexture : [PIXI.BaseTexture](pixi.basetexture)

  The PIXI.BaseTexture.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L124))   ### 
canvas :HTMLCanvasElement

  The canvas to which this BitmapData draws.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L54))   ### 
context :CanvasRenderingContext2D

  The 2d context of the canvas.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L60))   ### 
ctx :CanvasRenderingContext2D

  A reference to BitmapData.context.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L65))   ### 
data :Uint8ClampedArray

  A Uint8ClampedArray view into BitmapData.buffer.  
Note that this is unavailable in some browsers (such as Epic Browser due to its security restrictions)

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L84))   ### 
dirty : boolean

  If dirty this BitmapData will be re-rendered.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 159](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L159))   ### 
disableTextureUpload : boolean

  If disableTextureUpload is true this BitmapData will never send its image data to the GPU when its dirty flag is true.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 154](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L154))   ### 
frameData : [Phaser.FrameData](phaser.framedata)

  The FrameData container this BitmapData uses for rendering.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L135))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L33))   ### 
height : number

  The height of the BitmapData in pixels.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L48))   ### 
imageData :ImageData

  The context image data.  
Please note that a call to BitmapData.draw() or BitmapData.copy() does not update immediately this property for performance reason. Use BitmapData.update() to do so.  
This property is updated automatically after the first game loop, according to the dirty flag property.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L77))   ### 
key : string

  The key of the BitmapData in the Cache, if stored there.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L38))   ### 
pixels :Uint32Array

  An Uint32Array view into BitmapData.buffer.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L94))   ### 
smoothProperty : string

  The context property needed for smoothing this Canvas.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L70))   ### 
texture : [PIXI.Texture](pixi.texture)

  The PIXI.Texture.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L130))   ### 
textureFrame : [Phaser.Frame](phaser.frame)

  The Frame this BitmapData uses for rendering.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 141](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L141))   ### 
type : number

  The const type of this object.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L149))   ### 
width : number

  The width of the BitmapData in pixels.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L43))    Public Methods
--------------

  ### 
<static> getTransform(translateX, translateY, scaleX, scaleY, skewX, skewY) → {object}

  Gets a JavaScript object that has 6 properties set that are used by BitmapData in a transform.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `translateX` | number | The x translate value. |
| `translateY` | number | The y translate value. |
| `scaleX` | number | The scale x value. |
| `scaleY` | number | The scale y value. |
| `skewX` | number | The skew x value. |
| `skewY` | number | The skew y value. |

 ##### Returns

   object -   A JavaScript object containing all of the properties BitmapData needs for transforms.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2419](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2419))   ### 
add(object) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Updates the given objects so that they use this BitmapData as their texture.  
This will replace any texture they will currently have set.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | [Phaser.Sprite](phaser.sprite) | Array.<[Phaser.Sprite](phaser.sprite)> | [Phaser.Image](phaser.image) | Array.<[Phaser.Image](phaser.image)> | Either a single Sprite/Image or an Array of Sprites/Images. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 393](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L393))   ### 
addToWorld(x, y, anchorX, anchorY, scaleX, scaleY) → {[Phaser.Image](phaser.image)}

  Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate to place the Image at. |
| `y` | number |  <optional> |  0  | The y coordinate to place the Image at. |
| `anchorX` | number |  <optional> |  0  | Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. |
| `anchorY` | number |  <optional> |  0  | Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. |
| `scaleX` | number |  <optional> |  1  | The horizontal scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on. |
| `scaleY` | number |  <optional> |  1  | The vertical scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on. |

 ##### Returns

   [Phaser.Image](phaser.image) -   The newly added Image object.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1179](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1179))   ### 
alphaMask(source, mask, sourceRect, maskRect) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Draws the image onto this BitmapData using an image as an alpha mask.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `source` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapData](phaser.bitmapdata) | Image | HTMLCanvasElement | string |  | The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. |
| `mask` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapData](phaser.bitmapdata) | Image | HTMLCanvasElement | string |  <optional> | The object to be used as the mask. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. If you don't provide a mask it will use this BitmapData as the mask. |
| `sourceRect` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | A Rectangle where x/y define the coordinates to draw the Source image to and width/height define the size. |
| `maskRect` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | A Rectangle where x/y define the coordinates to draw the Mask image to and width/height define the size. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1738](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1738))   ### 
blendAdd() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'lighter'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2169](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2169))   ### 
blendColor() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'color'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2351](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2351))   ### 
blendColorBurn() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'color-burn'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2260](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2260))   ### 
blendColorDodge() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'color-dodge'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2247](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2247))   ### 
blendDarken() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'darken'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2221))   ### 
blendDestinationAtop() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'destination-atop'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2143](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2143))   ### 
blendDestinationIn() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'destination-in'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2117](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2117))   ### 
blendDestinationOut() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'destination-out'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2130))   ### 
blendDestinationOver() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'destination-over'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2104))   ### 
blendDifference() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'difference'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2299](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2299))   ### 
blendExclusion() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'exclusion'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2312](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2312))   ### 
blendHardLight() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'hard-light'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2273](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2273))   ### 
blendHue() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'hue'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2325](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2325))   ### 
blendLighten() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'lighten'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2234](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2234))   ### 
blendLuminosity() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'luminosity'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2364](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2364))   ### 
blendMultiply() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'multiply'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2182](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2182))   ### 
blendOverlay() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'overlay'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2208))   ### 
blendReset() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Resets the blend mode (effectively sets it to 'source-over')

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2039](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2039))   ### 
blendSaturation() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'saturation'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2338))   ### 
blendScreen() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'screen'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2195](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2195))   ### 
blendSoftLight() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'soft-light'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2286](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2286))   ### 
blendSourceAtop() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'source-atop'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2091](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2091))   ### 
blendSourceIn() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'source-in'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2065](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2065))   ### 
blendSourceOut() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'source-out'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2078](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2078))   ### 
blendSourceOver() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'source-over'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2052](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2052))   ### 
blendXor() → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the blend mode to 'xor'

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2156))   ### 
circle(x, y, radius, fillStyle) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Draws a filled Circle to the BitmapData at the given x, y coordinates and radius in size.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | The x coordinate to draw the Circle at. This is the center of the circle. |
| `y` | number |  | The y coordinate to draw the Circle at. This is the center of the circle. |
| `radius` | number |  | The radius of the Circle in pixels. The radius is half the diameter. |
| `fillStyle` | string |  <optional> | If set the context fillStyle will be set to this value before the circle is drawn. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1891](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1891))   ### 
clear(x, y, width, height) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Clears the BitmapData context using a clearRect.

 You can optionally define the area to clear.  
If the arguments are left empty it will clear the entire canvas.

 You may need to call BitmapData.update after this in order to clear out the pixel data,  
but Phaser will not do this automatically for you.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate of the top-left of the area to clear. |
| `y` | number |  <optional> |  0  | The y coordinate of the top-left of the area to clear. |
| `width` | number |  <optional> |  | The width of the area to clear. If undefined it will use BitmapData.width. |
| `height` | number |  <optional> |  | The height of the area to clear. If undefined it will use BitmapData.height. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 463](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L463))   ### 
cls()

  Clears the BitmapData context using a clearRect.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 457](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L457))   ### 
copy(source, x, y, width, height, tx, ty, newWidth, newHeight, rotate, anchorX, anchorY, scaleX, scaleY, alpha, blendMode, roundPx) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Copies a rectangular area from the source object to this BitmapData. If you give `null` as the source it will copy from itself.

 You can optionally resize, translate, rotate, scale, alpha or blend as it's drawn.

 All rotation, scaling and drawing takes place around the regions center point by default, but can be changed with the anchor parameters.

 Note that the source image can also be this BitmapData, which can create some interesting effects.

 This method has a lot of parameters for maximum control.  
You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all.

 You may prefer to use `copyTransform` if you're simply trying to draw a Sprite to this BitmapData,  
and don't wish to translate, scale or rotate it from its original values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `source` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.RenderTexture](phaser.rendertexture) | Image | HTMLCanvasElement | string |  <optional> |  | The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. |
| `x` | number |  <optional> |  0  | The x coordinate representing the top-left of the region to copy from the source image. |
| `y` | number |  <optional> |  0  | The y coordinate representing the top-left of the region to copy from the source image. |
| `width` | number |  <optional> |  | The width of the region to copy from the source image. If not specified it will use the full source image width. |
| `height` | number |  <optional> |  | The height of the region to copy from the source image. If not specified it will use the full source image height. |
| `tx` | number |  <optional> |  | The x coordinate to translate to before drawing. If not specified it will default to the `x` parameter. If `null` and `source` is a Display Object, it will default to `source.x`. |
| `ty` | number |  <optional> |  | The y coordinate to translate to before drawing. If not specified it will default to the `y` parameter. If `null` and `source` is a Display Object, it will default to `source.y`. |
| `newWidth` | number |  <optional> |  | The new width of the block being copied. If not specified it will default to the `width` parameter. |
| `newHeight` | number |  <optional> |  | The new height of the block being copied. If not specified it will default to the `height` parameter. |
| `rotate` | number |  <optional> |  0  | The angle in radians to rotate the block to before drawing. Rotation takes place around the center by default, but can be changed with the `anchor` parameters. |
| `anchorX` | number |  <optional> |  0  | The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. |
| `anchorY` | number |  <optional> |  0  | The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. |
| `scaleX` | number |  <optional> |  1  | The horizontal scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on. |
| `scaleY` | number |  <optional> |  1  | The vertical scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on. |
| `alpha` | number |  <optional> |  1  | The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque. |
| `blendMode` | string |  <optional> |  null  | The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'. |
| `roundPx` | boolean |  <optional> |  false  | Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1205](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1205))   ### 
copyRect(source, area, x, y, alpha, blendMode, roundPx) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `source` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.RenderTexture](phaser.rendertexture) | Image | string |  |  | The Image to copy from. If you give a string it will try and find the Image in the Game.Cache. |
| `area` | [Phaser.Rectangle](phaser.rectangle) |  |  | The Rectangle region to copy from the source image. |
| `x` | number |  |  | The destination x coordinate to copy the image to. |
| `y` | number |  |  | The destination y coordinate to copy the image to. |
| `alpha` | number |  <optional> |  1  | The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque. |
| `blendMode` | string |  <optional> |  null  | The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'. |
| `roundPx` | boolean |  <optional> |  false  | Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1534](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1534))   ### 
copyTransform(source, blendMode, roundPx) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Draws the given `source` Game Object to this BitmapData, using its `worldTransform` property to set the  
position, scale and rotation of where it is drawn. This function is used internally by `drawGroup`.  
It takes the objects tint and scale mode into consideration before drawing.

 You can optionally specify Blend Mode and Round Pixels arguments.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `source` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.BitmapText](phaser.bitmaptext) |  <optional> |  | The Game Object to draw. |
| `blendMode` | string |  <optional> |  null  | The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'. |
| `roundPx` | boolean |  <optional> |  false  | Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1426](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1426))   ### 
destroy()

  Destroys this BitmapData and puts the canvas it was using back into the canvas pool for re-use.

   Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2024](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2024))   ### 
draw(source, x, y, width, height, blendMode, roundPx) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Draws the given Phaser.Sprite, Phaser.Image or Phaser.Text to this BitmapData at the coordinates specified.  
You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling.

 The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible.  
When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

 Note: You should ensure that at least 1 full update has taken place before calling this,  
otherwise the objects are likely to render incorrectly, if at all.  
You can trigger an update yourself by calling `stage.updateTransform()` before calling `draw`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `source` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.RenderTexture](phaser.rendertexture) |  |  | The Sprite, Image or Text object to draw onto this BitmapData. |
| `x` | number |  <optional> |  0  | The x coordinate to translate to before drawing. If not specified it will default to `source.x`. |
| `y` | number |  <optional> |  0  | The y coordinate to translate to before drawing. If not specified it will default to `source.y`. |
| `width` | number |  <optional> |  | The new width of the Sprite being copied. If not specified it will default to `source.width`. |
| `height` | number |  <optional> |  | The new height of the Sprite being copied. If not specified it will default to `source.height`. |
| `blendMode` | string |  <optional> |  null  | The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'. |
| `roundPx` | boolean |  <optional> |  false  | Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1553](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1553))   ### 
drawFull(parent, blendMode, roundPx) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Draws the Game Object or Group to this BitmapData and then recursively iterates through all of its children.

 If a child has an `exists` property then it (and its children) will be only be drawn if exists is `true`.

 The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData  
they won't be drawn. Depending on your requirements you may need to resize the BitmapData in advance to match the  
bounds of the top-level Game Object.

 When drawing it will take into account the child's world rotation, scale and alpha values.

 It's perfectly valid to pass in `game.world` as the parent object, and it will iterate through the entire display list.

 Note: If you are trying to grab your entire game at the start of a State then you should ensure that at least 1 full update  
has taken place before doing so, otherwise all of the objects will render with incorrect positions and scales. You can  
trigger an update yourself by calling `stage.updateTransform()` before calling `drawFull`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.World](phaser.world) | [Phaser.Group](phaser.group) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) |  |  | The Game Object to draw onto this BitmapData and then recursively draw all of its children. |
| `blendMode` | string |  <optional> |  null  | The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'. |
| `roundPx` | boolean |  <optional> |  false  | Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1648](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1648))   ### 
drawGroup(group, blendMode, roundPx) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Draws the immediate children of a Phaser.Group to this BitmapData.

 It's perfectly valid to pass in `game.world` as the Group, and it will iterate through the entire display list.

 Children are drawn *only* if they have their `exists` property set to `true`, and have image, or RenderTexture, based Textures.

 The children will be drawn at their `x` and `y` world space coordinates. If this is outside the bounds of the BitmapData they won't be visible.  
When drawing it will take into account the rotation, scale, scaleMode, alpha and tint values.

 Note: You should ensure that at least 1 full update has taken place before calling this,  
otherwise the objects are likely to render incorrectly, if at all.  
You can trigger an update yourself by calling `stage.updateTransform()` before calling `drawGroup`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `group` | [Phaser.Group](phaser.group) |  |  | The Group to draw onto this BitmapData. Can also be Phaser.World. |
| `blendMode` | string |  <optional> |  null  | The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'. |
| `roundPx` | boolean |  <optional> |  false  | Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1581](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1581))   ### 
extract(destination, r, g, b, a, resize, r2, g2, b2) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Scans this BitmapData for all pixels matching the given r,g,b values and then draws them into the given destination BitmapData.  
The original BitmapData remains unchanged.  
The destination BitmapData must be large enough to receive all of the pixels that are scanned unless the 'resize' parameter is true.  
Although the destination BitmapData is returned from this method, it's actually modified directly in place, meaning this call is perfectly valid:  
`picture.extract(mask, r, g, b)`  
You can specify optional r2, g2, b2 color values. If given the pixel written to the destination bitmap will be of the r2, g2, b2 color.  
If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint  
the color during extraction.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destination` | [Phaser.BitmapData](phaser.bitmapdata) |  |  | The BitmapData that the extracted pixels will be drawn to. |
| `r` | number |  |  | The red color component, in the range 0 - 255. |
| `g` | number |  |  | The green color component, in the range 0 - 255. |
| `b` | number |  |  | The blue color component, in the range 0 - 255. |
| `a` | number |  <optional> |  255  | The alpha color component, in the range 0 - 255 that the new pixel will be drawn at. |
| `resize` | boolean |  <optional> |  false  | Should the destination BitmapData be resized to match this one before the pixels are copied? |
| `r2` | number |  <optional> |  | An alternative red color component to be written to the destination, in the range 0 - 255. |
| `g2` | number |  <optional> |  | An alternative green color component to be written to the destination, in the range 0 - 255. |
| `b2` | number |  <optional> |  | An alternative blue color component to be written to the destination, in the range 0 - 255. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   The BitmapData that the extract pixels were drawn on.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1772](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1772))   ### 
fill(r, g, b, a) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Fills the BitmapData with the given color.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `r` | number |  |  | The red color value, between 0 and 0xFF (255). |
| `g` | number |  |  | The green color value, between 0 and 0xFF (255). |
| `b` | number |  |  | The blue color value, between 0 and 0xFF (255). |
| `a` | number |  <optional> |  1  | The alpha color value, between 0 and 1. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 494](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L494))   ### 
generateTexture(key) → {[PIXI.Texture](pixi.texture)}

  Creates a new Image element by converting this BitmapDatas canvas into a dataURL.

 The image is then stored in the image Cache using the key given.

 Finally a PIXI.Texture is created based on the image and returned.

 You can apply the texture to a sprite or any other supporting object by using either the  
key or the texture. First call generateTexture:

 `var texture = bitmapdata.generateTexture('ball');`

 Then you can either apply the texture to a sprite:

 `game.add.sprite(0, 0, texture);`

 or by using the string based key:

 `game.add.sprite(0, 0, 'ball');`

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key which will be used to store the image in the Cache. |

 ##### Returns

   [PIXI.Texture](pixi.texture) -   The newly generated texture.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 516](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L516))   ### 
getBounds(rect) → {[Phaser.Rectangle](phaser.rectangle)}

  Scans the BitmapData and calculates the bounds. This is a rectangle that defines the extent of all non-transparent pixels.  
The rectangle returned will extend from the top-left of the image to the bottom-right, excluding transparent pixels.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | If provided this Rectangle object will be populated with the bounds, otherwise a new object will be created. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   A Rectangle whose dimensions encompass the full extent of non-transparent pixels in this BitmapData.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1151](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1151))   ### 
getFirstPixel(direction) → {object}

  Scans the BitmapData, pixel by pixel, until it encounters a pixel that isn't transparent (i.e. has an alpha value > 0).  
It then stops scanning and returns an object containing the color of the pixel in r, g and b properties and the location in the x and y properties.

 The direction parameter controls from which direction it should start the scan:

 0 = top to bottom  
1 = bottom to top  
2 = left to right  
3 = right to left

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `direction` | number |  <optional> |  0  | The direction in which to scan for the first pixel. 0 = top to bottom, 1 = bottom to top, 2 = left to right and 3 = right to left. |

 ##### Returns

   object -   Returns an object containing the color of the pixel in the `r`, `g` and `b` properties and the location in the `x` and `y` properties.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1068](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1068))   ### 
getPixel(x, y, out) → {object}

  Get the color of a specific pixel in the context into a color object.  
If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,  
otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. |
| `y` | number |  | The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. |
| `out` | object |  <optional> | An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created. |

 ##### Returns

   object -   An object with the red, green, blue and alpha values set in the r, g, b and a properties.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 985](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L985))   ### 
getPixel32(x, y) → {number}

  Get the color of a specific pixel including its alpha value.  
If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,  
otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.  
Note that on little-endian systems the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. |
| `y` | number | The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. |

 ##### Returns

   number -   A native color value integer (format: 0xAARRGGBB)

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1016](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1016))   ### 
getPixelRGB(x, y, out, hsl, hsv) → {object}

  Get the color of a specific pixel including its alpha value as a color object containing r,g,b,a and rgba properties.  
If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer,  
otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. |
| `y` | number |  |  | The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. |
| `out` | object |  <optional> |  | An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. |
| `hsl` | boolean |  <optional> |  false  | Also convert the rgb values into hsl? |
| `hsv` | boolean |  <optional> |  false  | Also convert the rgb values into hsv? |

 ##### Returns

   object -   An object with the red, green and blue values set in the r, g and b properties.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1036](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1036))   ### 
getPixels(rect) → {ImageData}

  Gets all the pixels from the region specified by the given Rectangle object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) | The Rectangle region to get. |

 ##### Returns

   ImageData -   Returns a ImageData object containing a Uint8ClampedArray data property.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1055](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1055))   ### 
line(x1, y1, x2, y2, color, width) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Draws a line between the coordinates given in the color and thickness specified.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x1` | number |  |  | The x coordinate to start the line from. |
| `y1` | number |  |  | The y coordinate to start the line from. |
| `x2` | number |  |  | The x coordinate to draw the line to. |
| `y2` | number |  |  | The y coordinate to draw the line to. |
| `color` | string |  <optional> |  '#fff'  | The stroke color that the line will be drawn in. |
| `width` | number |  <optional> |  1  | The line thickness. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1920](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1920))   ### 
load(source) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Takes the given Game Object, resizes this BitmapData to match it and then draws it into this BitmapDatas canvas, ready for further processing.  
The source game object is not modified by this operation.  
If the source object uses a texture as part of a Texture Atlas or Sprite Sheet, only the current frame will be used for sizing.  
If a string is given it will assume it's a cache key and look in Phaser.Cache for an image key matching the string.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `source` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapData](phaser.bitmapdata) | Image | HTMLCanvasElement | string | The object that will be used to populate this BitmapData. If you give a string it will try and find the Image in the Game.Cache first. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 422](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L422))   ### 
move(x, y, wrap) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Shifts the contents of this BitmapData by the distances given.

 The image will wrap-around the edges on all sides if the wrap argument is true (the default).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | integer |  |  | The amount of pixels to horizontally shift the canvas by. Use a negative value to shift to the left, positive to the right. |
| `y` | integer |  |  | The amount of pixels to vertically shift the canvas by. Use a negative value to shift up, positive to shift down. |
| `wrap` | boolean |  <optional> |  true  | Wrap the content of the BitmapData. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L240))   ### 
moveH(distance, wrap) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Shifts the contents of this BitmapData horizontally.

 The image will wrap-around the sides if the wrap argument is true (the default).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `distance` | integer |  |  | The amount of pixels to horizontally shift the canvas by. Use a negative value to shift to the left, positive to the right. |
| `wrap` | boolean |  <optional> |  true  | Wrap the content of the BitmapData. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 267](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L267))   ### 
moveV(distance, wrap) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Shifts the contents of this BitmapData vertically.

 The image will wrap-around the sides if the wrap argument is true (the default).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `distance` | integer |  |  | The amount of pixels to vertically shift the canvas by. Use a negative value to shift up, positive to shift down. |
| `wrap` | boolean |  <optional> |  true  | Wrap the content of the BitmapData. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 330](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L330))   ### 
processPixel(callback, callbackContext, x, y, width, height) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Scans through the area specified in this BitmapData and sends the color for every pixel to the given callback along with its x and y coordinates.  
Whatever value the callback returns is set as the new color for that pixel, unless it returns the same color, in which case it's skipped.  
Note that the format of the color received will be different depending on if the system is big or little endian.  
It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead.  
The callback will also be sent the pixels x and y coordinates respectively.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The callback that will be sent each pixel color to be processed. |
| `callbackContext` | object |  |  | The context under which the callback will be called. |
| `x` | number |  <optional> |  0  | The x coordinate of the top-left of the region to process from. |
| `y` | number |  <optional> |  0  | The y coordinate of the top-left of the region to process from. |
| `width` | number |  <optional> |  | The width of the region to process. |
| `height` | number |  <optional> |  | The height of the region to process. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 700](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L700))   ### 
processPixelRGB(callback, callbackContext, x, y, width, height) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Scans through the area specified in this BitmapData and sends a color object for every pixel to the given callback.  
The callback will be sent a color object with 6 properties: `{ r: number, g: number, b: number, a: number, color: number, rgba: string }`.  
Where r, g, b and a are integers between 0 and 255 representing the color component values for red, green, blue and alpha.  
The `color` property is an Int32 of the full color. Note the endianess of this will change per system.  
The `rgba` property is a CSS style rgba() string which can be used with context.fillStyle calls, among others.  
The callback will also be sent the pixels x and y coordinates respectively.  
The callback must return either `false`, in which case no change will be made to the pixel, or a new color object.  
If a new color object is returned the pixel will be set to the r, g, b and a color values given within it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The callback that will be sent each pixel color object to be processed. |
| `callbackContext` | object |  |  | The context under which the callback will be called. |
| `x` | number |  <optional> |  0  | The x coordinate of the top-left of the region to process from. |
| `y` | number |  <optional> |  0  | The y coordinate of the top-left of the region to process from. |
| `width` | number |  <optional> |  | The width of the region to process. |
| `height` | number |  <optional> |  | The height of the region to process. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 642](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L642))   ### 
rect(x, y, width, height, fillStyle) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | The x coordinate of the top-left of the Rectangle. |
| `y` | number |  | The y coordinate of the top-left of the Rectangle. |
| `width` | number |  | The width of the Rectangle. |
| `height` | number |  | The height of the Rectangle. |
| `fillStyle` | string |  <optional> | If set the context fillStyle will be set to this value before the rect is drawn. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1825](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1825))   ### 
render() → {[Phaser.BitmapData](phaser.bitmapdata)}

  If the game is running in WebGL this will push the texture up to the GPU if it's dirty.  
This is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function.  
If you wish to suppress this functionality set BitmapData.disableTextureUpload to `true`.

  ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 2004](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L2004))   ### 
replaceRGB(r1, g1, b1, a1, r2, g2, b2, a2, region) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Replaces all pixels matching one color with another. The color values are given as two sets of RGBA values.  
An optional region parameter controls if the replacement happens in just a specific area of the BitmapData or the entire thing.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `r1` | number |  | The red color value to be replaced. Between 0 and 255. |
| `g1` | number |  | The green color value to be replaced. Between 0 and 255. |
| `b1` | number |  | The blue color value to be replaced. Between 0 and 255. |
| `a1` | number |  | The alpha color value to be replaced. Between 0 and 255. |
| `r2` | number |  | The red color value that is the replacement color. Between 0 and 255. |
| `g2` | number |  | The green color value that is the replacement color. Between 0 and 255. |
| `b2` | number |  | The blue color value that is the replacement color. Between 0 and 255. |
| `a2` | number |  | The alpha color value that is the replacement color. Between 0 and 255. |
| `region` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | The area to perform the search over. If not given it will replace over the whole BitmapData. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 754](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L754))   ### 
resize(width, height) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Resizes the BitmapData. This changes the size of the underlying canvas and refreshes the buffer.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | integer | The new width of the BitmapData. |
| `height` | integer | The new height of the BitmapData. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 552](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L552))   ### 
setHSL(h, s, l, region) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `h` | number |  <optional> |  null  | The hue, in the range 0 - 1. |
| `s` | number |  <optional> |  null  | The saturation, in the range 0 - 1. |
| `l` | number |  <optional> |  null  | The lightness, in the range 0 - 1. |
| `region` | [Phaser.Rectangle](phaser.rectangle) |  <optional> |  | The area to perform the operation on. If not given it will run over the whole BitmapData. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 804](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L804))   ### 
setPixel(x, y, red, green, blue, immediate) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the color of the given pixel to the specified red, green and blue values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. |
| `y` | number |  |  | The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. |
| `red` | number |  |  | The red color value, between 0 and 0xFF (255). |
| `green` | number |  |  | The green color value, between 0 and 0xFF (255). |
| `blue` | number |  |  | The blue color value, between 0 and 0xFF (255). |
| `immediate` | boolean |  <optional> |  true  | If `true` the context.putImageData will be called and the dirty flag set. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 967](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L967))   ### 
setPixel32(x, y, red, green, blue, alpha, immediate) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the color of the given pixel to the specified red, green, blue and alpha values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. |
| `y` | number |  |  | The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. |
| `red` | number |  |  | The red color value, between 0 and 0xFF (255). |
| `green` | number |  |  | The green color value, between 0 and 0xFF (255). |
| `blue` | number |  |  | The blue color value, between 0 and 0xFF (255). |
| `alpha` | number |  |  | The alpha color value, between 0 and 0xFF (255). |
| `immediate` | boolean |  <optional> |  true  | If `true` the context.putImageData will be called and the dirty flag set. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 928](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L928))   ### 
shadow(color, blur, x, y) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Sets the shadow properties of this BitmapDatas context which will affect all draw operations made to it.  
You can cancel an existing shadow by calling this method and passing no parameters.  
Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `color` | string |  |  | The color of the shadow, given in a CSS format, i.e. `#000000` or `rgba(0,0,0,1)`. If `null` or `undefined` the shadow will be reset. |
| `blur` | number |  <optional> |  5  | The amount the shadow will be blurred by. Low values = a crisp shadow, high values = a softer shadow. |
| `x` | number |  <optional> |  10  | The horizontal offset of the shadow in pixels. |
| `y` | number |  <optional> |  10  | The vertical offset of the shadow in pixels. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1706](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1706))   ### 
shiftHSL(h, s, l, region) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Shifts any or all of the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified.  
Shifting will add the given value onto the current h, s and l values, not replace them.  
The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `h` | number |  <optional> |  null  | The amount to shift the hue by. |
| `s` | number |  <optional> |  null  | The amount to shift the saturation by. |
| `l` | number |  <optional> |  null  | The amount to shift the lightness by. |
| `region` | [Phaser.Rectangle](phaser.rectangle) |  <optional> |  | The area to perform the operation on. If not given it will run over the whole BitmapData. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 865](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L865))   ### 
text(text, x, y, font, color, shadow) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Draws text to the BitmapData in the given font and color.  
The default font is 14px Courier, so useful for quickly drawing debug text.  
If you need to do a lot of font work to this BitmapData we'd recommend implementing your own text draw method.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `text` | string |  |  | The text to write to the BitmapData. |
| `x` | number |  |  | The x coordinate of the top-left of the text string. |
| `y` | number |  |  | The y coordinate of the top-left of the text string. |
| `font` | string |  <optional> |  '14px Courier'  | The font. This is passed directly to Context.font, so anything that can support, this can. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | The color the text will be drawn in. |
| `shadow` | boolean |  <optional> |  true  | Draw a single pixel black shadow below the text (offset by text.x/y + 1) |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1849](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1849))   ### 
textureLine(line, image, repeat) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Takes the given Line object and image and renders it to this BitmapData as a repeating texture line.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `line` | [Phaser.Line](phaser.line) |  |  | A Phaser.Line object that will be used to plot the start and end of the line. |
| `image` | string | Image |  |  | The key of an image in the Phaser.Cache to use as the texture for this line, or an actual Image. |
| `repeat` | string |  <optional> |  'repeat-x'  | The pattern repeat mode to use when drawing the line. Either `repeat`, `repeat-x` or `no-repeat`. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 1954](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L1954))   ### 
update(x, y, width, height) → {[Phaser.BitmapData](phaser.bitmapdata)}

  This re-creates the BitmapData.imageData from the current context.  
It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array.  
If not given the dimensions defaults to the full size of the context.

 Warning: This is a very expensive operation, so use it sparingly.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate of the top-left of the image data area to grab from. |
| `y` | number |  <optional> |  0  | The y coordinate of the top-left of the image data area to grab from. |
| `width` | number |  <optional> |  1  | The width of the image data area. |
| `height` | number |  <optional> |  1  | The height of the image data area. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   This BitmapData object for method chaining.

    Source code: [gameobjects/BitmapData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js) ([Line 596](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/BitmapData.js#L596))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.BitmapData.html>

Class: Phaser.Timer
===================

 Constructor
-----------

 ### 
new Timer(game, autoDestroy)

  A Timer is a way to create and manage [timer events](phaser.timerevent) that wait for a specific duration and then run a callback.  
Many different timer events, with individual delays, can be added to the same Timer.

 All Timer delays are in milliseconds (there are 1000 ms in 1 second); so a delay value of 250 represents a quarter of a second.

 Timers are based on real life time, adjusted for game pause durations.  
That is, *timer events are based on elapsed [game time](phaser.time)* and do *not* take physics time or slow motion into account.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `autoDestroy` | boolean |  <optional> |  true  | If true, the timer will automatically destroy itself after all the events have been dispatched (assuming no looping events). |

  Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L21))   Public Properties
-----------------

  ### 
[static] HALF : integer

  Number of milliseconds in half a second.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 175](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L175))   ### 
[static] MINUTE : integer

  Number of milliseconds in a minute.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L161))   ### 
[static] QUARTER : integer

  Number of milliseconds in a quarter of a second.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 182](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L182))   ### 
[static] SECOND : integer

  Number of milliseconds in a second.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L168))   ### 
autoDestroy : boolean

  If true, the timer will automatically destroy itself after all the events have been dispatched (assuming no looping events).

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L45))   ### 
[readonly] duration : number

  The duration in ms remaining until the next event will occur.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 677](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L677))   ### 
<internal> elapsed : number

  Elapsed time since the last frame (in ms).

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L58))   ### 
events : Array.<[Phaser.TimerEvent](phaser.timerevent)>

  An array holding all of this timers Phaser.TimerEvent objects. Use the methods add, repeat and loop to populate it.

  ##### Type

 * Array.<[Phaser.TimerEvent](phaser.timerevent)>

  Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L63))   ### 
[readonly] expired : boolean

  An expired Timer is one in which all of its events have been dispatched and none are pending.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L52))   ### 
<internal> game : [Phaser.Game](phaser.game)

  Local reference to game.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L29))   ### 
[readonly] length : number

  The number of pending events in the queue.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 699](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L699))   ### 
[readonly] ms : number

  The duration in milliseconds that this Timer has been running for.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 712](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L712))   ### 
[readonly] next : number

  The time at which the next event will occur.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 664](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L664))   ### 
<internal, readonly> nextTick : number

  The time the next tick will occur.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L79))   ### 
onComplete : [Phaser.Signal](phaser.signal)

  This signal will be dispatched when this Timer has completed which means that there are no more events in the queue.

 The signal is supplied with one argument, `timer`, which is this Timer object.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L72))   ### 
[readonly] paused : boolean

  The paused state of the Timer. You can pause the timer by calling Timer.pause() and Timer.resume() or by the game pausing.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L91))   ### 
[readonly] running : boolean

  True if the Timer is actively running.

 Do not modify this boolean - use [pause](phaser.timer#pause) (and [resume](phaser.timer#resume)) to pause the timer.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L39))   ### 
[readonly] seconds : number

  The duration in seconds that this Timer has been running for.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 734](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L734))   ### 
timeCap : number

  If the difference in time between two frame updates exceeds this value, the event times are reset to avoid catch-up situations.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L84))    Public Methods
--------------

  ### 
add(delay, callback, callbackContext, arguments) → {[Phaser.TimerEvent](phaser.timerevent)}

  Adds a new Event to this Timer.

 The event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running.  
The delay is in relation to when the Timer starts, not the time it was added. If the Timer is already running the delay will be calculated based on the timers current time.

 Make sure to call [start](phaser.timer#start) after adding all of the Events you require for this Timer.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `delay` | integer |  | The number of milliseconds, in [game time](phaser.time), before the timer event occurs. |
| `callback` | function |  | The callback that will be called when the timer event occurs. |
| `callbackContext` | object |  | The context in which the callback will be called. |
| `arguments` | \* |  <repeatable> | Additional arguments that will be supplied to the callback. |

 ##### Returns

   [Phaser.TimerEvent](phaser.timerevent) -   The Phaser.TimerEvent object that was created.

    Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 228](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L228))   ### 
<internal> adjustEvents()

  Adjusts the time of all pending events and the nextTick by the given baseTime.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 552](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L552))   ### 
<internal> clearPendingEvents()

  Clears any events from the Timer which have pendingDelete set to true and then resets the private \_len and \_i values.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 392](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L392))   ### 
destroy()

  Destroys this Timer. Any pending Events are not dispatched.  
The onComplete callbacks won't be called.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 646](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L646))   ### 
loop(delay, callback, callbackContext, arguments) → {[Phaser.TimerEvent](phaser.timerevent)}

  Adds a new looped Event to this Timer that will repeat forever or until the Timer is stopped.

 The event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running.  
The delay is in relation to when the Timer starts, not the time it was added. If the Timer is already running the delay will be calculated based on the timers current time.

 Make sure to call [start](phaser.timer#start) after adding all of the Events you require for this Timer.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `delay` | integer |  | The number of milliseconds, in [game time](phaser.time), before the timer event occurs. |
| `callback` | function |  | The callback that will be called when the timer event occurs. |
| `callbackContext` | object |  | The context in which the callback will be called. |
| `arguments` | \* |  <repeatable> | Additional arguments that will be supplied to the callback. |

 ##### Returns

   [Phaser.TimerEvent](phaser.timerevent) -   The Phaser.TimerEvent object that was created.

    Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 272](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L272))   ### 
<internal> order()

  Orders the events on this Timer so they are in tick order.  
This is called automatically when new events are created.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 354](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L354))   ### 
pause()

  Pauses the Timer and all events in the queue.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 510](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L510))   ### 
remove(event)

  Removes a pending TimerEvent from the queue.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | [Phaser.TimerEvent](phaser.timerevent) | The event to remove from the queue. |

  Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 334](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L334))   ### 
removeAll()

  Removes all Events from this Timer and all callbacks linked to onComplete, but leaves the Timer running.  
The onComplete callbacks won't be called.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 631](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L631))   ### 
repeat(delay, repeatCount, callback, callbackContext, arguments) → {[Phaser.TimerEvent](phaser.timerevent)}

  Adds a new TimerEvent that will always play through once and then repeat for the given number of iterations.

 The event will fire after the given amount of `delay` in milliseconds has passed, once the Timer has started running.  
The delay is in relation to when the Timer starts, not the time it was added.  
If the Timer is already running the delay will be calculated based on the timers current time.

 Make sure to call [start](phaser.timer#start) after adding all of the Events you require for this Timer.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `delay` | integer |  | The number of milliseconds, in [game time](phaser.time), before the timer event occurs. |
| `repeatCount` | number |  | The number of times the event will repeat once is has finished playback. A repeatCount of 1 means it will repeat itself once, playing the event twice in total. |
| `callback` | function |  | The callback that will be called when the timer event occurs. |
| `callbackContext` | object |  | The context in which the callback will be called. |
| `arguments` | \* |  <repeatable> | Additional arguments that will be supplied to the callback. |

 ##### Returns

   [Phaser.TimerEvent](phaser.timerevent) -   The Phaser.TimerEvent object that was created.

    Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L249))   ### 
resume()

  Resumes the Timer and updates all pending events.

   Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 590](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L590))   ### 
start(delay)

  Starts this Timer running.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `delay` | integer |  <optional> |  0  | The number of milliseconds, in [game time](phaser.time), that should elapse before the Timer will start. |

  Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L293))   ### 
stop(clearEvents)

  Stops this Timer from running. Does not cause it to be destroyed if autoDestroy is set to true.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `clearEvents` | boolean |  <optional> |  true  | If true all the events in Timer will be cleared, otherwise they will remain. |

  Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 316](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L316))   ### 
<internal> update(time) → {boolean}

  The main Timer update event, called automatically by Phaser.Time.update.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `time` | number | The time from the core game clock. |

 ##### Returns

   boolean -   True if there are still events waiting to be dispatched, otherwise false if this Timer can be destroyed.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [time/Timer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js) ([Line 415](https://github.com/photonstorm/phaser/tree/v2.6.2/src/time/Timer.js#L415))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Timer.html>

Class: Phaser.TilemapParser
===========================

 Constructor
-----------

 ### 
new TilemapParser()

  Phaser.TilemapParser parses data objects from Phaser.Loader that need more preparation before they can be inserted into a Tilemap.

   Source code: [tilemap/TilemapParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js) ([Line 13](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js#L13))   Public Properties
-----------------

  ### 
[static] INSERT\_NULL : boolean

  When scanning the Tiled map data the TilemapParser can either insert a null value (true) or  
a Phaser.Tile instance with an index of -1 (false, the default). Depending on your game type  
depends how this should be configured. If you've a large sparsely populated map and the tile  
data doesn't need to change then setting this value to `true` will help with memory consumption.  
However if your map is small, or you need to update the tiles (perhaps the map dynamically changes  
during the game) then leave the default value set.

   Source code: [tilemap/TilemapParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js#L26))    Public Methods
--------------

  ### 
<static> getEmptyData() → {object}

  Returns an empty map data object.

  ##### Returns

   object -   Generated map data.

    Source code: [tilemap/TilemapParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js) ([Line 135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js#L135))   ### 
<static> parse(game, key, tileWidth, tileHeight, width, height) → {object}

  Parse tilemap data from the cache and creates data for a Tilemap object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | Game reference to the currently running game. |
| `key` | string |  |  | The key of the tilemap in the Cache. |
| `tileWidth` | number |  <optional> |  32  | The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. |
| `tileHeight` | number |  <optional> |  32  | The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. |
| `width` | number |  <optional> |  10  | The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. |
| `height` | number |  <optional> |  10  | The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. |

 ##### Returns

   object -   The parsed map object.

    Source code: [tilemap/TilemapParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js#L28))   ### 
<static> parseCSV(key, data, tileWidth, tileHeight) → {object}

  Parses a CSV file into valid map data.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The name you want to give the map data. |
| `data` | string |  |  | The CSV file data. |
| `tileWidth` | number |  <optional> |  32  | The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. |
| `tileHeight` | number |  <optional> |  32  | The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. |

 ##### Returns

   object -   Generated map data.

    Source code: [tilemap/TilemapParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js#L77))   ### 
<static> parseJSON(json) → {object}

  Parses a Tiled JSON file into valid map data.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `json` | object | The JSON map data. |

 ##### Returns

   object -   Generated and parsed map data.

    Source code: [tilemap/TilemapParser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js) ([Line 180](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapParser.js#L180))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.TilemapParser.html>

Class: Phaser.QuadTree
======================

 Constructor
-----------

 ### 
new QuadTree(x, y, width, height, maxObjects, maxLevels, level)

  A QuadTree implementation. The original code was a conversion of the Java code posted to GameDevTuts.  
However I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result.  
Original version at https://github.com/timohausmann/quadtree-js/

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The top left coordinate of the quadtree. |
| `y` | number |  |  | The top left coordinate of the quadtree. |
| `width` | number |  |  | The width of the quadtree in pixels. |
| `height` | number |  |  | The height of the quadtree in pixels. |
| `maxObjects` | number |  <optional> |  10  | The maximum number of objects per node. |
| `maxLevels` | number |  <optional> |  4  | The maximum number of levels to iterate to. |
| `level` | number |  <optional> |  0  | Which level is this? |

  Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L23))   Public Properties
-----------------

  ### 
bounds : Object

  Object that contains the quadtree bounds.

   Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L45))   ### 
level : number

  The current level.

   Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L40))   ### 
maxLevels : number

  The maximum number of levels to break down to.

   Default Value * 4
 Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L35))   ### 
maxObjects : number

  The maximum number of objects per node.

   Default Value * 10
 Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L29))   ### 
nodes :array

  Array of associated child nodes.

   Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L55))   ### 
objects :array

  Array of quadtree children.

   Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L50))    Public Methods
--------------

  ### 
clear()

  Clear the quadtree.

   Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 295](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L295))   ### 
getIndex(rect) → {number}

  Determine which node the object belongs to.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) | object | The bounds in which to check. |

 ##### Returns

   number -   index - Index of the subnode (0-3), or -1 if rect cannot completely fit within a subnode and is part of the parent node.

    Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L203))   ### 
insert(body)

  Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding subnodes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `body` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | object | The Body object to insert into the quadtree. Can be any object so long as it exposes x, y, right and bottom properties. |

  Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 151](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L151))   ### 
populate(group)

  Populates this quadtree with the children of the given Group. In order to be added the child must exist and have a body property.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `group` | [Phaser.Group](phaser.group) | The Group to add to the quadtree. |

  Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L103))   ### 
populateHandler(sprite)

  Handler for the populate method.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | object | The Sprite to check. |

  Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L115))   ### 
reset(x, y, width, height, maxObjects, maxLevels, level)

  Resets the QuadTree.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The top left coordinate of the quadtree. |
| `y` | number |  |  | The top left coordinate of the quadtree. |
| `width` | number |  |  | The width of the quadtree in pixels. |
| `height` | number |  |  | The height of the quadtree in pixels. |
| `maxObjects` | number |  <optional> |  10  | The maximum number of objects per node. |
| `maxLevels` | number |  <optional> |  4  | The maximum number of levels to iterate to. |
| `level` | number |  <optional> |  0  | Which level is this? |

  Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L69))   ### 
retrieve(source) → {array}

  Return all objects that could collide with the given Sprite or Rectangle.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `source` | [Phaser.Sprite](phaser.sprite) | [Phaser.Rectangle](phaser.rectangle) | The source object to check the QuadTree against. Either a Sprite or Rectangle. |

 ##### Returns

   array -   * Array with all detected objects.

    Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 247](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L247))   ### 
split()

  Split the node into 4 subnodes

   Source code: [math/QuadTree.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/QuadTree.js#L130))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.QuadTree.html>

Class: Phaser.Net
=================

 Constructor
-----------

 ### 
new Net(game)

  Phaser.Net handles browser URL related tasks such as checking host names, domain names and query string manipulation.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [net/Net.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js#L14))   Public Methods
--------------

  ### 
checkDomainName(domain) → {boolean}

  Compares the given domain name against the hostname of the browser containing the game.  
If the domain name is found it returns true.  
You can specify a part of a domain, for example 'google' would match 'google.com', 'google.co.uk', etc.  
Do not include 'http://' at the start.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `domain` | string |  |

 ##### Returns

   boolean -   true if the given domain fragment can be found in the window.location.hostname

    Source code: [net/Net.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js#L38))   ### 
decodeURI(value) → {string}

  Takes a Uniform Resource Identifier (URI) component (previously created by encodeURIComponent or by a similar routine) and  
decodes it, replacing \ with spaces in the return. Used internally by the Net classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | string | The URI component to be decoded. |

 ##### Returns

   string -   The decoded value.

    Source code: [net/Net.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js) ([Line 152](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js#L152))   ### 
getHostName() → {string}

  Returns the hostname given by the browser.

  ##### Returns

   string -    Source code: [net/Net.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js#L22))   ### 
getQueryString(parameter) → {string | object}

  Returns the Query String as an object.  
If you specify a parameter it will return just the value of that parameter, should it exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parameter` | string |  <optional> |  ''  | If specified this will return just the value for that key. |

 ##### Returns

   string | object -   An object containing the key value pairs found in the query string or just the value if a parameter was given.

    Source code: [net/Net.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js) ([Line 116](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js#L116))   ### 
updateQueryString(key, value, redirect, url) → {string}

  Updates a value on the Query String and returns it in full.  
If the value doesn't already exist it is set.  
If the value exists it is replaced with the new value given. If you don't provide a new value it is removed from the query string.  
Optionally you can redirect to the new url, or just return it as a string.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The querystring key to update. |
| `value` | string | The new value to be set. If it already exists it will be replaced. |
| `redirect` | boolean | If true the browser will issue a redirect to the url with the new querystring. |
| `url` | string | The URL to modify. If none is given it uses window.location.href. |

 ##### Returns

   string -   If redirect is false then the modified url and query string is returned.

    Source code: [net/Net.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/net/Net.js#L52))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Net.html>

Class: Phaser.Group
===================

 Constructor
-----------

 ### 
new Group(game, parent, name, addToStage, enableBody, physicsBodyType)

  A Group is a container for [display objects](global#DisplayObject) including [Sprites](phaser.sprite) and [Images](phaser.image).

 Groups form the logical tree structure of the display/scene graph where local transformations are applied to children.  
For instance, all children are also moved/rotated/scaled when the group is moved/rotated/scaled.

 In addition, Groups provides support for fast pooling and object recycling.

 Groups are also display objects and can be nested as children within other Groups.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `parent` | [DisplayObject](global#DisplayObject) | null |  <optional> |  (game world)  | The parent Group (or other [DisplayObject](global#DisplayObject)) that this group will be added to. If undefined/unspecified the Group will be added to the [Game World](phaser.game#world); if null the Group will not be added to any parent. |
| `name` | string |  <optional> |  'group'  | A name for this group. Not used internally but useful for debugging. |
| `addToStage` | boolean |  <optional> |  false  | If true this group will be added directly to the Game.Stage instead of Game.World. |
| `enableBody` | boolean |  <optional> |  false  | If true all Sprites created with #create or #createMulitple will have a physics body created on them. Change the body type with #physicsBodyType. |
| `physicsBodyType` | integer |  <optional> |  0  | The physics body type to use when physics bodies are automatically added. See #physicsBodyType for values. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L27))   Extends
-------

 * [PIXI.DisplayObjectContainer](pixi.displayobjectcontainer)

 Public Properties
-----------------

  ### 
[static] RETURN\_ALL : integer

  A returnType value, as specified in [iterate](phaser.group#iterate) eg.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 325](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L325))   ### 
[static] RETURN\_CHILD : integer

  A returnType value, as specified in [iterate](phaser.group#iterate) eg.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 318](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L318))   ### 
[static] RETURN\_NONE : integer

  A returnType value, as specified in [iterate](phaser.group#iterate) eg.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 304](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L304))   ### 
[static] RETURN\_TOTAL : integer

  A returnType value, as specified in [iterate](phaser.group#iterate) eg.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 311](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L311))   ### 
[static] SORT\_ASCENDING : integer

  A sort ordering value, as specified in [sort](phaser.group#sort) eg.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 332](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L332))   ### 
[static] SORT\_DESCENDING : integer

  A sort ordering value, as specified in [sort](phaser.group#sort) eg.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 339](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L339))   ### 
alive : boolean

  The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

   Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L93))   ### 
alpha : number

  The alpha value of the group container.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 3003](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L3003))   ### 
angle : number

  The angle of rotation of the group container, in degrees.

 This adjusts the group itself by modifying its local rotation transform.

 This has no impact on the rotation/angle properties of the children, but it will update their worldTransform  
and on-screen orientation and position.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2682))   ### 
bottom : number

  The bottom coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2845](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2845))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  If this object is [fixedToCamera](phaser.group#fixedToCamera) then this stores the x/y position offset relative to the top-left of the camera view.  
If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 272](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L272))   ### 
centerX : number

  The center x coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2705](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2705))   ### 
centerY : number

  The center y coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2733](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2733))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
classType : Object

  The type of objects that will be created when using [create](phaser.group#create) or [createMultiple](phaser.group#createMultiple).

 Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments:  
when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

   Default Value * [Phaser.Sprite](phaser.sprite)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L130))   ### 
cursor : [DisplayObject](global#DisplayObject)

  The current display object that the group cursor is pointing to, if any. (Can be set manually.)

 The cursor is a way to iterate through the children in a Group using [next](phaser.group#next) and [previous](phaser.group#previous).

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L138))   ### 
[readonly] cursorIndex : integer

  The current index of the Group cursor. Advance it with Group.next.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 255](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L255))   ### 
enableBody : boolean

  If true all Sprites created by, or added to this group, will have a physics body enabled on them.

 If there are children already in the Group at the time you set this property, they are not changed.

 The default body type is controlled with [physicsBodyType](phaser.group#physicsBodyType).

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L208))   ### 
enableBodyDebug : boolean

  If true when a physics body is created (via [enableBody](phaser.group#enableBody)) it will create a physics debug object as well.

 This only works for P2 bodies.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L217))   ### 
exists : boolean

  If exists is true the group is updated, otherwise it is skipped.

   Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L100))   ### 
fixedToCamera : boolean

  A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

 Note that the cameraOffset values are in addition to any parent in the display list.  
So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 265](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L265))   ### 
<internal> game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L38))   ### 
hash :array

  The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

 Only children of this Group can be added to and removed from the hash.

 This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.  
However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own  
sorting and filtering of Group children without touching their z-index (and therefore display draw order)

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 285](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L285))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
ignoreDestroy : boolean

  A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L107))   ### 
inputEnableChildren : boolean

  A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true`  
on any children *added* to, or *created by*, this Group.

 If there are children already in the Group at the time you set this property, they are not changed.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L149))   ### 
left : number

  The left coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2761](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2761))   ### 
[readonly] length : integer

  Total number of children in this group, regardless of exists/alive status.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2665](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2665))   ### 
name : string

  A name for this group. Not used internally but useful for debugging.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L49))   ### 
onChildInputDown : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L161))   ### 
onChildInputOut : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L198))   ### 
onChildInputOver : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L186))   ### 
onChildInputUp : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal,  
a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer  
is still over the Sprite or not.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L174))   ### 
onDestroy : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the group is destroyed.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L249))   ### 
pendingDestroy : boolean

  A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method  
called on the next logic update.  
You can set it directly to flag the Group to be destroyed on its next update.

 This is extremely useful if you wish to destroy a Group from within one of its own callbacks  
or a callback of one of its children.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L119))   ### 
physicsBodyType : integer

  If [enableBody](phaser.group#enableBody) is true this is the type of physics body that is created on new Sprites.

 The valid values are [Phaser.Physics.ARCADE](phaser.physics#.ARCADE), [Phaser.Physics.P2JS](phaser.physics#.P2JS), [Phaser.Physics.NINJA](phaser.physics#.NINJA), etc.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L225))   ### 
physicsSortDirection : integer

  If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

 It should be set to one of the Phaser.Physics.Arcade sort direction constants: 

 Phaser.Physics.Arcade.SORT\_NONE  
Phaser.Physics.Arcade.LEFT\_RIGHT  
Phaser.Physics.Arcade.RIGHT\_LEFT  
Phaser.Physics.Arcade.TOP\_BOTTOM  
Phaser.Physics.Arcade.BOTTOM\_TOP

 If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 243](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L243))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L86))   ### 
right : number

  The right coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2789](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2789))   ### 
rotation : number

  The angle of rotation of the group container, in radians.

 This will adjust the group container itself by modifying its rotation.  
This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2987](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2987))   ### 
top : number

  The top coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2817](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2817))   ### 
[readonly] total : integer

  Total number of existing children in the group.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2648](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2648))   ### 
<internal> type : integer

  Internal Phaser Type value.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L80))   ### 
visible : boolean

  The visible state of the group. Non-visible Groups and all of their children are not rendered.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2996](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2996))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))   ### 
x : number

  The x coordinate of the group container.

 You can adjust the group container itself by modifying its coordinates.  
This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2969))   ### 
y : number

  The y coordinate of the group container.

 You can adjust the group container itself by modifying its coordinates.  
This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2978](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2978))   ### 
[readonly] z : integer

  The z-depth value of this object within its parent container/Group - the World is a Group as well.  
This value must be unique for each child in a Group.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L57))    Public Methods
--------------

  ### 
add(child, silent, index) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object as the top child in this group.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If the child was already in this Group, it is simply returned, and nothing else happens to it.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

 Use [addAt](phaser.group#addAt) to control where a child is added. Use [create](phaser.group#create) to create and add a new child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L341))   ### 
addAll(property, amount, checkAlive, checkVisible)

  Adds the amount to the given property on all children in this group.

 `Group.addAll('x', 10)` will add 10 to the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to increment, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1386))   ### 
addAt(child, index, silent) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object to this group.

 The child is added to the group at the location specified by the index value, this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `index` | integer |  <optional> |  0  | The index within the group to insert the child to. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 418](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L418))   ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
addMultiple(children, silent) → {Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group)}

  Adds an array of existing Display Objects to this Group.

 The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

 As well as an array you can also pass another Group as the first argument. In this case all of the children from that  
Group will be removed from it and added into this Group.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `children` | Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) |  |  | An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) -   The array of children or Group of children that were added to this Group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 489](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L489))   ### 
addToHash(child) → {boolean}

  Adds a child of this Group into the hash array.  
This call will return false if the child is not a child of this Group, or is already in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash. |

 ##### Returns

   boolean -   True if the child was successfully added to the hash, otherwise false.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 439](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L439))   ### 
align(width, height, cellWidth, cellHeight, position, offset) → {boolean}

  This method iterates through all children in the Group (regardless if they are visible or exist)  
and then changes their position so they are arranged in a Grid formation. Children must have  
the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have  
this.

 The grid dimensions are determined by the first four arguments. The `width` and `height` arguments  
relate to the width and height of the grid respectively.

 For example if the Group had 100 children in it:

 `Group.align(10, 10, 32, 32)`

 This will align all of the children into a grid formation of 10x10, using 32 pixels per  
grid cell. If you want a wider grid, you could do:

 `Group.align(25, 4, 32, 32)`

 This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

 You can choose to set *either* the `width` or `height` value to -1. Doing so tells the method  
to keep on aligning children until there are no children left. For example if this Group had  
48 children in it, the following:

 `Group.align(-1, 8, 32, 32)`

 ... will align the children so that there are 8 children vertically (the second argument),  
and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

 You can also do:

 `Group.align(10, -1, 32, 32)`

 In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit  
all of the children in.

 The `position` property allows you to control where in each grid cell the child is positioned.  
This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`,  
`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`,  
`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

 The final argument; `offset` lets you start the alignment from a specific child index.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | integer |  |  | The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value. |
| `height` | integer |  |  | The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value. |
| `cellWidth` | integer |  |  | The width of each grid cell, in pixels. |
| `cellHeight` | integer |  |  | The height of each grid cell, in pixels. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offset` | integer |  <optional> |  0  | Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value. |

 ##### Returns

   boolean -   True if the Group children were aligned, otherwise false.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L682))   ### 
alignIn(container, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation and scale of its children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2873](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2873))   ### 
alignTo(parent, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation and scale of the children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2915](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2915))   ### 
<internal> ascendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1919](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1919))   ### 
bringToTop(child) → {any}

  Brings the given child to the top of this group so it renders above all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to bring to the top of this group. |

 ##### Returns

   any -   The child that was moved.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 907](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L907))   ### 
callAll(method, context, args)

  Calls a function, specified by name, on all on children.

 The function is called for all children regardless if they are dead or alive (see callAllExists for different options).  
After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `method` | string |  |  | Name of the function on the child to call. Deep property lookup is supported. |
| `context` | string |  <optional> |  null  | A string containing the context under which the method will be executed. Set to null to default to the child. |
| `args` | any |  <repeatable> |  | Additional parameters that will be passed to the method. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1538](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1538))   ### 
callAllExists(callback, existsValue, parameter)

  Calls a function, specified by name, on all children in the group who exist (or do not exist).

 After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `callback` | string |  | Name of the function on the children to call. |
| `existsValue` | boolean |  | Only children with exists=existsValue will be called. |
| `parameter` | any |  <repeatable> | Additional parameters that will be passed to the callback. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1454](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1454))   ### 
<internal> callbackFromArray(child, callback, length)

  Returns a reference to a function that exists on a child of the group based on the given callback array.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | object | The object to inspect. |
| `callback` | array | The array of function names. |
| `length` | integer | The size of the array (pre-calculated in callAll). |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1488](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1488))   ### 
checkAll(key, value, checkAlive, checkVisible, force)

  Quickly check that the same property across all children of this group is equal to the given value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be checked. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be checked. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be checked. This includes any Groups that are children. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1353](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1353))   ### 
checkProperty(child, key, value, force) → {boolean}

  Checks a property for the given value on the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to check the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be checked. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

 ##### Returns

   boolean -   True if the property was was equal to value, false if not.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1217))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
countDead() → {integer}

  Get the number of dead children in this group.

  ##### Returns

   integer -   The number of children flagged as dead.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2338))   ### 
countLiving() → {integer}

  Get the number of living children in this group.

  ##### Returns

   integer -   The number of children flagged as alive.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2326](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2326))   ### 
create(x, y, key, frame, exists, index) → {[DisplayObject](global#DisplayObject)}

  Creates a new Phaser.Sprite object and adds it to the top of this group.

 Use [classType](phaser.group#classType) to change the type of object created.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point. |
| `y` | number |  |  | The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `exists` | boolean |  <optional> |  true  | The default exists state of the Sprite. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was created: will be a [Phaser.Sprite](phaser.sprite) unless #classType has been changed.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 544](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L544))   ### 
createMultiple(quantity, key, frame, exists) → {array}

  Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

 This method is useful if you need to quickly generate a pool of sprites, such as bullets.

 Use [classType](phaser.group#classType) to change the type of object created.

 You can provide an array as the `key` and / or `frame` arguments. When you do this  
it will create `quantity` Sprites for every key (and frame) in the arrays.

 For example:

 `createMultiple(25, ['ball', 'carrot'])`

 In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be  
created in total, 25 of each. You can also have the `frame` as an array:

 `createMultiple(5, 'bricks', [0, 1, 2, 3])`

 In the above there is one key (bricks), which is a sprite sheet. The frames array tells  
this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because  
the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with  
frame 1, and so on.

 If you set both the key and frame arguments to be arrays then understand it will create  
a total quantity of sprites equal to the size of both arrays times each other. I.e.:

 `createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

 The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.  
It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.  
In total it will have created 120 sprites.

 By default the Sprites will have their `exists` property set to `false`, and they will be  
positioned at 0x0, relative to the `Group.x / y` values.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | integer |  |  | The number of Sprites to create. |
| `key` | string | array |  |  | The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used. |
| `frame` | integer | string | array |  <optional> |  0  | If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used. |
| `exists` | boolean |  <optional> |  false  | The default exists state of the Sprite. |

 ##### Returns

   array -   An array containing all of the Sprites that were created.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 581](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L581))   ### 
customSort(sortHandler, context)

  Sort the children in the group according to custom sort function.

 The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).  
It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sortHandler` | function |  | The custom sort function. |
| `context` | object |  <optional> | The context in which the sortHandler is called. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1895](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1895))   ### 
<internal> descendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1951](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1951))   ### 
destroy(destroyChildren, soft)

  Destroys this group.

 Removes all children, then removes this group from its parent and nulls references.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | If true `destroy` will be invoked on each removed child. |
| `soft` | boolean |  <optional> |  false  | A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2611))   ### 
divideAll(property, amount, checkAlive, checkVisible)

  Divides the given property by the amount on all children in this group.

 `Group.divideAll('x', 2)` will half the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to divide, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1437))   ### 
filter(predicate, checkExists) → {[Phaser.ArraySet](phaser.arrayset)}

  Find children matching a certain predicate.

 For example:

 
```
var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');
```

Note: Currently this will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `predicate` | function |  |  | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third |
| `checkExists` | boolean |  <optional> |  false  | If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate. |

 ##### Returns

   [Phaser.ArraySet](phaser.arrayset) -   Returns an array list containing all the children that the predicate returned true for

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1677](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1677))   ### 
forEach(callback, callbackContext, checkExists, args)

  Call a function on each child in this group.

 Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

 
```
Group.forEach(awardBonusGold, this, true, 100, 500)
```

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

 Note: This check will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `checkExists` | boolean |  <optional> |  false  | If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed. |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1717))   ### 
forEachAlive(callback, callbackContext, args)

  Call a function on each alive child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1799](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1799))   ### 
forEachDead(callback, callbackContext, args)

  Call a function on each dead child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1827](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1827))   ### 
forEachExists(callback, callbackContext, args)

  Call a function on each existing child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1771](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1771))   ### 
getAll(property, value, startIndex, endIndex) → {any}

  Returns all children in this Group.

 You can optionally specify a matching criteria using the `property` and `value` arguments.

 For example: `getAll('exists', true)` would return only children that have their exists property set.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `property` | string |  <optional> |  | An optional property to test against the value argument. |
| `value` | any |  <optional> |  | If property is set then Child.property must strictly equal this value to be included in the results. |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up until. |

 ##### Returns

   any -   A random existing child of this Group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2392](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2392))   ### 
getAt(index) → {[DisplayObject](global#DisplayObject) | integer}

  Returns the child found at the given index within this group.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index to return the child from. |

 ##### Returns

   [DisplayObject](global#DisplayObject) | integer -   The child that was found at the given index, or -1 for an invalid index.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 524](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L524))   ### 
getBottom() → {any}

  Returns the child at the bottom of this group.

 The bottom child the child being displayed (rendered) below every other child.

  ##### Returns

   any -   The child at the bottom of the Group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2221))   ### 
getBounds(targetCoordinateSpace) → {Rectangle}

  Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `targetCoordinateSpace` | PIXIDisplayObject | PIXIMatrix |  <optional> | Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. |

 ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getBounds](pixi.displayobjectcontainer#getBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 280](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L280))   ### 
getByName(name) → {any}

  Searches the Group for the first instance of a child with the `name`  
property matching the given argument. Should more than one child have  
the same name only the first instance is returned.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name to search for. |

 ##### Returns

   any -   The first child with a matching name, or null if none were found.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1042](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1042))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getClosestTo(object, callback, callbackContext) → {any}

  Get the closest child to given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child closest to given object, or `null` if no child was found.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2238](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2238))   ### 
getFirstAlive(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is alive (`child.alive === true`).

 This is handy for choosing a squad leader, etc.

 You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The alive dead child, or `null` if none found and `createIfNull` was false.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2105))   ### 
getFirstDead(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is dead (`child.alive === false`).

 This is handy for checking if everything has been wiped out and adding to the pool as needed.

 You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no dead children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first dead child, or `null` if none found and `createIfNull` was false.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2135))   ### 
getFirstExists(exists, createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first display object that exists, or doesn't exist.

 You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `exists` | boolean |  <optional> |  true  | If true, find the first existing child; otherwise find the first non-existing child. |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first child, or `null` if none found and `createIfNull` was false.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2071](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2071))   ### 
getFurthestFrom(object, callback, callbackContext) → {any}

  Get the child furthest away from the given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child furthest from the given object, or `null` if no child was found.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2282](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2282))   ### 
getIndex(child) → {integer}

  Get the index position of the given child in this group, which should match the child's `z` property.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to get the index for. |

 ##### Returns

   integer -   The index of the child or -1 if it's not a member of this group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1029](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1029))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
getRandom(startIndex, length) → {any}

  Returns a random child from the group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | Offset from the front of the group (lowest child). |
| `length` | integer |  <optional> |  (to top)  | Restriction on the number of values you want to randomly select from. |

 ##### Returns

   any -   A random child of this Group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2350](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2350))   ### 
getRandomExists(startIndex, endIndex) → {any}

  Returns a random child from the Group that has `exists` set to `true`.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up to. |

 ##### Returns

   any -   A random child of this Group that exists.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2372](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2372))   ### 
getTop() → {any}

  Return the child at the top of this group.

 The top child is the child displayed (rendered) above every other child.

  ##### Returns

   any -   The child at the top of the Group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2204))   ### 
hasProperty(child, key) → {boolean}

  Checks if the child has the given property.

 Will scan up to 4 levels deep only.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to check for the existence of the property on. |
| `key` | Array.<string> | An array of strings that make up the property. |

 ##### Returns

   boolean -   True if the child has the property, otherwise false.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1104))   ### 
iterate(key, value, returnType, callback, callbackContext, args) → {any}

  Iterates over the children of the group performing one of several actions for matched children.

 A child is considered a match when it has a property, named `key`, whose value is equal to `value`  
according to a strict equality comparison.

 The result depends on the `returnType`:

 * [RETURN\_TOTAL](phaser.group#.RETURN_TOTAL):  
 The callback, if any, is applied to all matching children. The number of matched children is returned.
* [RETURN\_NONE](phaser.group#.RETURN_NONE):  
 The callback, if any, is applied to all matching children. No value is returned.
* [RETURN\_CHILD](phaser.group#.RETURN_CHILD):  
 The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.  
 If there is no matching child then null is returned.

 If `args` is specified it must be an array. The matched child will be assigned to the first  
element and the entire array will be applied to the callback function.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The child property to check, i.e. 'exists', 'alive', 'health' |
| `value` | any |  |  | A child matches if `child[key] === value` is true. |
| `returnType` | integer |  |  | How to iterate the children and what to return. |
| `callback` | function |  <optional> |  null  | Optional function that will be called on each matching child. The matched child is supplied as the first argument. |
| `callbackContext` | object |  <optional> |  | The context in which the function should be called (usually 'this'). |
| `args` | Array.<any> |  <optional> |  (none)  | The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child. |

 ##### Returns

   any -   Returns either an integer (for RETURN\_TOTAL), the first matched child (for RETURN\_CHILD), or null.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1976](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1976))   ### 
moveAll(group, silent) → {[Phaser.Group](phaser.group)}

  Moves all children from this Group to the Group given.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `group` | [Phaser.Group](phaser.group) |  |  | The new Group to which the children will be moved to. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event for the new Group. |

 ##### Returns

   [Phaser.Group](phaser.group) -   The Group to which all the children were moved.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2479](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2479))   ### 
moveDown(child) → {any}

  Moves the given child down one place in this group unless it's already at the bottom.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move down in the group. |

 ##### Returns

   any -   The child that was moved.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L969))   ### 
moveUp(child) → {any}

  Moves the given child up one place in this group unless it's already at the top.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move up in the group. |

 ##### Returns

   any -   The child that was moved.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 945](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L945))   ### 
multiplyAll(property, amount, checkAlive, checkVisible)

  Multiplies the given property by the amount on all children in this group.

 `Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to multiply, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1420](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1420))   ### 
next() → {any}

  Advances the group cursor to the next (higher) object in the group.

 If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

  ##### Returns

   any -   The child the cursor now points to.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 833](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L833))   ### 
<internal> postUpdate()

  The core postUpdate - as called by World.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1656](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1656))   ### 
<internal> preUpdate()

  The core preUpdate - as called by World.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1611))   ### 
previous() → {any}

  Moves the group cursor to the previous (lower) child in the group.

 If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

  ##### Returns

   any -   The child the cursor now points to.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 862](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L862))   ### 
remove(child, destroy, silent) → {boolean}

  Removes the given child from this group.

 This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

 If the group cursor was referring to the removed child it is updated to refer to the next child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to remove. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on the removed child. |
| `silent` | boolean |  <optional> |  false  | If true the the child will not dispatch the `onRemovedFromGroup` event. |

 ##### Returns

   boolean -   true if the child was removed from this group, otherwise false.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2431](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2431))   ### 
removeAll(destroy, silent, destroyTexture)

  Removes all children from this Group, but does not remove the group from its parent.

 The children can be optionally destroyed as they are removed.

 You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |
| `destroyTexture` | boolean |  <optional> |  false  | If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2508](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2508))   ### 
removeBetween(startIndex, endIndex, destroy, silent)

  Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  |  | The index to start removing children from. |
| `endIndex` | integer |  <optional> |  | The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2556](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2556))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
removeFromHash(child) → {boolean}

  Removes a child of this Group from the hash array.  
This call will return false if the child is not in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to remove from this Groups hash. Must be a member of this Group and in the hash. |

 ##### Returns

   boolean -   True if the child was successfully removed from the hash, otherwise false.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 464](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L464))   ### 
replace(oldChild, newChild) → {any}

  Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `oldChild` | any | The child in this group that will be replaced. |
| `newChild` | any | The child to be inserted into this group. |

 ##### Returns

   any -   Returns the oldChild that was replaced within this group.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1065](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1065))   ### 
resetChild(child, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

 If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

 The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  | The child to reset and/or load the texture on. |
| `x` | number |  <optional> | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was reset: usually a [Phaser.Sprite](phaser.sprite).

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2165))   ### 
resetCursor(index) → {any}

  Sets the group cursor to the first child in the group.

 If the optional index parameter is given it sets the cursor to the object at that index instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `index` | integer |  <optional> |  0  | Set the cursor to point to a specific index. |

 ##### Returns

   any -   The child the cursor now points to.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 806](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L806))   ### 
reverse()

  Reverses all children in this group.

 This operation applies only to immediate children and does not propagate to subgroups.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1015](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1015))   ### 
sendToBack(child) → {any}

  Sends the given child to the bottom of this group so it renders below all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to send to the bottom of this group. |

 ##### Returns

   any -   The child that was moved.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 926](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L926))   ### 
set(child, key, value, checkAlive, checkVisible, operation, force) → {boolean}

  Quickly set a property on a single child of this group to a new value.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [Phaser.Sprite](phaser.sprite) |  |  | The child to set the property on. |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then the child will only be updated if alive=true. |
| `checkVisible` | boolean |  <optional> |  false  | If set then the child will only be updated if visible=true. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1246))   ### 
setAll(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group to a new value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.  
If you need that ability please see `Group.setAllChildren`.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1277](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1277))   ### 
setAllChildren(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group, and any child Groups, to a new value.

 If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.  
Unlike with `setAll` the property is NOT set on child Groups itself.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1312](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1312))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setProperty(child, key, value, operation, force) → {boolean}

  Sets a property to the given value on the child. The operation parameter controls how the value is set.

 The operations are:

 * 0: set the existing value to the given value; if force is `true` a new property will be created if needed
* 1: will add the given value to the value already present.
* 2: will subtract the given value from the value already present.
* 3: will multiply the value already present by the given value.
* 4: will divide the value already present by the given value.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to set the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be set. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1139))   ### 
sort(key, order)

  Sort the children in the group according to a particular key and ordering.

 Call this function to sort the group according to a particular key value and order.

 For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

 Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including  
alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  <optional> |  'z'  | The name of the property to sort on. Defaults to the objects z-depth value. |
| `order` | integer |  <optional> |  Phaser.Group.SORT\_ASCENDING  | Order ascending ([SORT\_ASCENDING](phaser.group#.SORT_ASCENDING)) or descending ([SORT\_DESCENDING](phaser.group#.SORT_DESCENDING)). |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1855](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1855))   ### 
subAll(property, amount, checkAlive, checkVisible)

  Subtracts the amount from the given property on all children in this group.

 `Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to decrement, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1403](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1403))   ### 
swap(child1, child2)

  Swaps the position of two children in this group.

 Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child1` | any | The first child to swap. |
| `child2` | any | The second child to swap. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 891](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L891))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
<internal> update()

  The core update - as called by World.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1639](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1639))   ### 
<internal> updateZ()

  Internal method that re-applies all of the children's Z values.

 This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 663](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L663))   ### 
xy(index, x, y)

  Positions the child found at the given index within this group to the given x and y coordinates.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index of the child in the group to set the position of. |
| `x` | number | The new x position of the child. |
| `y` | number | The new y position of the child. |

  Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 993](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L993))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Group.html>

Class: Phaser.Point
===================

 Constructor
-----------

 ### 
new Point(x, y)

  A Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis.  
The following code creates a point at (0,0):  
`var myPoint = new Phaser.Point();`  
You can also use them as 2D Vectors and you'll find different vector related methods in this class.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The horizontal position of this Point. |
| `y` | number |  <optional> |  0  | The vertical position of this Point. |

  Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 18](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L18))   Public Properties
-----------------

  ### 
[readonly] type : number

  The const type of this object.

   Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L37))   ### 
x : number

  The x value of the point.

   Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L26))   ### 
y : number

  The y value of the point.

   Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L31))    Public Methods
--------------

  ### 
<static> add(a, b, out) → {[Phaser.Point](phaser.point)}

  Adds the coordinates of two points together to create a new point.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The first Point object. |
| `b` | [Phaser.Point](phaser.point) |  | The second Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 491](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L491))   ### 
<static> angle(a, b) → {number}

  Returns the angle between two Point objects.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) | The first Point object. |
| `b` | [Phaser.Point](phaser.point) | The second Point object. |

 ##### Returns

   number -   The angle between the two Points.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 585](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L585))   ### 
<static> centroid(points, out) → {[Phaser.Point](phaser.point)}

  Calculates centroid (or midpoint) from an array of points. If only one point is provided, that point is returned.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `points` | Array.<[Phaser.Point](phaser.point)> |  | The array of one or more points. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 832](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L832))   ### 
<static> distance(a, b, round) → {number}

  Returns the euclidian distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | object |  |  | The target object. Must have visible x and y properties that represent the center of the object. |
| `b` | object |  |  | The target object. Must have visible x and y properties that represent the center of the object. |
| `round` | boolean |  <optional> |  false  | Round the distance to the nearest integer. |

 ##### Returns

   number -   The distance between this Point object and the destination Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 684](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L684))   ### 
<static> divide(a, b, out) → {[Phaser.Point](phaser.point)}

  Divides the coordinates of two points to create a new point.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The first Point object. |
| `b` | [Phaser.Point](phaser.point) |  | The second Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 551](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L551))   ### 
<static> equals(a, b) → {boolean}

  Determines whether the two given Point objects are equal. They are considered equal if they have the same x and y values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) | The first Point object. |
| `b` | [Phaser.Point](phaser.point) | The second Point object. |

 ##### Returns

   boolean -   A value of true if the Points are equal, otherwise false.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L571))   ### 
<static> interpolate(a, b, f, out) → {[Phaser.Point](phaser.point)}

  Interpolates the two given Points, based on the `f` value (between 0 and 1) and returns a new Point.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The first Point object. |
| `b` | [Phaser.Point](phaser.point) |  | The second Point object. |
| `f` | number |  | The level of interpolation between the two points. Indicates where the new point will be, along the line between pt1 and pt2. If f=1, pt1 is returned; if f=0, pt2 is returned. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 634](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L634))   ### 
<static> multiply(a, b, out) → {[Phaser.Point](phaser.point)}

  Multiplies the coordinates of two points to create a new point.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The first Point object. |
| `b` | [Phaser.Point](phaser.point) |  | The second Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 531](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L531))   ### 
<static> multiplyAdd(a, b, s, out) → {[Phaser.Point](phaser.point)}

  Adds two 2D Points together and multiplies the result by the given scalar.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The first Point object. |
| `b` | [Phaser.Point](phaser.point) |  | The second Point object. |
| `s` | number |  | The scaling value. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 616](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L616))   ### 
<static> negative(a, out) → {[Phaser.Point](phaser.point)}

  Creates a negative Point.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The first Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L600))   ### 
<static> normalize(a, out) → {[Phaser.Point](phaser.point)}

  Normalize (make unit length) a Point.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 764](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L764))   ### 
<static> normalRightHand(a, out) → {[Phaser.Point](phaser.point)}

  Right-hand normalize (make unit length) a Point.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 748](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L748))   ### 
<static> parse(obj, xProp, yProp) → {[Phaser.Point](phaser.point)}

  Parses an object for x and/or y properties and returns a new Phaser.Point with matching values.  
If the object doesn't contain those properties a Point with x/y of zero will be returned.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `obj` | object |  |  | The object to parse. |
| `xProp` | string |  <optional> |  'x'  | The property used to set the Point.x value. |
| `yProp` | string |  <optional> |  'y'  | The property used to set the Point.y value. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 873](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L873))   ### 
<static> perp(a, out) → {[Phaser.Point](phaser.point)}

  Return a perpendicular vector (90 degrees rotation)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 652](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L652))   ### 
<static> project(a, b, out) → {[Phaser.Point](phaser.point)}

  Project two Points onto another Point.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The first Point object. |
| `b` | [Phaser.Point](phaser.point) |  | The second Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 700](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L700))   ### 
<static> projectUnit(a, b, out) → {[Phaser.Point](phaser.point)}

  Project two Points onto a Point of unit length.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The first Point object. |
| `b` | [Phaser.Point](phaser.point) |  | The second Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 724](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L724))   ### 
<static> rotate(a, x, y, angle, asDegrees, distance) → {[Phaser.Point](phaser.point)}

  Rotates a Point object, or any object with exposed x/y properties, around the given coordinates by  
the angle specified. If the angle between the point and coordinates was 45 deg and the angle argument  
is 45 deg then the resulting angle will be 90 deg, as the angle argument is added to the current angle.

 The distance allows you to specify a distance constraint for the rotation between the point and the  
coordinates. If none is given the distance between the two is calculated and used.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  |  | The Point object to rotate. |
| `x` | number |  |  | The x coordinate of the anchor point |
| `y` | number |  |  | The y coordinate of the anchor point |
| `angle` | number |  |  | The angle in radians (unless asDegrees is true) to rotate the Point by. |
| `asDegrees` | boolean |  <optional> |  false  | Is the given angle in radians (false) or degrees (true)? |
| `distance` | number |  <optional> |  | An optional distance constraint between the Point and the anchor. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The modified point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 787](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L787))   ### 
<static> rperp(a, out) → {[Phaser.Point](phaser.point)}

  Return a perpendicular vector (-90 degrees rotation)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 668](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L668))   ### 
<static> subtract(a, b, out) → {[Phaser.Point](phaser.point)}

  Subtracts the coordinates of two points to create a new point.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) |  | The first Point object. |
| `b` | [Phaser.Point](phaser.point) |  | The second Point object. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | Optional Point to store the value in, if not supplied a new Point object will be created. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 511](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L511))   ### 
add(x, y) → {[Phaser.Point](phaser.point)}

  Adds the given x and y values to this Point.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The value to add to Point.x. |
| `y` | number | The value to add to Point.y. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object. Useful for chaining method calls.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L106))   ### 
angle(a, asDegrees) → {number}

  Returns the angle between this Point object and another object with public x and y properties.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) | any |  |  | The object to get the angle from this Point to. |
| `asDegrees` | boolean |  <optional> |  false  | Is the given angle in radians (false) or degrees (true)? |

 ##### Returns

   number -   The angle between the two objects.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 281](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L281))   ### 
ceil() → {[Phaser.Point](phaser.point)}

  Math.ceil() both the x and y properties of this Point.

  ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 463](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L463))   ### 
clamp(min, max) → {[Phaser.Point](phaser.point)}

  Clamps this Point object values to be between the given min and max.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `min` | number | The minimum value to clamp this Point to. |
| `max` | number | The maximum value to clamp this Point to. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 200](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L200))   ### 
clampX(min, max) → {[Phaser.Point](phaser.point)}

  Clamps the x value of this Point to be between the given min and max.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `min` | number | The minimum value to clamp this Point to. |
| `max` | number | The maximum value to clamp this Point to. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L170))   ### 
clampY(min, max) → {[Phaser.Point](phaser.point)}

  Clamps the y value of this Point to be between the given min and max

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `min` | number | The minimum value to clamp this Point to. |
| `max` | number | The maximum value to clamp this Point to. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L185))   ### 
clone(output) → {[Phaser.Point](phaser.point)}

  Creates a copy of the given Point.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `output` | [Phaser.Point](phaser.point) |  <optional> | Optional Point object. If given the values will be set into this object, otherwise a brand new Point object will be created and returned. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 216](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L216))   ### 
copyFrom(source) → {[Phaser.Point](phaser.point)}

  Copies the x and y properties from any given object to this Point.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `source` | any | The object to copy from. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L43))   ### 
copyTo(dest) → {object}

  Copies the x and y properties from this Point to any given object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `dest` | any | The object to copy to. |

 ##### Returns

   object -   The dest object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 238](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L238))   ### 
cross(a) → {number}

  The cross product of this and another Point object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) | The Point object to get the cross product combined with this Point. |

 ##### Returns

   number -   The result.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 402](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L402))   ### 
distance(dest, round) → {number}

  Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `dest` | object |  | The target object. Must have visible x and y properties that represent the center of the object. |
| `round` | boolean |  <optional> | Round the distance to the nearest integer (default false). |

 ##### Returns

   number -   The distance between this Point object and the destination Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L254))   ### 
divide(x, y) → {[Phaser.Point](phaser.point)}

  Divides Point.x and Point.y by the given x and y values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The value to divide Point.x by. |
| `y` | number | The value to divide Point.x by. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object. Useful for chaining method calls.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 154](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L154))   ### 
dot(a) → {number}

  The dot product of this and another Point object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) | The Point object to get the dot product combined with this Point. |

 ##### Returns

   number -   The result.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 389](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L389))   ### 
equals(a) → {boolean}

  Determines whether the given objects x/y values are equal to this Point object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Point](phaser.point) | any | The object to compare with this Point. |

 ##### Returns

   boolean -   A value of true if the x and y points are equal, otherwise false.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 268](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L268))   ### 
floor() → {[Phaser.Point](phaser.point)}

  Math.floor() both the x and y properties of this Point.

  ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 451](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L451))   ### 
getMagnitude() → {number}

  Calculates the length of the Point object.

  ##### Returns

   number -   The length of the Point.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L321))   ### 
getMagnitudeSq() → {number}

  Calculates the length squared of the Point object.

  ##### Returns

   number -   The length ^ 2 of the Point.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 333](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L333))   ### 
invert() → {[Phaser.Point](phaser.point)}

  Inverts the x and y values of this Point

  ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L56))   ### 
isZero() → {boolean}

  Determine if this point is at 0,0.

  ##### Returns

   boolean -   True if this Point is 0,0, otherwise false.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 377](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L377))   ### 
multiply(x, y) → {[Phaser.Point](phaser.point)}

  Multiplies Point.x and Point.y by the given x and y values. Sometimes known as `Scale`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The value to multiply Point.x by. |
| `y` | number | The value to multiply Point.x by. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object. Useful for chaining method calls.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L138))   ### 
normalize() → {[Phaser.Point](phaser.point)}

  Alters the Point object so that its length is 1, but it retains the same direction.

  ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 358](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L358))   ### 
normalRightHand() → {[Phaser.Point](phaser.point)}

  Right-hand normalize (make unit length) this Point.

  ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 439](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L439))   ### 
perp() → {[Phaser.Point](phaser.point)}

  Make this Point perpendicular (90 degrees rotation)

  ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 415](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L415))   ### 
rotate(x, y, angle, asDegrees, distance) → {[Phaser.Point](phaser.point)}

  Rotates this Point around the x/y coordinates given to the desired angle.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate of the anchor point. |
| `y` | number |  |  | The y coordinate of the anchor point. |
| `angle` | number |  |  | The angle in radians (unless asDegrees is true) to rotate the Point to. |
| `asDegrees` | boolean |  <optional> |  false  | Is the given angle in radians (false) or degrees (true)? |
| `distance` | number |  <optional> |  | An optional distance constraint between the Point and the anchor. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The modified point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 304](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L304))   ### 
rperp() → {[Phaser.Point](phaser.point)}

  Make this Point perpendicular (-90 degrees rotation)

  ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 427](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L427))   ### 
set(x, y) → {[Phaser.Point](phaser.point)}

  Sets the `x` and `y` values of this Point object to the given values.  
If you omit the `y` value then the `x` value will be applied to both, for example:  
`Point.set(2)` is the same as `Point.set(2, 2)`

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | The horizontal value of this point. |
| `y` | number |  <optional> | The vertical value of this point. If not given the x value will be used in its place. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object. Useful for chaining method calls.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L87))   ### 
setMagnitude(magnitude) → {[Phaser.Point](phaser.point)}

  Alters the length of the Point without changing the direction.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `magnitude` | number | The desired magnitude of the resulting Point. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 345](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L345))   ### 
setTo(x, y) → {[Phaser.Point](phaser.point)}

  Sets the `x` and `y` values of this Point object to the given values.  
If you omit the `y` value then the `x` value will be applied to both, for example:  
`Point.setTo(2)` is the same as `Point.setTo(2, 2)`

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | The horizontal value of this point. |
| `y` | number |  <optional> | The vertical value of this point. If not given the x value will be used in its place. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object. Useful for chaining method calls.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L68))   ### 
subtract(x, y) → {[Phaser.Point](phaser.point)}

  Subtracts the given x and y values from this Point.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The value to subtract from Point.x. |
| `y` | number | The value to subtract from Point.y. |

 ##### Returns

   [Phaser.Point](phaser.point) -   This Point object. Useful for chaining method calls.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 122](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L122))   ### 
toString() → {string}

  Returns a string representation of this object.

  ##### Returns

   string -   A string representation of the instance.

    Source code: [geom/Point.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js) ([Line 475](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Point.js#L475))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Point.html>

Class: Phaser.Tile
==================

 Constructor
-----------

 ### 
new Tile(layer, index, x, y, width, height)

  A Tile is a representation of a single tile within the Tilemap.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `layer` | object | The layer in the Tilemap data that this tile belongs to. |
| `index` | number | The index of this tile type in the core map data. |
| `x` | number | The x coordinate of this tile. |
| `y` | number | The y coordinate of this tile. |
| `width` | number | Width of the tile. |
| `height` | number | Height of the tile. |

  Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L19))   Public Properties
-----------------

  ### 
alpha : number

  The alpha value at which this tile is drawn to the canvas.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L84))   ### 
[readonly] bottom : number

  The sum of the y and height properties.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 396](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L396))   ### 
[readonly] canCollide : boolean

  True if this tile can collide on any of its faces or has a collision callback set.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 344](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L344))   ### 
centerX

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | The width of the tile in pixels. |

  Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 74](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L74))   ### 
centerY

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `height` | number | The height of the tile in pixels. |

  Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L79))   ### 
collideDown : boolean

  Indicating collide with any object on the bottom.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L138))   ### 
collideLeft : boolean

  Indicating collide with any object on the left.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 120](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L120))   ### 
collideRight : boolean

  Indicating collide with any object on the right.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 126](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L126))   ### 
[readonly] collides : boolean

  True if this tile can collide on any of its faces.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 331](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L331))   ### 
collideUp : boolean

  Indicating collide with any object on the top.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L132))   ### 
collisionCallback : Function

  Tile collision callback.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L144))   ### 
collisionCallbackContext : Object

  The context in which the collision callback will be called.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L150))   ### 
faceBottom : boolean

  Is the bottom of this tile an interesting edge?

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L104))   ### 
faceLeft : boolean

  Is the left of this tile an interesting edge?

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L109))   ### 
faceRight : boolean

  Is the right of this tile an interesting edge?

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 114](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L114))   ### 
faceTop : boolean

  Is the top of this tile an interesting edge?

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 99](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L99))   ### 
flipped : boolean

  Whether this tile is flipped (mirrored) or not.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L49))   ### 
height : number

  The height of the tile in pixels.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L69))   ### 
index : number

  The index of this tile within the map data corresponding to the tileset, or -1 if this represents a blank/null tile.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L29))   ### 
layer : Object

  The layer in the Tilemap data that this tile belongs to.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L24))   ### 
[readonly] left : number

  The x value in pixels.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 357](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L357))   ### 
properties : Object

  Tile specific properties.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L89))   ### 
[readonly] right : number

  The sum of the x and width properties.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 370](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L370))   ### 
rotation : number

  The rotation angle of this tile.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L44))   ### 
scanned : boolean

  Has this tile been walked / turned into a poly?

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L94))   ### 
[readonly] top : number

  The y value.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 383](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L383))   ### 
width : number

  The width of the tile in pixels.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L64))   ### 
worldX

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x map coordinate of this tile. |

  Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L54))   ### 
worldY

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `y` | number | The y map coordinate of this tile. |

  Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L59))   ### 
x : number

  The x map coordinate of this tile.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L34))   ### 
y : number

  The y map coordinate of this tile.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L39))    Public Methods
--------------

  ### 
containsPoint(x, y) → {boolean}

  Check if the given x and y world coordinates are within this Tile.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate to test. |
| `y` | number | The y coordinate to test. |

 ##### Returns

   boolean -   True if the coordinates are within this Tile, otherwise false.

    Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L156))   ### 
copy(tile)

  Copies the tile data and properties from the given tile to this tile.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `tile` | [Phaser.Tile](phaser.tile) | The tile to copy from. |

  Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 305](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L305))   ### 
destroy()

  Clean up memory.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L220))   ### 
intersects(x, y, right, bottom)

  Check for intersection with this tile.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x axis in pixels. |
| `y` | number | The y axis in pixels. |
| `right` | number | The right point. |
| `bottom` | number | The bottom point. |

  Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L170))   ### 
isInteresting(collides, faces) → {boolean}

  Is this tile interesting?

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `collides` | boolean | If true will check any collides value. |
| `faces` | boolean | If true will check any face value. |

 ##### Returns

   boolean -   True if the Tile is interesting, otherwise false.

    Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 275](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L275))   ### 
resetCollision()

  Reset collision status flags.

   Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 256](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L256))   ### 
setCollision(left, right, up, down)

  Sets the collision flags for each side of this tile and updates the interesting faces list.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `left` | boolean | Indicating collide with any object on the left. |
| `right` | boolean | Indicating collide with any object on the right. |
| `up` | boolean | Indicating collide with any object on the top. |
| `down` | boolean | Indicating collide with any object on the bottom. |

  Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 233](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L233))   ### 
setCollisionCallback(callback, context)

  Set a callback to be called when this tile is hit by an object.  
The callback must true true for collision processing to take place.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `callback` | function | Callback function. |
| `context` | object | Callback will be called within this context. |

  Source code: [tilemap/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js) ([Line 205](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tile.js#L205))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Tile.html>

Class: Phaser.RandomDataGenerator
=================================

 Constructor
-----------

 ### 
new RandomDataGenerator(seeds)

  An extremely useful repeatable random data generator.

 Based on Nonsense by Josh Faul https://github.com/jocafa/Nonsense.

 The random number genererator is based on the Alea PRNG, but is modified.

 * https://github.com/coverslide/node-alea
* https://github.com/nquinlan/better-random-numbers-for-javascript-mirror
* http://baagoe.org/en/wiki/Better\_random\_numbers\_for\_javascript (original, perm. 404)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `seeds` | Array.<any> | string |  <optional> | An array of values to use as the seed, or a generator state (from {#state}). |

  Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L23))   Public Methods
--------------

  ### 
angle() → {number}

  Returns a random angle between -180 and 180.

  ##### Returns

   number -   A random number between -180 and 180.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 310](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L310))   ### 
between(min, max) → {number}

  Returns a random integer between and including min and max.  
This method is an alias for RandomDataGenerator.integerInRange.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `min` | number | The minimum value in the range. |
| `max` | number | The maximum value in the range. |

 ##### Returns

   number -   A random number between min and max.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L198))   ### 
frac() → {number}

  Returns a random real number between 0 and 1.

  ##### Returns

   number -   A random real number between 0 and 1.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L160))   ### 
integer() → {number}

  Returns a random integer between 0 and 2^32.

  ##### Returns

   number -   A random integer between 0 and 2^32.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 148](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L148))   ### 
integerInRange(min, max) → {number}

  Returns a random integer between and including min and max.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `min` | number | The minimum value in the range. |
| `max` | number | The maximum value in the range. |

 ##### Returns

   number -   A random number between min and max.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 184](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L184))   ### 
normal() → {number}

  Returns a random real number between -1 and 1.

  ##### Returns

   number -   A random real number between -1 and 1.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 227](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L227))   ### 
pick(ary) → {any}

  Returns a random member of `array`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `ary` | Array | An Array to pick a random member of. |

 ##### Returns

   any -   A random member of the array.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 258](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L258))   ### 
real() → {number}

  Returns a random real number between 0 and 2^32.

  ##### Returns

   number -   A random real number between 0 and 2^32.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 172](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L172))   ### 
realInRange(min, max) → {number}

  Returns a random real number between min and max.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `min` | number | The minimum value in the range. |
| `max` | number | The maximum value in the range. |

 ##### Returns

   number -   A random number between min and max.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L213))   ### 
sign() → {number}

  Returns a sign to be used with multiplication operator.

  ##### Returns

   number -   -1 or +1.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 271](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L271))   ### 
sow(seeds)

  Reset the seed of the random data generator.

 *Note*: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `seeds` | Array.<any> | The array of seeds: the `toString()` of each value is used. |

  Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L83))   ### 
state(state) → {string}

  Gets or Sets the state of the generator. This allows you to retain the values  
that the generator is using between games, i.e. in a game save file.

 To seed this generator with a previously saved state you can pass it as the  
`seed` value in your game config, or call this method directly after Phaser has booted.

 Call this method with no parameters to return the current state.

 If providing a state it should match the same format that this method  
returns, which is a string with a header `!rnd` followed by the `c`,  
`s0`, `s1` and `s2` values respectively, each comma-delimited.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `state` | string |  <optional> | Generator state to be set. |

 ##### Returns

   string -   The current state of the generator.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 322](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L322))   ### 
timestamp(min, max) → {number}

  Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `min` | number | The minimum value in the range. |
| `max` | number | The maximum value in the range. |

 ##### Returns

   number -   A random timestamp between min and max.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 296](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L296))   ### 
uuid() → {string}

  Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368

  ##### Returns

   string -   A valid RFC4122 version4 ID hex string

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 239](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L239))   ### 
weightedPick(ary) → {any}

  Returns a random member of `array`, favoring the earlier entries.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `ary` | Array | An Array to pick a random member of. |

 ##### Returns

   any -   A random member of the array.

    Source code: [math/RandomDataGenerator.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js) ([Line 283](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/RandomDataGenerator.js#L283))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.RandomDataGenerator.html>

Class: Phaser.Particles
=======================

 Constructor
-----------

 ### 
new Particles(game)

  Phaser.Particles is the Particle Manager for the game. It is called during the game update loop and in turn updates any Emitters attached to it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [particles/Particles.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js#L14))   Classes
-------

   [Arcade](phaser.particles.arcade)   Public Properties
-----------------

  ### 
emitters : Object

  Internal emitters store.

   Source code: [particles/Particles.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js#L24))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [particles/Particles.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js#L19))   ### 
ID : number

  -

   Source code: [particles/Particles.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js#L30))    Public Methods
--------------

  ### 
add(emitter) → {Phaser.Emitter}

  Adds a new Particle Emitter to the Particle Manager.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `emitter` | Phaser.Emitter | The emitter to be added to the particle manager. |

 ##### Returns

   Phaser.Emitter -   The emitter that was added.

    Source code: [particles/Particles.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js#L36))   ### 
remove(emitter)

  Removes an existing Particle Emitter from the Particle Manager.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `emitter` | Phaser.Emitter | The emitter to remove. |

  Source code: [particles/Particles.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js#L50))   ### 
<internal> update()

  Called by the core game loop. Updates all Emitters who have their exists value set to true.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [particles/Particles.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/Particles.js#L61))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Particles.html>

Class: Phaser.FlexLayer
=======================

 Constructor
-----------

 ### 
new FlexLayer(manager, position, bounds, scale)

  WARNING: This is an EXPERIMENTAL class. The API will change significantly in the coming versions and is incomplete.  
Please try to avoid using in production games with a long time to build.  
This is also why the documentation is incomplete.

 A responsive grid layer.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `manager` | [Phaser.FlexGrid](phaser.flexgrid) | The FlexGrid that owns this FlexLayer. |
| `position` | [Phaser.Point](phaser.point) | A reference to the Point object used for positioning. |
| `bounds` | [Phaser.Rectangle](phaser.rectangle) | A reference to the Rectangle used for the layer bounds. |
| `scale` | [Phaser.Point](phaser.point) | A reference to the Point object used for layer scaling. |

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L22))   Extends
-------

 * [Phaser.Group](phaser.group)

 Public Properties
-----------------

  ### 
alive : boolean

  The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

   Inherited From * [Phaser.Group#alive](phaser.group#alive)
 Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L93))   ### 
alpha : number

  The alpha value of the group container.

   Inherited From * [Phaser.Group#alpha](phaser.group#alpha)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 3003](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L3003))   ### 
angle : number

  The angle of rotation of the group container, in degrees.

 This adjusts the group itself by modifying its local rotation transform.

 This has no impact on the rotation/angle properties of the children, but it will update their worldTransform  
and on-screen orientation and position.

   Inherited From * [Phaser.Group#angle](phaser.group#angle)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2682))   ### 
bottom : number

  The bottom coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#bottom](phaser.group#bottom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2845](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2845))   ### 
bottomLeft : [Phaser.Point](phaser.point)

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 76](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L76))   ### 
bottomMiddle : [Phaser.Point](phaser.point)

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 81](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L81))   ### 
bottomRight : [Phaser.Point](phaser.point)

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L86))   ### 
bounds : [Phaser.Rectangle](phaser.rectangle)

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L51))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  If this object is [fixedToCamera](phaser.group#fixedToCamera) then this stores the x/y position offset relative to the top-left of the camera view.  
If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

   Inherited From * [Phaser.Group#cameraOffset](phaser.group#cameraOffset)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 272](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L272))   ### 
centerX : number

  The center x coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#centerX](phaser.group#centerX)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2705](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2705))   ### 
centerY : number

  The center y coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#centerY](phaser.group#centerY)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2733](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2733))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
classType : Object

  The type of objects that will be created when using [create](phaser.group#create) or [createMultiple](phaser.group#createMultiple).

 Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments:  
when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

   Inherited From * [Phaser.Group#classType](phaser.group#classType)
 Default Value * [Phaser.Sprite](phaser.sprite)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L130))   ### 
cursor : [DisplayObject](global#DisplayObject)

  The current display object that the group cursor is pointing to, if any. (Can be set manually.)

 The cursor is a way to iterate through the children in a Group using [next](phaser.group#next) and [previous](phaser.group#previous).

   Inherited From * [Phaser.Group#cursor](phaser.group#cursor)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L138))   ### 
[readonly] cursorIndex : integer

  The current index of the Group cursor. Advance it with Group.next.

   Inherited From * [Phaser.Group#cursorIndex](phaser.group#cursorIndex)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 255](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L255))   ### 
enableBody : boolean

  If true all Sprites created by, or added to this group, will have a physics body enabled on them.

 If there are children already in the Group at the time you set this property, they are not changed.

 The default body type is controlled with [physicsBodyType](phaser.group#physicsBodyType).

   Inherited From * [Phaser.Group#enableBody](phaser.group#enableBody)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L208))   ### 
enableBodyDebug : boolean

  If true when a physics body is created (via [enableBody](phaser.group#enableBody)) it will create a physics debug object as well.

 This only works for P2 bodies.

   Inherited From * [Phaser.Group#enableBodyDebug](phaser.group#enableBodyDebug)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L217))   ### 
exists : boolean

  If exists is true the group is updated, otherwise it is skipped.

   Inherited From * [Phaser.Group#exists](phaser.group#exists)
 Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L100))   ### 
fixedToCamera : boolean

  A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

 Note that the cameraOffset values are in addition to any parent in the display list.  
So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

   Inherited From * [Phaser.Group#fixedToCamera](phaser.group#fixedToCamera)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 265](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L265))   ### 
<internal> game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Group#game](phaser.group#game)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L38))   ### 
grid : [Phaser.FlexGrid](phaser.flexgrid)

  A reference to the FlexGrid that owns this layer.

   Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L34))   ### 
hash :array

  The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

 Only children of this Group can be added to and removed from the hash.

 This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.  
However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own  
sorting and filtering of Group children without touching their z-index (and therefore display draw order)

   Inherited From * [Phaser.Group#hash](phaser.group#hash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 285](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L285))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
ignoreDestroy : boolean

  A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

   Inherited From * [Phaser.Group#ignoreDestroy](phaser.group#ignoreDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L107))   ### 
inputEnableChildren : boolean

  A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true`  
on any children *added* to, or *created by*, this Group.

 If there are children already in the Group at the time you set this property, they are not changed.

   Inherited From * [Phaser.Group#inputEnableChildren](phaser.group#inputEnableChildren)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L149))   ### 
left : number

  The left coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#left](phaser.group#left)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2761](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2761))   ### 
[readonly] length : integer

  Total number of children in this group, regardless of exists/alive status.

   Inherited From * [Phaser.Group#length](phaser.group#length)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2665](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2665))   ### 
manager

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `scale` | [Phaser.ScaleManager](phaser.scalemanager) | A reference to the ScaleManager. |

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L29))   ### 
name : string

  A name for this group. Not used internally but useful for debugging.

   Inherited From * [Phaser.Group#name](phaser.group#name)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L49))   ### 
onChildInputDown : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputDown](phaser.group#onChildInputDown)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L161))   ### 
onChildInputOut : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputOut](phaser.group#onChildInputOut)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L198))   ### 
onChildInputOver : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputOver](phaser.group#onChildInputOver)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L186))   ### 
onChildInputUp : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal,  
a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer  
is still over the Sprite or not.

   Inherited From * [Phaser.Group#onChildInputUp](phaser.group#onChildInputUp)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L174))   ### 
onDestroy : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the group is destroyed.

   Inherited From * [Phaser.Group#onDestroy](phaser.group#onDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L249))   ### 
pendingDestroy : boolean

  A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method  
called on the next logic update.  
You can set it directly to flag the Group to be destroyed on its next update.

 This is extremely useful if you wish to destroy a Group from within one of its own callbacks  
or a callback of one of its children.

   Inherited From * [Phaser.Group#pendingDestroy](phaser.group#pendingDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L119))   ### 
persist : boolean

  Should the FlexLayer remain through a State swap?

   Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 41](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L41))   ### 
physicsBodyType : integer

  If [enableBody](phaser.group#enableBody) is true this is the type of physics body that is created on new Sprites.

 The valid values are [Phaser.Physics.ARCADE](phaser.physics#.ARCADE), [Phaser.Physics.P2JS](phaser.physics#.P2JS), [Phaser.Physics.NINJA](phaser.physics#.NINJA), etc.

   Inherited From * [Phaser.Group#physicsBodyType](phaser.group#physicsBodyType)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L225))   ### 
physicsSortDirection : integer

  If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

 It should be set to one of the Phaser.Physics.Arcade sort direction constants: 

 Phaser.Physics.Arcade.SORT\_NONE  
Phaser.Physics.Arcade.LEFT\_RIGHT  
Phaser.Physics.Arcade.RIGHT\_LEFT  
Phaser.Physics.Arcade.TOP\_BOTTOM  
Phaser.Physics.Arcade.BOTTOM\_TOP

 If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

   Inherited From * [Phaser.Group#physicsSortDirection](phaser.group#physicsSortDirection)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 243](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L243))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Inherited From * [Phaser.Group#physicsType](phaser.group#physicsType)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L86))   ### 
position : [Phaser.Point](phaser.point)

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L46))   ### 
right : number

  The right coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#right](phaser.group#right)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2789](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2789))   ### 
rotation : number

  The angle of rotation of the group container, in radians.

 This will adjust the group container itself by modifying its rotation.  
This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#rotation](phaser.group#rotation)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2987](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2987))   ### 
scale : [Phaser.Point](phaser.point)

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L56))   ### 
top : number

  The top coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#top](phaser.group#top)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2817](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2817))   ### 
topLeft : [Phaser.Point](phaser.point)

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L61))   ### 
topMiddle : [Phaser.Point](phaser.point)

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L66))   ### 
topRight : [Phaser.Point](phaser.point)

  Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 71](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L71))   ### 
[readonly] total : integer

  Total number of existing children in the group.

   Inherited From * [Phaser.Group#total](phaser.group#total)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2648](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2648))   ### 
<internal> type : integer

  Internal Phaser Type value.

   Inherited From * [Phaser.Group#type](phaser.group#type)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L80))   ### 
visible : boolean

  The visible state of the group. Non-visible Groups and all of their children are not rendered.

   Inherited From * [Phaser.Group#visible](phaser.group#visible)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2996](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2996))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))   ### 
x : number

  The x coordinate of the group container.

 You can adjust the group container itself by modifying its coordinates.  
This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#x](phaser.group#x)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2969))   ### 
y : number

  The y coordinate of the group container.

 You can adjust the group container itself by modifying its coordinates.  
This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#y](phaser.group#y)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2978](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2978))   ### 
[readonly] z : integer

  The z-depth value of this object within its parent container/Group - the World is a Group as well.  
This value must be unique for each child in a Group.

   Inherited From * [Phaser.Group#z](phaser.group#z)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L57))    Public Methods
--------------

  ### 
add(child, silent, index) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object as the top child in this group.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If the child was already in this Group, it is simply returned, and nothing else happens to it.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

 Use [addAt](phaser.group#addAt) to control where a child is added. Use [create](phaser.group#create) to create and add a new child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Inherited From * [Phaser.Group#add](phaser.group#add)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L341))   ### 
addAll(property, amount, checkAlive, checkVisible)

  Adds the amount to the given property on all children in this group.

 `Group.addAll('x', 10)` will add 10 to the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to increment, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#addAll](phaser.group#addAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1386))   ### 
addAt(child, index, silent) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object to this group.

 The child is added to the group at the location specified by the index value, this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `index` | integer |  <optional> |  0  | The index within the group to insert the child to. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Inherited From * [Phaser.Group#addAt](phaser.group#addAt)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 418](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L418))   ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
addMultiple(children, silent) → {Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group)}

  Adds an array of existing Display Objects to this Group.

 The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

 As well as an array you can also pass another Group as the first argument. In this case all of the children from that  
Group will be removed from it and added into this Group.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `children` | Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) |  |  | An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) -   The array of children or Group of children that were added to this Group.

    Inherited From * [Phaser.Group#addMultiple](phaser.group#addMultiple)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 489](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L489))   ### 
addToHash(child) → {boolean}

  Adds a child of this Group into the hash array.  
This call will return false if the child is not a child of this Group, or is already in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash. |

 ##### Returns

   boolean -   True if the child was successfully added to the hash, otherwise false.

    Inherited From * [Phaser.Group#addToHash](phaser.group#addToHash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 439](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L439))   ### 
align(width, height, cellWidth, cellHeight, position, offset) → {boolean}

  This method iterates through all children in the Group (regardless if they are visible or exist)  
and then changes their position so they are arranged in a Grid formation. Children must have  
the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have  
this.

 The grid dimensions are determined by the first four arguments. The `width` and `height` arguments  
relate to the width and height of the grid respectively.

 For example if the Group had 100 children in it:

 `Group.align(10, 10, 32, 32)`

 This will align all of the children into a grid formation of 10x10, using 32 pixels per  
grid cell. If you want a wider grid, you could do:

 `Group.align(25, 4, 32, 32)`

 This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

 You can choose to set *either* the `width` or `height` value to -1. Doing so tells the method  
to keep on aligning children until there are no children left. For example if this Group had  
48 children in it, the following:

 `Group.align(-1, 8, 32, 32)`

 ... will align the children so that there are 8 children vertically (the second argument),  
and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

 You can also do:

 `Group.align(10, -1, 32, 32)`

 In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit  
all of the children in.

 The `position` property allows you to control where in each grid cell the child is positioned.  
This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`,  
`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`,  
`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

 The final argument; `offset` lets you start the alignment from a specific child index.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | integer |  |  | The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value. |
| `height` | integer |  |  | The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value. |
| `cellWidth` | integer |  |  | The width of each grid cell, in pixels. |
| `cellHeight` | integer |  |  | The height of each grid cell, in pixels. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offset` | integer |  <optional> |  0  | Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value. |

 ##### Returns

   boolean -   True if the Group children were aligned, otherwise false.

    Inherited From * [Phaser.Group#align](phaser.group#align)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L682))   ### 
alignIn(container, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation and scale of its children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Inherited From * [Phaser.Group#alignIn](phaser.group#alignIn)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2873](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2873))   ### 
alignTo(parent, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation and scale of the children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Inherited From * [Phaser.Group#alignTo](phaser.group#alignTo)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2915](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2915))   ### 
<internal> ascendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Inherited From * [Phaser.Group#ascendingSortHandler](phaser.group#ascendingSortHandler)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1919](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1919))   ### 
bringToTop(child) → {any}

  Brings the given child to the top of this group so it renders above all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to bring to the top of this group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#bringToTop](phaser.group#bringToTop)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 907](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L907))   ### 
callAll(method, context, args)

  Calls a function, specified by name, on all on children.

 The function is called for all children regardless if they are dead or alive (see callAllExists for different options).  
After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `method` | string |  |  | Name of the function on the child to call. Deep property lookup is supported. |
| `context` | string |  <optional> |  null  | A string containing the context under which the method will be executed. Set to null to default to the child. |
| `args` | any |  <repeatable> |  | Additional parameters that will be passed to the method. |

  Inherited From * [Phaser.Group#callAll](phaser.group#callAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1538](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1538))   ### 
callAllExists(callback, existsValue, parameter)

  Calls a function, specified by name, on all children in the group who exist (or do not exist).

 After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `callback` | string |  | Name of the function on the children to call. |
| `existsValue` | boolean |  | Only children with exists=existsValue will be called. |
| `parameter` | any |  <repeatable> | Additional parameters that will be passed to the callback. |

  Inherited From * [Phaser.Group#callAllExists](phaser.group#callAllExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1454](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1454))   ### 
<internal> callbackFromArray(child, callback, length)

  Returns a reference to a function that exists on a child of the group based on the given callback array.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | object | The object to inspect. |
| `callback` | array | The array of function names. |
| `length` | integer | The size of the array (pre-calculated in callAll). |

  Inherited From * [Phaser.Group#callbackFromArray](phaser.group#callbackFromArray)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1488](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1488))   ### 
checkAll(key, value, checkAlive, checkVisible, force)

  Quickly check that the same property across all children of this group is equal to the given value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be checked. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be checked. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be checked. This includes any Groups that are children. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

  Inherited From * [Phaser.Group#checkAll](phaser.group#checkAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1353](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1353))   ### 
checkProperty(child, key, value, force) → {boolean}

  Checks a property for the given value on the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to check the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be checked. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

 ##### Returns

   boolean -   True if the property was was equal to value, false if not.

    Inherited From * [Phaser.Group#checkProperty](phaser.group#checkProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1217))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
countDead() → {integer}

  Get the number of dead children in this group.

  ##### Returns

   integer -   The number of children flagged as dead.

    Inherited From * [Phaser.Group#countDead](phaser.group#countDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2338))   ### 
countLiving() → {integer}

  Get the number of living children in this group.

  ##### Returns

   integer -   The number of children flagged as alive.

    Inherited From * [Phaser.Group#countLiving](phaser.group#countLiving)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2326](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2326))   ### 
create(x, y, key, frame, exists, index) → {[DisplayObject](global#DisplayObject)}

  Creates a new Phaser.Sprite object and adds it to the top of this group.

 Use [classType](phaser.group#classType) to change the type of object created.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point. |
| `y` | number |  |  | The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `exists` | boolean |  <optional> |  true  | The default exists state of the Sprite. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was created: will be a [Phaser.Sprite](phaser.sprite) unless #classType has been changed.

    Inherited From * [Phaser.Group#create](phaser.group#create)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 544](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L544))   ### 
createMultiple(quantity, key, frame, exists) → {array}

  Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

 This method is useful if you need to quickly generate a pool of sprites, such as bullets.

 Use [classType](phaser.group#classType) to change the type of object created.

 You can provide an array as the `key` and / or `frame` arguments. When you do this  
it will create `quantity` Sprites for every key (and frame) in the arrays.

 For example:

 `createMultiple(25, ['ball', 'carrot'])`

 In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be  
created in total, 25 of each. You can also have the `frame` as an array:

 `createMultiple(5, 'bricks', [0, 1, 2, 3])`

 In the above there is one key (bricks), which is a sprite sheet. The frames array tells  
this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because  
the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with  
frame 1, and so on.

 If you set both the key and frame arguments to be arrays then understand it will create  
a total quantity of sprites equal to the size of both arrays times each other. I.e.:

 `createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

 The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.  
It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.  
In total it will have created 120 sprites.

 By default the Sprites will have their `exists` property set to `false`, and they will be  
positioned at 0x0, relative to the `Group.x / y` values.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | integer |  |  | The number of Sprites to create. |
| `key` | string | array |  |  | The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used. |
| `frame` | integer | string | array |  <optional> |  0  | If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used. |
| `exists` | boolean |  <optional> |  false  | The default exists state of the Sprite. |

 ##### Returns

   array -   An array containing all of the Sprites that were created.

    Inherited From * [Phaser.Group#createMultiple](phaser.group#createMultiple)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 581](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L581))   ### 
customSort(sortHandler, context)

  Sort the children in the group according to custom sort function.

 The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).  
It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sortHandler` | function |  | The custom sort function. |
| `context` | object |  <optional> | The context in which the sortHandler is called. |

  Inherited From * [Phaser.Group#customSort](phaser.group#customSort)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1895](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1895))   ### 
debug()

  Debug.

   Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 101](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L101))   ### 
<internal> descendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Inherited From * [Phaser.Group#descendingSortHandler](phaser.group#descendingSortHandler)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1951](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1951))   ### 
destroy(destroyChildren, soft)

  Destroys this group.

 Removes all children, then removes this group from its parent and nulls references.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | If true `destroy` will be invoked on each removed child. |
| `soft` | boolean |  <optional> |  false  | A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does. |

  Inherited From * [Phaser.Group#destroy](phaser.group#destroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2611))   ### 
divideAll(property, amount, checkAlive, checkVisible)

  Divides the given property by the amount on all children in this group.

 `Group.divideAll('x', 2)` will half the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to divide, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#divideAll](phaser.group#divideAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1437))   ### 
filter(predicate, checkExists) → {[Phaser.ArraySet](phaser.arrayset)}

  Find children matching a certain predicate.

 For example:

 
```
var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');
```

Note: Currently this will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `predicate` | function |  |  | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third |
| `checkExists` | boolean |  <optional> |  false  | If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate. |

 ##### Returns

   [Phaser.ArraySet](phaser.arrayset) -   Returns an array list containing all the children that the predicate returned true for

    Inherited From * [Phaser.Group#filter](phaser.group#filter)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1677](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1677))   ### 
forEach(callback, callbackContext, checkExists, args)

  Call a function on each child in this group.

 Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

 
```
Group.forEach(awardBonusGold, this, true, 100, 500)
```

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

 Note: This check will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `checkExists` | boolean |  <optional> |  false  | If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed. |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEach](phaser.group#forEach)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1717))   ### 
forEachAlive(callback, callbackContext, args)

  Call a function on each alive child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachAlive](phaser.group#forEachAlive)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1799](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1799))   ### 
forEachDead(callback, callbackContext, args)

  Call a function on each dead child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachDead](phaser.group#forEachDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1827](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1827))   ### 
forEachExists(callback, callbackContext, args)

  Call a function on each existing child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachExists](phaser.group#forEachExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1771](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1771))   ### 
getAll(property, value, startIndex, endIndex) → {any}

  Returns all children in this Group.

 You can optionally specify a matching criteria using the `property` and `value` arguments.

 For example: `getAll('exists', true)` would return only children that have their exists property set.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `property` | string |  <optional> |  | An optional property to test against the value argument. |
| `value` | any |  <optional> |  | If property is set then Child.property must strictly equal this value to be included in the results. |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up until. |

 ##### Returns

   any -   A random existing child of this Group.

    Inherited From * [Phaser.Group#getAll](phaser.group#getAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2392](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2392))   ### 
getAt(index) → {[DisplayObject](global#DisplayObject) | integer}

  Returns the child found at the given index within this group.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index to return the child from. |

 ##### Returns

   [DisplayObject](global#DisplayObject) | integer -   The child that was found at the given index, or -1 for an invalid index.

    Inherited From * [Phaser.Group#getAt](phaser.group#getAt)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 524](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L524))   ### 
getBottom() → {any}

  Returns the child at the bottom of this group.

 The bottom child the child being displayed (rendered) below every other child.

  ##### Returns

   any -   The child at the bottom of the Group.

    Inherited From * [Phaser.Group#getBottom](phaser.group#getBottom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2221))   ### 
getBounds(targetCoordinateSpace) → {Rectangle}

  Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `targetCoordinateSpace` | PIXIDisplayObject | PIXIMatrix |  <optional> | Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. |

 ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getBounds](pixi.displayobjectcontainer#getBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 280](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L280))   ### 
getByName(name) → {any}

  Searches the Group for the first instance of a child with the `name`  
property matching the given argument. Should more than one child have  
the same name only the first instance is returned.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name to search for. |

 ##### Returns

   any -   The first child with a matching name, or null if none were found.

    Inherited From * [Phaser.Group#getByName](phaser.group#getByName)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1042](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1042))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getClosestTo(object, callback, callbackContext) → {any}

  Get the closest child to given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child closest to given object, or `null` if no child was found.

    Inherited From * [Phaser.Group#getClosestTo](phaser.group#getClosestTo)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2238](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2238))   ### 
getFirstAlive(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is alive (`child.alive === true`).

 This is handy for choosing a squad leader, etc.

 You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The alive dead child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstAlive](phaser.group#getFirstAlive)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2105))   ### 
getFirstDead(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is dead (`child.alive === false`).

 This is handy for checking if everything has been wiped out and adding to the pool as needed.

 You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no dead children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first dead child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstDead](phaser.group#getFirstDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2135))   ### 
getFirstExists(exists, createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first display object that exists, or doesn't exist.

 You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `exists` | boolean |  <optional> |  true  | If true, find the first existing child; otherwise find the first non-existing child. |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstExists](phaser.group#getFirstExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2071](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2071))   ### 
getFurthestFrom(object, callback, callbackContext) → {any}

  Get the child furthest away from the given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child furthest from the given object, or `null` if no child was found.

    Inherited From * [Phaser.Group#getFurthestFrom](phaser.group#getFurthestFrom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2282](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2282))   ### 
getIndex(child) → {integer}

  Get the index position of the given child in this group, which should match the child's `z` property.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to get the index for. |

 ##### Returns

   integer -   The index of the child or -1 if it's not a member of this group.

    Inherited From * [Phaser.Group#getIndex](phaser.group#getIndex)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1029](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1029))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
getRandom(startIndex, length) → {any}

  Returns a random child from the group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | Offset from the front of the group (lowest child). |
| `length` | integer |  <optional> |  (to top)  | Restriction on the number of values you want to randomly select from. |

 ##### Returns

   any -   A random child of this Group.

    Inherited From * [Phaser.Group#getRandom](phaser.group#getRandom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2350](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2350))   ### 
getRandomExists(startIndex, endIndex) → {any}

  Returns a random child from the Group that has `exists` set to `true`.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up to. |

 ##### Returns

   any -   A random child of this Group that exists.

    Inherited From * [Phaser.Group#getRandomExists](phaser.group#getRandomExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2372](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2372))   ### 
getTop() → {any}

  Return the child at the top of this group.

 The top child is the child displayed (rendered) above every other child.

  ##### Returns

   any -   The child at the top of the Group.

    Inherited From * [Phaser.Group#getTop](phaser.group#getTop)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2204))   ### 
hasProperty(child, key) → {boolean}

  Checks if the child has the given property.

 Will scan up to 4 levels deep only.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to check for the existence of the property on. |
| `key` | Array.<string> | An array of strings that make up the property. |

 ##### Returns

   boolean -   True if the child has the property, otherwise false.

    Inherited From * [Phaser.Group#hasProperty](phaser.group#hasProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1104))   ### 
iterate(key, value, returnType, callback, callbackContext, args) → {any}

  Iterates over the children of the group performing one of several actions for matched children.

 A child is considered a match when it has a property, named `key`, whose value is equal to `value`  
according to a strict equality comparison.

 The result depends on the `returnType`:

 * [RETURN\_TOTAL](phaser.group#.RETURN_TOTAL):  
 The callback, if any, is applied to all matching children. The number of matched children is returned.
* [RETURN\_NONE](phaser.group#.RETURN_NONE):  
 The callback, if any, is applied to all matching children. No value is returned.
* [RETURN\_CHILD](phaser.group#.RETURN_CHILD):  
 The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.  
 If there is no matching child then null is returned.

 If `args` is specified it must be an array. The matched child will be assigned to the first  
element and the entire array will be applied to the callback function.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The child property to check, i.e. 'exists', 'alive', 'health' |
| `value` | any |  |  | A child matches if `child[key] === value` is true. |
| `returnType` | integer |  |  | How to iterate the children and what to return. |
| `callback` | function |  <optional> |  null  | Optional function that will be called on each matching child. The matched child is supplied as the first argument. |
| `callbackContext` | object |  <optional> |  | The context in which the function should be called (usually 'this'). |
| `args` | Array.<any> |  <optional> |  (none)  | The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child. |

 ##### Returns

   any -   Returns either an integer (for RETURN\_TOTAL), the first matched child (for RETURN\_CHILD), or null.

    Inherited From * [Phaser.Group#iterate](phaser.group#iterate)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1976](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1976))   ### 
moveAll(group, silent) → {[Phaser.Group](phaser.group)}

  Moves all children from this Group to the Group given.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `group` | [Phaser.Group](phaser.group) |  |  | The new Group to which the children will be moved to. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event for the new Group. |

 ##### Returns

   [Phaser.Group](phaser.group) -   The Group to which all the children were moved.

    Inherited From * [Phaser.Group#moveAll](phaser.group#moveAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2479](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2479))   ### 
moveDown(child) → {any}

  Moves the given child down one place in this group unless it's already at the bottom.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move down in the group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#moveDown](phaser.group#moveDown)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L969))   ### 
moveUp(child) → {any}

  Moves the given child up one place in this group unless it's already at the top.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move up in the group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#moveUp](phaser.group#moveUp)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 945](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L945))   ### 
multiplyAll(property, amount, checkAlive, checkVisible)

  Multiplies the given property by the amount on all children in this group.

 `Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to multiply, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#multiplyAll](phaser.group#multiplyAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1420](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1420))   ### 
next() → {any}

  Advances the group cursor to the next (higher) object in the group.

 If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

  ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#next](phaser.group#next)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 833](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L833))   ### 
<internal> postUpdate()

  The core postUpdate - as called by World.

   Inherited From * [Phaser.Group#postUpdate](phaser.group#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1656](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1656))   ### 
<internal> preUpdate()

  The core preUpdate - as called by World.

   Inherited From * [Phaser.Group#preUpdate](phaser.group#preUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1611))   ### 
previous() → {any}

  Moves the group cursor to the previous (lower) child in the group.

 If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

  ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#previous](phaser.group#previous)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 862](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L862))   ### 
remove(child, destroy, silent) → {boolean}

  Removes the given child from this group.

 This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

 If the group cursor was referring to the removed child it is updated to refer to the next child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to remove. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on the removed child. |
| `silent` | boolean |  <optional> |  false  | If true the the child will not dispatch the `onRemovedFromGroup` event. |

 ##### Returns

   boolean -   true if the child was removed from this group, otherwise false.

    Inherited From * [Phaser.Group#remove](phaser.group#remove)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2431](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2431))   ### 
removeAll(destroy, silent, destroyTexture)

  Removes all children from this Group, but does not remove the group from its parent.

 The children can be optionally destroyed as they are removed.

 You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |
| `destroyTexture` | boolean |  <optional> |  false  | If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Group#removeAll](phaser.group#removeAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2508](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2508))   ### 
removeBetween(startIndex, endIndex, destroy, silent)

  Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  |  | The index to start removing children from. |
| `endIndex` | integer |  <optional> |  | The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |

  Inherited From * [Phaser.Group#removeBetween](phaser.group#removeBetween)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2556](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2556))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
removeFromHash(child) → {boolean}

  Removes a child of this Group from the hash array.  
This call will return false if the child is not in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to remove from this Groups hash. Must be a member of this Group and in the hash. |

 ##### Returns

   boolean -   True if the child was successfully removed from the hash, otherwise false.

    Inherited From * [Phaser.Group#removeFromHash](phaser.group#removeFromHash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 464](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L464))   ### 
replace(oldChild, newChild) → {any}

  Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `oldChild` | any | The child in this group that will be replaced. |
| `newChild` | any | The child to be inserted into this group. |

 ##### Returns

   any -   Returns the oldChild that was replaced within this group.

    Inherited From * [Phaser.Group#replace](phaser.group#replace)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1065](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1065))   ### 
resetChild(child, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

 If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

 The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  | The child to reset and/or load the texture on. |
| `x` | number |  <optional> | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was reset: usually a [Phaser.Sprite](phaser.sprite).

    Inherited From * [Phaser.Group#resetChild](phaser.group#resetChild)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2165))   ### 
resetCursor(index) → {any}

  Sets the group cursor to the first child in the group.

 If the optional index parameter is given it sets the cursor to the object at that index instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `index` | integer |  <optional> |  0  | Set the cursor to point to a specific index. |

 ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#resetCursor](phaser.group#resetCursor)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 806](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L806))   ### 
resize()

  Resize.

   Source code: [core/FlexLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/FlexLayer.js#L93))   ### 
reverse()

  Reverses all children in this group.

 This operation applies only to immediate children and does not propagate to subgroups.

   Inherited From * [Phaser.Group#reverse](phaser.group#reverse)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1015](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1015))   ### 
sendToBack(child) → {any}

  Sends the given child to the bottom of this group so it renders below all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to send to the bottom of this group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#sendToBack](phaser.group#sendToBack)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 926](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L926))   ### 
set(child, key, value, checkAlive, checkVisible, operation, force) → {boolean}

  Quickly set a property on a single child of this group to a new value.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [Phaser.Sprite](phaser.sprite) |  |  | The child to set the property on. |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then the child will only be updated if alive=true. |
| `checkVisible` | boolean |  <optional> |  false  | If set then the child will only be updated if visible=true. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Inherited From * [Phaser.Group#set](phaser.group#set)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1246))   ### 
setAll(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group to a new value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.  
If you need that ability please see `Group.setAllChildren`.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Inherited From * [Phaser.Group#setAll](phaser.group#setAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1277](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1277))   ### 
setAllChildren(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group, and any child Groups, to a new value.

 If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.  
Unlike with `setAll` the property is NOT set on child Groups itself.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Inherited From * [Phaser.Group#setAllChildren](phaser.group#setAllChildren)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1312](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1312))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setProperty(child, key, value, operation, force) → {boolean}

  Sets a property to the given value on the child. The operation parameter controls how the value is set.

 The operations are:

 * 0: set the existing value to the given value; if force is `true` a new property will be created if needed
* 1: will add the given value to the value already present.
* 2: will subtract the given value from the value already present.
* 3: will multiply the value already present by the given value.
* 4: will divide the value already present by the given value.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to set the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be set. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Inherited From * [Phaser.Group#setProperty](phaser.group#setProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1139))   ### 
sort(key, order)

  Sort the children in the group according to a particular key and ordering.

 Call this function to sort the group according to a particular key value and order.

 For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

 Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including  
alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  <optional> |  'z'  | The name of the property to sort on. Defaults to the objects z-depth value. |
| `order` | integer |  <optional> |  Phaser.Group.SORT\_ASCENDING  | Order ascending ([SORT\_ASCENDING](phaser.group#.SORT_ASCENDING)) or descending ([SORT\_DESCENDING](phaser.group#.SORT_DESCENDING)). |

  Inherited From * [Phaser.Group#sort](phaser.group#sort)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1855](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1855))   ### 
subAll(property, amount, checkAlive, checkVisible)

  Subtracts the amount from the given property on all children in this group.

 `Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to decrement, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#subAll](phaser.group#subAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1403](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1403))   ### 
swap(child1, child2)

  Swaps the position of two children in this group.

 Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child1` | any | The first child to swap. |
| `child2` | any | The second child to swap. |

  Inherited From * [Phaser.Group#swap](phaser.group#swap)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 891](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L891))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
<internal> update()

  The core update - as called by World.

   Inherited From * [Phaser.Group#update](phaser.group#update)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1639](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1639))   ### 
<internal> updateZ()

  Internal method that re-applies all of the children's Z values.

 This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

   Inherited From * [Phaser.Group#updateZ](phaser.group#updateZ)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 663](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L663))   ### 
xy(index, x, y)

  Positions the child found at the given index within this group to the given x and y coordinates.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index of the child in the group to set the position of. |
| `x` | number | The new x position of the child. |
| `y` | number | The new y position of the child. |

  Inherited From * [Phaser.Group#xy](phaser.group#xy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 993](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L993))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.FlexLayer.html>

Class: Phaser.SpriteBatch
=========================

 Constructor
-----------

 ### 
new SpriteBatch(game, parent, name, addToStage)

  The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles.  
It's worth mentioning that by default sprite batches are used through-out the renderer, so you only really need to use a SpriteBatch if you have over  
1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled  
Sprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.

 Please note that any Sprite that is part of a SpriteBatch will not have its bounds updated, so will fail checks such as outOfBounds.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `parent` | [Phaser.Group](phaser.group) | [Phaser.Sprite](phaser.sprite) | null |  |  | The parent Group, DisplayObject or DisplayObjectContainer that this Group will be added to. If `undefined` or `null` it will use game.world. |
| `name` | string |  <optional> |  group  | A name for this Group. Not used internally but useful for debugging. |
| `addToStage` | boolean |  <optional> |  false  | If set to true this Group will be added directly to the Game.Stage instead of Game.World. |

  Source code: [gameobjects/SpriteBatch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/SpriteBatch.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/SpriteBatch.js#L23))   Extends
-------

 * [Phaser.Group](phaser.group)

 Public Properties
-----------------

  ### 
alive : boolean

  The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

   Inherited From * [Phaser.Group#alive](phaser.group#alive)
 Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L93))   ### 
alpha : number

  The alpha value of the group container.

   Inherited From * [Phaser.Group#alpha](phaser.group#alpha)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 3003](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L3003))   ### 
angle : number

  The angle of rotation of the group container, in degrees.

 This adjusts the group itself by modifying its local rotation transform.

 This has no impact on the rotation/angle properties of the children, but it will update their worldTransform  
and on-screen orientation and position.

   Inherited From * [Phaser.Group#angle](phaser.group#angle)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2682))   ### 
bottom : number

  The bottom coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#bottom](phaser.group#bottom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2845](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2845))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  If this object is [fixedToCamera](phaser.group#fixedToCamera) then this stores the x/y position offset relative to the top-left of the camera view.  
If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

   Inherited From * [Phaser.Group#cameraOffset](phaser.group#cameraOffset)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 272](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L272))   ### 
centerX : number

  The center x coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#centerX](phaser.group#centerX)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2705](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2705))   ### 
centerY : number

  The center y coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#centerY](phaser.group#centerY)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2733](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2733))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
classType : Object

  The type of objects that will be created when using [create](phaser.group#create) or [createMultiple](phaser.group#createMultiple).

 Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments:  
when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

   Inherited From * [Phaser.Group#classType](phaser.group#classType)
 Default Value * [Phaser.Sprite](phaser.sprite)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L130))   ### 
cursor : [DisplayObject](global#DisplayObject)

  The current display object that the group cursor is pointing to, if any. (Can be set manually.)

 The cursor is a way to iterate through the children in a Group using [next](phaser.group#next) and [previous](phaser.group#previous).

   Inherited From * [Phaser.Group#cursor](phaser.group#cursor)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L138))   ### 
[readonly] cursorIndex : integer

  The current index of the Group cursor. Advance it with Group.next.

   Inherited From * [Phaser.Group#cursorIndex](phaser.group#cursorIndex)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 255](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L255))   ### 
enableBody : boolean

  If true all Sprites created by, or added to this group, will have a physics body enabled on them.

 If there are children already in the Group at the time you set this property, they are not changed.

 The default body type is controlled with [physicsBodyType](phaser.group#physicsBodyType).

   Inherited From * [Phaser.Group#enableBody](phaser.group#enableBody)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L208))   ### 
enableBodyDebug : boolean

  If true when a physics body is created (via [enableBody](phaser.group#enableBody)) it will create a physics debug object as well.

 This only works for P2 bodies.

   Inherited From * [Phaser.Group#enableBodyDebug](phaser.group#enableBodyDebug)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L217))   ### 
exists : boolean

  If exists is true the group is updated, otherwise it is skipped.

   Inherited From * [Phaser.Group#exists](phaser.group#exists)
 Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L100))   ### 
fixedToCamera : boolean

  A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

 Note that the cameraOffset values are in addition to any parent in the display list.  
So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

   Inherited From * [Phaser.Group#fixedToCamera](phaser.group#fixedToCamera)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 265](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L265))   ### 
<internal> game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Group#game](phaser.group#game)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L38))   ### 
hash :array

  The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

 Only children of this Group can be added to and removed from the hash.

 This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.  
However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own  
sorting and filtering of Group children without touching their z-index (and therefore display draw order)

   Inherited From * [Phaser.Group#hash](phaser.group#hash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 285](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L285))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
ignoreDestroy : boolean

  A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

   Inherited From * [Phaser.Group#ignoreDestroy](phaser.group#ignoreDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L107))   ### 
inputEnableChildren : boolean

  A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true`  
on any children *added* to, or *created by*, this Group.

 If there are children already in the Group at the time you set this property, they are not changed.

   Inherited From * [Phaser.Group#inputEnableChildren](phaser.group#inputEnableChildren)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L149))   ### 
left : number

  The left coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#left](phaser.group#left)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2761](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2761))   ### 
[readonly] length : integer

  Total number of children in this group, regardless of exists/alive status.

   Inherited From * [Phaser.Group#length](phaser.group#length)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2665](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2665))   ### 
name : string

  A name for this group. Not used internally but useful for debugging.

   Inherited From * [Phaser.Group#name](phaser.group#name)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L49))   ### 
onChildInputDown : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputDown](phaser.group#onChildInputDown)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L161))   ### 
onChildInputOut : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputOut](phaser.group#onChildInputOut)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L198))   ### 
onChildInputOver : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputOver](phaser.group#onChildInputOver)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L186))   ### 
onChildInputUp : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal,  
a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer  
is still over the Sprite or not.

   Inherited From * [Phaser.Group#onChildInputUp](phaser.group#onChildInputUp)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L174))   ### 
onDestroy : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the group is destroyed.

   Inherited From * [Phaser.Group#onDestroy](phaser.group#onDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L249))   ### 
pendingDestroy : boolean

  A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method  
called on the next logic update.  
You can set it directly to flag the Group to be destroyed on its next update.

 This is extremely useful if you wish to destroy a Group from within one of its own callbacks  
or a callback of one of its children.

   Inherited From * [Phaser.Group#pendingDestroy](phaser.group#pendingDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L119))   ### 
physicsBodyType : integer

  If [enableBody](phaser.group#enableBody) is true this is the type of physics body that is created on new Sprites.

 The valid values are [Phaser.Physics.ARCADE](phaser.physics#.ARCADE), [Phaser.Physics.P2JS](phaser.physics#.P2JS), [Phaser.Physics.NINJA](phaser.physics#.NINJA), etc.

   Inherited From * [Phaser.Group#physicsBodyType](phaser.group#physicsBodyType)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L225))   ### 
physicsSortDirection : integer

  If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

 It should be set to one of the Phaser.Physics.Arcade sort direction constants: 

 Phaser.Physics.Arcade.SORT\_NONE  
Phaser.Physics.Arcade.LEFT\_RIGHT  
Phaser.Physics.Arcade.RIGHT\_LEFT  
Phaser.Physics.Arcade.TOP\_BOTTOM  
Phaser.Physics.Arcade.BOTTOM\_TOP

 If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

   Inherited From * [Phaser.Group#physicsSortDirection](phaser.group#physicsSortDirection)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 243](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L243))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Inherited From * [Phaser.Group#physicsType](phaser.group#physicsType)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L86))   ### 
right : number

  The right coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#right](phaser.group#right)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2789](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2789))   ### 
rotation : number

  The angle of rotation of the group container, in radians.

 This will adjust the group container itself by modifying its rotation.  
This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#rotation](phaser.group#rotation)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2987](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2987))   ### 
top : number

  The top coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#top](phaser.group#top)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2817](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2817))   ### 
[readonly] total : integer

  Total number of existing children in the group.

   Inherited From * [Phaser.Group#total](phaser.group#total)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2648](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2648))   ### 
<internal> type : number

  Internal Phaser Type value.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/SpriteBatch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/SpriteBatch.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/SpriteBatch.js#L35))   ### 
visible : boolean

  The visible state of the group. Non-visible Groups and all of their children are not rendered.

   Inherited From * [Phaser.Group#visible](phaser.group#visible)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2996](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2996))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))   ### 
x : number

  The x coordinate of the group container.

 You can adjust the group container itself by modifying its coordinates.  
This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#x](phaser.group#x)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2969))   ### 
y : number

  The y coordinate of the group container.

 You can adjust the group container itself by modifying its coordinates.  
This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#y](phaser.group#y)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2978](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2978))   ### 
[readonly] z : integer

  The z-depth value of this object within its parent container/Group - the World is a Group as well.  
This value must be unique for each child in a Group.

   Inherited From * [Phaser.Group#z](phaser.group#z)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L57))    Public Methods
--------------

  ### 
add(child, silent, index) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object as the top child in this group.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If the child was already in this Group, it is simply returned, and nothing else happens to it.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

 Use [addAt](phaser.group#addAt) to control where a child is added. Use [create](phaser.group#create) to create and add a new child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Inherited From * [Phaser.Group#add](phaser.group#add)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L341))   ### 
addAll(property, amount, checkAlive, checkVisible)

  Adds the amount to the given property on all children in this group.

 `Group.addAll('x', 10)` will add 10 to the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to increment, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#addAll](phaser.group#addAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1386))   ### 
addAt(child, index, silent) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object to this group.

 The child is added to the group at the location specified by the index value, this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `index` | integer |  <optional> |  0  | The index within the group to insert the child to. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Inherited From * [Phaser.Group#addAt](phaser.group#addAt)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 418](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L418))   ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
addMultiple(children, silent) → {Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group)}

  Adds an array of existing Display Objects to this Group.

 The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

 As well as an array you can also pass another Group as the first argument. In this case all of the children from that  
Group will be removed from it and added into this Group.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `children` | Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) |  |  | An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) -   The array of children or Group of children that were added to this Group.

    Inherited From * [Phaser.Group#addMultiple](phaser.group#addMultiple)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 489](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L489))   ### 
addToHash(child) → {boolean}

  Adds a child of this Group into the hash array.  
This call will return false if the child is not a child of this Group, or is already in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash. |

 ##### Returns

   boolean -   True if the child was successfully added to the hash, otherwise false.

    Inherited From * [Phaser.Group#addToHash](phaser.group#addToHash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 439](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L439))   ### 
align(width, height, cellWidth, cellHeight, position, offset) → {boolean}

  This method iterates through all children in the Group (regardless if they are visible or exist)  
and then changes their position so they are arranged in a Grid formation. Children must have  
the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have  
this.

 The grid dimensions are determined by the first four arguments. The `width` and `height` arguments  
relate to the width and height of the grid respectively.

 For example if the Group had 100 children in it:

 `Group.align(10, 10, 32, 32)`

 This will align all of the children into a grid formation of 10x10, using 32 pixels per  
grid cell. If you want a wider grid, you could do:

 `Group.align(25, 4, 32, 32)`

 This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

 You can choose to set *either* the `width` or `height` value to -1. Doing so tells the method  
to keep on aligning children until there are no children left. For example if this Group had  
48 children in it, the following:

 `Group.align(-1, 8, 32, 32)`

 ... will align the children so that there are 8 children vertically (the second argument),  
and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

 You can also do:

 `Group.align(10, -1, 32, 32)`

 In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit  
all of the children in.

 The `position` property allows you to control where in each grid cell the child is positioned.  
This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`,  
`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`,  
`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

 The final argument; `offset` lets you start the alignment from a specific child index.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | integer |  |  | The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value. |
| `height` | integer |  |  | The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value. |
| `cellWidth` | integer |  |  | The width of each grid cell, in pixels. |
| `cellHeight` | integer |  |  | The height of each grid cell, in pixels. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offset` | integer |  <optional> |  0  | Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value. |

 ##### Returns

   boolean -   True if the Group children were aligned, otherwise false.

    Inherited From * [Phaser.Group#align](phaser.group#align)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L682))   ### 
alignIn(container, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation and scale of its children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Inherited From * [Phaser.Group#alignIn](phaser.group#alignIn)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2873](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2873))   ### 
alignTo(parent, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation and scale of the children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Inherited From * [Phaser.Group#alignTo](phaser.group#alignTo)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2915](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2915))   ### 
<internal> ascendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Inherited From * [Phaser.Group#ascendingSortHandler](phaser.group#ascendingSortHandler)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1919](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1919))   ### 
bringToTop(child) → {any}

  Brings the given child to the top of this group so it renders above all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to bring to the top of this group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#bringToTop](phaser.group#bringToTop)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 907](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L907))   ### 
callAll(method, context, args)

  Calls a function, specified by name, on all on children.

 The function is called for all children regardless if they are dead or alive (see callAllExists for different options).  
After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `method` | string |  |  | Name of the function on the child to call. Deep property lookup is supported. |
| `context` | string |  <optional> |  null  | A string containing the context under which the method will be executed. Set to null to default to the child. |
| `args` | any |  <repeatable> |  | Additional parameters that will be passed to the method. |

  Inherited From * [Phaser.Group#callAll](phaser.group#callAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1538](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1538))   ### 
callAllExists(callback, existsValue, parameter)

  Calls a function, specified by name, on all children in the group who exist (or do not exist).

 After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `callback` | string |  | Name of the function on the children to call. |
| `existsValue` | boolean |  | Only children with exists=existsValue will be called. |
| `parameter` | any |  <repeatable> | Additional parameters that will be passed to the callback. |

  Inherited From * [Phaser.Group#callAllExists](phaser.group#callAllExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1454](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1454))   ### 
<internal> callbackFromArray(child, callback, length)

  Returns a reference to a function that exists on a child of the group based on the given callback array.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | object | The object to inspect. |
| `callback` | array | The array of function names. |
| `length` | integer | The size of the array (pre-calculated in callAll). |

  Inherited From * [Phaser.Group#callbackFromArray](phaser.group#callbackFromArray)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1488](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1488))   ### 
checkAll(key, value, checkAlive, checkVisible, force)

  Quickly check that the same property across all children of this group is equal to the given value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be checked. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be checked. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be checked. This includes any Groups that are children. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

  Inherited From * [Phaser.Group#checkAll](phaser.group#checkAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1353](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1353))   ### 
checkProperty(child, key, value, force) → {boolean}

  Checks a property for the given value on the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to check the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be checked. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

 ##### Returns

   boolean -   True if the property was was equal to value, false if not.

    Inherited From * [Phaser.Group#checkProperty](phaser.group#checkProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1217))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
countDead() → {integer}

  Get the number of dead children in this group.

  ##### Returns

   integer -   The number of children flagged as dead.

    Inherited From * [Phaser.Group#countDead](phaser.group#countDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2338))   ### 
countLiving() → {integer}

  Get the number of living children in this group.

  ##### Returns

   integer -   The number of children flagged as alive.

    Inherited From * [Phaser.Group#countLiving](phaser.group#countLiving)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2326](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2326))   ### 
create(x, y, key, frame, exists, index) → {[DisplayObject](global#DisplayObject)}

  Creates a new Phaser.Sprite object and adds it to the top of this group.

 Use [classType](phaser.group#classType) to change the type of object created.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point. |
| `y` | number |  |  | The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `exists` | boolean |  <optional> |  true  | The default exists state of the Sprite. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was created: will be a [Phaser.Sprite](phaser.sprite) unless #classType has been changed.

    Inherited From * [Phaser.Group#create](phaser.group#create)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 544](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L544))   ### 
createMultiple(quantity, key, frame, exists) → {array}

  Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

 This method is useful if you need to quickly generate a pool of sprites, such as bullets.

 Use [classType](phaser.group#classType) to change the type of object created.

 You can provide an array as the `key` and / or `frame` arguments. When you do this  
it will create `quantity` Sprites for every key (and frame) in the arrays.

 For example:

 `createMultiple(25, ['ball', 'carrot'])`

 In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be  
created in total, 25 of each. You can also have the `frame` as an array:

 `createMultiple(5, 'bricks', [0, 1, 2, 3])`

 In the above there is one key (bricks), which is a sprite sheet. The frames array tells  
this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because  
the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with  
frame 1, and so on.

 If you set both the key and frame arguments to be arrays then understand it will create  
a total quantity of sprites equal to the size of both arrays times each other. I.e.:

 `createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

 The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.  
It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.  
In total it will have created 120 sprites.

 By default the Sprites will have their `exists` property set to `false`, and they will be  
positioned at 0x0, relative to the `Group.x / y` values.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | integer |  |  | The number of Sprites to create. |
| `key` | string | array |  |  | The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used. |
| `frame` | integer | string | array |  <optional> |  0  | If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used. |
| `exists` | boolean |  <optional> |  false  | The default exists state of the Sprite. |

 ##### Returns

   array -   An array containing all of the Sprites that were created.

    Inherited From * [Phaser.Group#createMultiple](phaser.group#createMultiple)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 581](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L581))   ### 
customSort(sortHandler, context)

  Sort the children in the group according to custom sort function.

 The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).  
It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sortHandler` | function |  | The custom sort function. |
| `context` | object |  <optional> | The context in which the sortHandler is called. |

  Inherited From * [Phaser.Group#customSort](phaser.group#customSort)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1895](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1895))   ### 
<internal> descendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Inherited From * [Phaser.Group#descendingSortHandler](phaser.group#descendingSortHandler)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1951](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1951))   ### 
destroy(destroyChildren, soft)

  Destroys this group.

 Removes all children, then removes this group from its parent and nulls references.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | If true `destroy` will be invoked on each removed child. |
| `soft` | boolean |  <optional> |  false  | A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does. |

  Inherited From * [Phaser.Group#destroy](phaser.group#destroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2611))   ### 
divideAll(property, amount, checkAlive, checkVisible)

  Divides the given property by the amount on all children in this group.

 `Group.divideAll('x', 2)` will half the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to divide, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#divideAll](phaser.group#divideAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1437))   ### 
filter(predicate, checkExists) → {[Phaser.ArraySet](phaser.arrayset)}

  Find children matching a certain predicate.

 For example:

 
```
var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');
```

Note: Currently this will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `predicate` | function |  |  | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third |
| `checkExists` | boolean |  <optional> |  false  | If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate. |

 ##### Returns

   [Phaser.ArraySet](phaser.arrayset) -   Returns an array list containing all the children that the predicate returned true for

    Inherited From * [Phaser.Group#filter](phaser.group#filter)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1677](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1677))   ### 
forEach(callback, callbackContext, checkExists, args)

  Call a function on each child in this group.

 Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

 
```
Group.forEach(awardBonusGold, this, true, 100, 500)
```

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

 Note: This check will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `checkExists` | boolean |  <optional> |  false  | If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed. |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEach](phaser.group#forEach)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1717))   ### 
forEachAlive(callback, callbackContext, args)

  Call a function on each alive child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachAlive](phaser.group#forEachAlive)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1799](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1799))   ### 
forEachDead(callback, callbackContext, args)

  Call a function on each dead child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachDead](phaser.group#forEachDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1827](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1827))   ### 
forEachExists(callback, callbackContext, args)

  Call a function on each existing child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachExists](phaser.group#forEachExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1771](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1771))   ### 
getAll(property, value, startIndex, endIndex) → {any}

  Returns all children in this Group.

 You can optionally specify a matching criteria using the `property` and `value` arguments.

 For example: `getAll('exists', true)` would return only children that have their exists property set.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `property` | string |  <optional> |  | An optional property to test against the value argument. |
| `value` | any |  <optional> |  | If property is set then Child.property must strictly equal this value to be included in the results. |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up until. |

 ##### Returns

   any -   A random existing child of this Group.

    Inherited From * [Phaser.Group#getAll](phaser.group#getAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2392](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2392))   ### 
getAt(index) → {[DisplayObject](global#DisplayObject) | integer}

  Returns the child found at the given index within this group.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index to return the child from. |

 ##### Returns

   [DisplayObject](global#DisplayObject) | integer -   The child that was found at the given index, or -1 for an invalid index.

    Inherited From * [Phaser.Group#getAt](phaser.group#getAt)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 524](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L524))   ### 
getBottom() → {any}

  Returns the child at the bottom of this group.

 The bottom child the child being displayed (rendered) below every other child.

  ##### Returns

   any -   The child at the bottom of the Group.

    Inherited From * [Phaser.Group#getBottom](phaser.group#getBottom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2221))   ### 
getBounds(targetCoordinateSpace) → {Rectangle}

  Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `targetCoordinateSpace` | PIXIDisplayObject | PIXIMatrix |  <optional> | Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. |

 ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getBounds](pixi.displayobjectcontainer#getBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 280](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L280))   ### 
getByName(name) → {any}

  Searches the Group for the first instance of a child with the `name`  
property matching the given argument. Should more than one child have  
the same name only the first instance is returned.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name to search for. |

 ##### Returns

   any -   The first child with a matching name, or null if none were found.

    Inherited From * [Phaser.Group#getByName](phaser.group#getByName)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1042](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1042))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getClosestTo(object, callback, callbackContext) → {any}

  Get the closest child to given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child closest to given object, or `null` if no child was found.

    Inherited From * [Phaser.Group#getClosestTo](phaser.group#getClosestTo)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2238](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2238))   ### 
getFirstAlive(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is alive (`child.alive === true`).

 This is handy for choosing a squad leader, etc.

 You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The alive dead child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstAlive](phaser.group#getFirstAlive)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2105))   ### 
getFirstDead(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is dead (`child.alive === false`).

 This is handy for checking if everything has been wiped out and adding to the pool as needed.

 You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no dead children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first dead child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstDead](phaser.group#getFirstDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2135))   ### 
getFirstExists(exists, createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first display object that exists, or doesn't exist.

 You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `exists` | boolean |  <optional> |  true  | If true, find the first existing child; otherwise find the first non-existing child. |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstExists](phaser.group#getFirstExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2071](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2071))   ### 
getFurthestFrom(object, callback, callbackContext) → {any}

  Get the child furthest away from the given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child furthest from the given object, or `null` if no child was found.

    Inherited From * [Phaser.Group#getFurthestFrom](phaser.group#getFurthestFrom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2282](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2282))   ### 
getIndex(child) → {integer}

  Get the index position of the given child in this group, which should match the child's `z` property.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to get the index for. |

 ##### Returns

   integer -   The index of the child or -1 if it's not a member of this group.

    Inherited From * [Phaser.Group#getIndex](phaser.group#getIndex)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1029](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1029))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
getRandom(startIndex, length) → {any}

  Returns a random child from the group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | Offset from the front of the group (lowest child). |
| `length` | integer |  <optional> |  (to top)  | Restriction on the number of values you want to randomly select from. |

 ##### Returns

   any -   A random child of this Group.

    Inherited From * [Phaser.Group#getRandom](phaser.group#getRandom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2350](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2350))   ### 
getRandomExists(startIndex, endIndex) → {any}

  Returns a random child from the Group that has `exists` set to `true`.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up to. |

 ##### Returns

   any -   A random child of this Group that exists.

    Inherited From * [Phaser.Group#getRandomExists](phaser.group#getRandomExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2372](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2372))   ### 
getTop() → {any}

  Return the child at the top of this group.

 The top child is the child displayed (rendered) above every other child.

  ##### Returns

   any -   The child at the top of the Group.

    Inherited From * [Phaser.Group#getTop](phaser.group#getTop)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2204))   ### 
hasProperty(child, key) → {boolean}

  Checks if the child has the given property.

 Will scan up to 4 levels deep only.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to check for the existence of the property on. |
| `key` | Array.<string> | An array of strings that make up the property. |

 ##### Returns

   boolean -   True if the child has the property, otherwise false.

    Inherited From * [Phaser.Group#hasProperty](phaser.group#hasProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1104))   ### 
iterate(key, value, returnType, callback, callbackContext, args) → {any}

  Iterates over the children of the group performing one of several actions for matched children.

 A child is considered a match when it has a property, named `key`, whose value is equal to `value`  
according to a strict equality comparison.

 The result depends on the `returnType`:

 * [RETURN\_TOTAL](phaser.group#.RETURN_TOTAL):  
 The callback, if any, is applied to all matching children. The number of matched children is returned.
* [RETURN\_NONE](phaser.group#.RETURN_NONE):  
 The callback, if any, is applied to all matching children. No value is returned.
* [RETURN\_CHILD](phaser.group#.RETURN_CHILD):  
 The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.  
 If there is no matching child then null is returned.

 If `args` is specified it must be an array. The matched child will be assigned to the first  
element and the entire array will be applied to the callback function.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The child property to check, i.e. 'exists', 'alive', 'health' |
| `value` | any |  |  | A child matches if `child[key] === value` is true. |
| `returnType` | integer |  |  | How to iterate the children and what to return. |
| `callback` | function |  <optional> |  null  | Optional function that will be called on each matching child. The matched child is supplied as the first argument. |
| `callbackContext` | object |  <optional> |  | The context in which the function should be called (usually 'this'). |
| `args` | Array.<any> |  <optional> |  (none)  | The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child. |

 ##### Returns

   any -   Returns either an integer (for RETURN\_TOTAL), the first matched child (for RETURN\_CHILD), or null.

    Inherited From * [Phaser.Group#iterate](phaser.group#iterate)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1976](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1976))   ### 
moveAll(group, silent) → {[Phaser.Group](phaser.group)}

  Moves all children from this Group to the Group given.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `group` | [Phaser.Group](phaser.group) |  |  | The new Group to which the children will be moved to. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event for the new Group. |

 ##### Returns

   [Phaser.Group](phaser.group) -   The Group to which all the children were moved.

    Inherited From * [Phaser.Group#moveAll](phaser.group#moveAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2479](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2479))   ### 
moveDown(child) → {any}

  Moves the given child down one place in this group unless it's already at the bottom.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move down in the group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#moveDown](phaser.group#moveDown)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L969))   ### 
moveUp(child) → {any}

  Moves the given child up one place in this group unless it's already at the top.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move up in the group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#moveUp](phaser.group#moveUp)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 945](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L945))   ### 
multiplyAll(property, amount, checkAlive, checkVisible)

  Multiplies the given property by the amount on all children in this group.

 `Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to multiply, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#multiplyAll](phaser.group#multiplyAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1420](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1420))   ### 
next() → {any}

  Advances the group cursor to the next (higher) object in the group.

 If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

  ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#next](phaser.group#next)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 833](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L833))   ### 
<internal> postUpdate()

  The core postUpdate - as called by World.

   Inherited From * [Phaser.Group#postUpdate](phaser.group#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1656](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1656))   ### 
<internal> preUpdate()

  The core preUpdate - as called by World.

   Inherited From * [Phaser.Group#preUpdate](phaser.group#preUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1611))   ### 
previous() → {any}

  Moves the group cursor to the previous (lower) child in the group.

 If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

  ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#previous](phaser.group#previous)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 862](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L862))   ### 
remove(child, destroy, silent) → {boolean}

  Removes the given child from this group.

 This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

 If the group cursor was referring to the removed child it is updated to refer to the next child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to remove. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on the removed child. |
| `silent` | boolean |  <optional> |  false  | If true the the child will not dispatch the `onRemovedFromGroup` event. |

 ##### Returns

   boolean -   true if the child was removed from this group, otherwise false.

    Inherited From * [Phaser.Group#remove](phaser.group#remove)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2431](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2431))   ### 
removeAll(destroy, silent, destroyTexture)

  Removes all children from this Group, but does not remove the group from its parent.

 The children can be optionally destroyed as they are removed.

 You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |
| `destroyTexture` | boolean |  <optional> |  false  | If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Group#removeAll](phaser.group#removeAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2508](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2508))   ### 
removeBetween(startIndex, endIndex, destroy, silent)

  Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  |  | The index to start removing children from. |
| `endIndex` | integer |  <optional> |  | The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |

  Inherited From * [Phaser.Group#removeBetween](phaser.group#removeBetween)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2556](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2556))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
removeFromHash(child) → {boolean}

  Removes a child of this Group from the hash array.  
This call will return false if the child is not in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to remove from this Groups hash. Must be a member of this Group and in the hash. |

 ##### Returns

   boolean -   True if the child was successfully removed from the hash, otherwise false.

    Inherited From * [Phaser.Group#removeFromHash](phaser.group#removeFromHash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 464](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L464))   ### 
replace(oldChild, newChild) → {any}

  Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `oldChild` | any | The child in this group that will be replaced. |
| `newChild` | any | The child to be inserted into this group. |

 ##### Returns

   any -   Returns the oldChild that was replaced within this group.

    Inherited From * [Phaser.Group#replace](phaser.group#replace)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1065](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1065))   ### 
resetChild(child, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

 If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

 The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  | The child to reset and/or load the texture on. |
| `x` | number |  <optional> | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was reset: usually a [Phaser.Sprite](phaser.sprite).

    Inherited From * [Phaser.Group#resetChild](phaser.group#resetChild)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2165))   ### 
resetCursor(index) → {any}

  Sets the group cursor to the first child in the group.

 If the optional index parameter is given it sets the cursor to the object at that index instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `index` | integer |  <optional> |  0  | Set the cursor to point to a specific index. |

 ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#resetCursor](phaser.group#resetCursor)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 806](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L806))   ### 
reverse()

  Reverses all children in this group.

 This operation applies only to immediate children and does not propagate to subgroups.

   Inherited From * [Phaser.Group#reverse](phaser.group#reverse)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1015](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1015))   ### 
sendToBack(child) → {any}

  Sends the given child to the bottom of this group so it renders below all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to send to the bottom of this group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#sendToBack](phaser.group#sendToBack)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 926](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L926))   ### 
set(child, key, value, checkAlive, checkVisible, operation, force) → {boolean}

  Quickly set a property on a single child of this group to a new value.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [Phaser.Sprite](phaser.sprite) |  |  | The child to set the property on. |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then the child will only be updated if alive=true. |
| `checkVisible` | boolean |  <optional> |  false  | If set then the child will only be updated if visible=true. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Inherited From * [Phaser.Group#set](phaser.group#set)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1246))   ### 
setAll(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group to a new value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.  
If you need that ability please see `Group.setAllChildren`.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Inherited From * [Phaser.Group#setAll](phaser.group#setAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1277](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1277))   ### 
setAllChildren(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group, and any child Groups, to a new value.

 If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.  
Unlike with `setAll` the property is NOT set on child Groups itself.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Inherited From * [Phaser.Group#setAllChildren](phaser.group#setAllChildren)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1312](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1312))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setProperty(child, key, value, operation, force) → {boolean}

  Sets a property to the given value on the child. The operation parameter controls how the value is set.

 The operations are:

 * 0: set the existing value to the given value; if force is `true` a new property will be created if needed
* 1: will add the given value to the value already present.
* 2: will subtract the given value from the value already present.
* 3: will multiply the value already present by the given value.
* 4: will divide the value already present by the given value.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to set the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be set. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Inherited From * [Phaser.Group#setProperty](phaser.group#setProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1139))   ### 
sort(key, order)

  Sort the children in the group according to a particular key and ordering.

 Call this function to sort the group according to a particular key value and order.

 For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

 Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including  
alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  <optional> |  'z'  | The name of the property to sort on. Defaults to the objects z-depth value. |
| `order` | integer |  <optional> |  Phaser.Group.SORT\_ASCENDING  | Order ascending ([SORT\_ASCENDING](phaser.group#.SORT_ASCENDING)) or descending ([SORT\_DESCENDING](phaser.group#.SORT_DESCENDING)). |

  Inherited From * [Phaser.Group#sort](phaser.group#sort)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1855](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1855))   ### 
subAll(property, amount, checkAlive, checkVisible)

  Subtracts the amount from the given property on all children in this group.

 `Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to decrement, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#subAll](phaser.group#subAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1403](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1403))   ### 
swap(child1, child2)

  Swaps the position of two children in this group.

 Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child1` | any | The first child to swap. |
| `child2` | any | The second child to swap. |

  Inherited From * [Phaser.Group#swap](phaser.group#swap)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 891](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L891))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
<internal> update()

  The core update - as called by World.

   Inherited From * [Phaser.Group#update](phaser.group#update)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1639](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1639))   ### 
<internal> updateZ()

  Internal method that re-applies all of the children's Z values.

 This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

   Inherited From * [Phaser.Group#updateZ](phaser.group#updateZ)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 663](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L663))   ### 
xy(index, x, y)

  Positions the child found at the given index within this group to the given x and y coordinates.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index of the child in the group to set the position of. |
| `x` | number | The new x position of the child. |
| `y` | number | The new y position of the child. |

  Inherited From * [Phaser.Group#xy](phaser.group#xy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 993](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L993))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.SpriteBatch.html>

Class: Phaser.Rectangle
=======================

 Constructor
-----------

 ### 
new Rectangle(x, y, width, height)

  Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters.  
If you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate of the top-left corner of the Rectangle. |
| `y` | number | The y coordinate of the top-left corner of the Rectangle. |
| `width` | number | The width of the Rectangle. Should always be either zero or a positive value. |
| `height` | number | The height of the Rectangle. Should always be either zero or a positive value. |

  Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 18](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L18))   Public Properties
-----------------

  ### 
bottom : number

  The sum of the y and height properties. Changing the bottom property of a Rectangle object has no effect on the x, y and width properties, but does change the height property.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 478](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L478))   ### 
bottomLeft : [Phaser.Point](phaser.point)

  The location of the Rectangles bottom left corner as a Point object. Gets or sets the location of the Rectangles bottom left corner as a Point object.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 504](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L504))   ### 
bottomRight : [Phaser.Point](phaser.point)

  The location of the Rectangles bottom right corner as a Point object. Gets or sets the location of the Rectangles bottom right corner as a Point object.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 522](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L522))   ### 
centerX : number

  The x coordinate of the center of the Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L611))   ### 
centerY : number

  The y coordinate of the center of the Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 628](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L628))   ### 
empty : boolean

  Determines whether or not this Rectangle object is empty. A Rectangle object is empty if its width or height is less than or equal to 0.  
If set to true then all of the Rectangle properties are set to 0. Gets or sets the Rectangles empty state.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 736](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L736))   ### 
[readonly] halfHeight : number

  Half of the height of the Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 465](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L465))   ### 
[readonly] halfWidth : number

  Half of the width of the Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 452](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L452))   ### 
height : number

  The height of the Rectangle. This value should never be set to a negative.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L43))   ### 
left : number

  The x coordinate of the left of the Rectangle. Changing the left property of a Rectangle object has no effect on the y and height properties. However it does affect the width property, whereas changing the x value does not affect the width property.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 540](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L540))   ### 
[readonly] perimeter : number

  The perimeter size of the Rectangle. This is the sum of all 4 sides.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 597](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L597))   ### 
randomX : number

  A random value between the left and right values (inclusive) of the Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 645](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L645))   ### 
randomY : number

  A random value between the top and bottom values (inclusive) of the Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 661](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L661))   ### 
right : number

  The sum of the x and width properties. Changing the right property of a Rectangle object has no effect on the x, y and height properties, however it does affect the width property.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 562](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L562))   ### 
top : number

  The y coordinate of the top of the Rectangle. Changing the top property of a Rectangle object has no effect on the x and width properties.  
However it does affect the height property, whereas changing the y value does not affect the height property.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 677](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L677))   ### 
topLeft : [Phaser.Point](phaser.point)

  The location of the Rectangles top left corner as a Point object.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 700](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L700))   ### 
topRight : [Phaser.Point](phaser.point)

  The location of the Rectangles top right corner as a Point object. The location of the Rectangles top left corner as a Point object.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 718](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L718))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L49))   ### 
[readonly] volume : number

  The volume of the Rectangle derived from width \* height.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 583](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L583))   ### 
width : number

  The width of the Rectangle. This value should never be set to a negative.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L38))   ### 
x : number

  The x coordinate of the top-left corner of the Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L28))   ### 
y : number

  The y coordinate of the top-left corner of the Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L33))    Public Methods
--------------

  ### 
<static> clone(a, output) → {[Phaser.Rectangle](phaser.rectangle)}

  Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) |  | The Rectangle object. |
| `output` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 815](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L815))   ### 
<static> contains(a, x, y) → {boolean}

  Determines whether the specified coordinates are contained within the region defined by this Rectangle object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) | The Rectangle object. |
| `x` | number | The x coordinate of the point to test. |
| `y` | number | The y coordinate of the point to test. |

 ##### Returns

   boolean -   A value of true if the Rectangle object contains the specified point; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 837](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L837))   ### 
<static> containsPoint(a, point) → {boolean}

  Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) | The Rectangle object. |
| `point` | [Phaser.Point](phaser.point) | The point object being checked. Can be Point or any object with .x and .y values. |

 ##### Returns

   boolean -   A value of true if the Rectangle object contains the specified point; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 873](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L873))   ### 
<static> containsRaw(rx, ry, rw, rh, x, y) → {boolean}

  Determines whether the specified coordinates are contained within the region defined by the given raw values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `rx` | number | The x coordinate of the top left of the area. |
| `ry` | number | The y coordinate of the top left of the area. |
| `rw` | number | The width of the area. |
| `rh` | number | The height of the area. |
| `x` | number | The x coordinate of the point to test. |
| `y` | number | The y coordinate of the point to test. |

 ##### Returns

   boolean -   A value of true if the Rectangle object contains the specified point; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 856](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L856))   ### 
<static> containsRect(a, b) → {boolean}

  Determines whether the first Rectangle object is fully contained within the second Rectangle object.  
A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) | The first Rectangle object. |
| `b` | [Phaser.Rectangle](phaser.rectangle) | The second Rectangle object. |

 ##### Returns

   boolean -   A value of true if the Rectangle object contains the specified point; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 886](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L886))   ### 
<static> equals(a, b) → {boolean}

  Determines whether the two Rectangles are equal.  
This method compares the x, y, width and height properties of each Rectangle.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) | The first Rectangle object. |
| `b` | [Phaser.Rectangle](phaser.rectangle) | The second Rectangle object. |

 ##### Returns

   boolean -   A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 906](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L906))   ### 
<static> inflate(a, dx, dy) → {[Phaser.Rectangle](phaser.rectangle)}

  Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) | The Rectangle object. |
| `dx` | number | The amount to be added to the left side of the Rectangle. |
| `dy` | number | The amount to be added to the bottom side of the Rectangle. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   This Rectangle object.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 761](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L761))   ### 
<static> inflatePoint(a, point) → {[Phaser.Rectangle](phaser.rectangle)}

  Increases the size of the Rectangle object. This method is similar to the Rectangle.inflate() method except it takes a Point object as a parameter.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) | The Rectangle object. |
| `point` | [Phaser.Point](phaser.point) | The x property of this Point object is used to increase the horizontal dimension of the Rectangle object. The y property is used to increase the vertical dimension of the Rectangle object. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   The Rectangle object.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 780](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L780))   ### 
<static> intersection(a, b, output) → {[Phaser.Rectangle](phaser.rectangle)}

  If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) |  | The first Rectangle object. |
| `b` | [Phaser.Rectangle](phaser.rectangle) |  | The second Rectangle object. |
| `output` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 933](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L933))   ### 
<static> intersects(a, b) → {boolean}

  Determines whether the two Rectangles intersect with each other.  
This method checks the x, y, width, and height properties of the Rectangles.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) | The first Rectangle object. |
| `b` | [Phaser.Rectangle](phaser.rectangle) | The second Rectangle object. |

 ##### Returns

   boolean -   A value of true if the specified object intersects with this Rectangle object; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 960](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L960))   ### 
<static> intersectsRaw(left, right, top, bottom, tolerance) → {boolean}

  Determines whether the object specified intersects (overlaps) with the given values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `left` | number | The x coordinate of the left of the area. |
| `right` | number | The right coordinate of the area. |
| `top` | number | The y coordinate of the area. |
| `bottom` | number | The bottom coordinate of the area. |
| `tolerance` | number | A tolerance value to allow for an intersection test with padding, default to 0 |

 ##### Returns

   boolean -   A value of true if the specified object intersects with the Rectangle; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 979](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L979))   ### 
<static> sameDimensions(a, b) → {boolean}

  Determines if the two objects (either Rectangles or Rectangle-like) have the same width and height values under strict equality.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | Rectangle-like | The first Rectangle object. |
| `b` | Rectangle-like | The second Rectangle object. |

 ##### Returns

   boolean -   True if the object have equivalent values for the width and height properties.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 920](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L920))   ### 
<static> size(a, output) → {[Phaser.Point](phaser.point)}

  The size of the Rectangle object, expressed as a Point object with the values of the width and height properties.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) |  | The Rectangle object. |
| `output` | [Phaser.Point](phaser.point) |  <optional> | Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The size of the Rectangle object

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 793](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L793))   ### 
<static> union(a, b, output) → {[Phaser.Rectangle](phaser.rectangle)}

  Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `a` | [Phaser.Rectangle](phaser.rectangle) |  | The first Rectangle object. |
| `b` | [Phaser.Rectangle](phaser.rectangle) |  | The second Rectangle object. |
| `output` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   A Rectangle object that is the union of the two Rectangles.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 997](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L997))   ### 
aabb(points, out) → {[Phaser.Rectangle](phaser.rectangle)}

  Calculates the Axis Aligned Bounding Box (or aabb) from an array of points.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `points` | Array.<[Phaser.Point](phaser.point)> |  | The array of one or more points. |
| `out` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | Optional Rectangle to store the value in, if not supplied a new Rectangle object will be created. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   The new Rectangle object.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 1016](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L1016))   ### 
ceil()

  Runs Math.ceil() on both the x and y values of this Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L163))   ### 
ceilAll()

  Runs Math.ceil() on the x, y, width and height values of this Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L174))   ### 
centerOn(x, y) → {[Phaser.Rectangle](phaser.rectangle)}

  Centers this Rectangle so that the center coordinates match the given x and y values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate to place the center of the Rectangle at. |
| `y` | number | The y coordinate to place the center of the Rectangle at. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   This Rectangle object

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 122](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L122))   ### 
clone(output) → {[Phaser.Rectangle](phaser.rectangle)}

  Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `output` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L259))   ### 
contains(x, y) → {boolean}

  Determines whether the specified coordinates are contained within the region defined by this Rectangle object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate of the point to test. |
| `y` | number | The y coordinate of the point to test. |

 ##### Returns

   boolean -   A value of true if the Rectangle object contains the specified point; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 271](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L271))   ### 
containsRect(b) → {boolean}

  Determines whether the first Rectangle object is fully contained within the second Rectangle object.  
A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `b` | [Phaser.Rectangle](phaser.rectangle) | The second Rectangle object. |

 ##### Returns

   boolean -   A value of true if the Rectangle object contains the specified point; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L284))   ### 
copyFrom(source) → {[Phaser.Rectangle](phaser.rectangle)}

  Copies the x, y, width and height properties from any given object to this Rectangle.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `source` | any | The object to copy from. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   This Rectangle object.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 187](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L187))   ### 
copyTo(source) → {object}

  Copies the x, y, width and height properties from this Rectangle to any given object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `source` | any | The object to copy to. |

 ##### Returns

   object -   This object.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L199))   ### 
equals(b) → {boolean}

  Determines whether the two Rectangles are equal.  
This method compares the x, y, width and height properties of each Rectangle.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `b` | [Phaser.Rectangle](phaser.rectangle) | The second Rectangle object. |

 ##### Returns

   boolean -   A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 297](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L297))   ### 
floor()

  Runs Math.floor() on both the x and y values of this Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L139))   ### 
floorAll()

  Runs Math.floor() on the x, y, width and height values of this Rectangle.

   Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L150))   ### 
getPoint(position, out) → {[Phaser.Point](phaser.point)}

  Returns a point based on the given position constant, which can be one of:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 This method returns the same values as calling Rectangle.bottomLeft, etc, but those  
calls always create a new Point object, where-as this one allows you to use your own.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `position` | integer |  <optional> | One of the Phaser position constants, such as `Phaser.TOP_RIGHT`. |
| `out` | [Phaser.Point](phaser.point) |  <optional> | A Phaser.Point that the values will be set in. If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an existing object. |

 ##### Returns

   [Phaser.Point](phaser.point) -   An object containing the point in its `x` and `y` properties.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L386))   ### 
inflate(dx, dy) → {[Phaser.Rectangle](phaser.rectangle)}

  Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `dx` | number | The amount to be added to the left side of the Rectangle. |
| `dy` | number | The amount to be added to the bottom side of the Rectangle. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   This Rectangle object.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 216](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L216))   ### 
intersection(b, out) → {[Phaser.Rectangle](phaser.rectangle)}

  If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `b` | [Phaser.Rectangle](phaser.rectangle) | The second Rectangle object. |
| `out` | [Phaser.Rectangle](phaser.rectangle) | Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 310](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L310))   ### 
intersects(b) → {boolean}

  Determines whether this Rectangle and another given Rectangle intersect with each other.  
This method checks the x, y, width, and height properties of the two Rectangles.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `b` | [Phaser.Rectangle](phaser.rectangle) | The second Rectangle object. |

 ##### Returns

   boolean -   A value of true if the specified object intersects with this Rectangle object; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 323](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L323))   ### 
intersectsRaw(left, right, top, bottom, tolerance) → {boolean}

  Determines whether the coordinates given intersects (overlaps) with this Rectangle.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `left` | number | The x coordinate of the left of the area. |
| `right` | number | The right coordinate of the area. |
| `top` | number | The y coordinate of the area. |
| `bottom` | number | The bottom coordinate of the area. |
| `tolerance` | number | A tolerance value to allow for an intersection test with padding, default to 0 |

 ##### Returns

   boolean -   A value of true if the specified object intersects with the Rectangle; otherwise false.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 337](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L337))   ### 
offset(dx, dy) → {[Phaser.Rectangle](phaser.rectangle)}

  Adjusts the location of the Rectangle object, as determined by its top-left corner, by the specified amounts.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `dx` | number | Moves the x value of the Rectangle object by this amount. |
| `dy` | number | Moves the y value of the Rectangle object by this amount. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   This Rectangle object.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L55))   ### 
offsetPoint(point) → {[Phaser.Rectangle](phaser.rectangle)}

  Adjusts the location of the Rectangle object using a Point object as a parameter. This method is similar to the Rectangle.offset() method, except that it takes a Point object as a parameter.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `point` | [Phaser.Point](phaser.point) | A Point object to use to offset this Rectangle object. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   This Rectangle object.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 71](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L71))   ### 
random(out) → {[Phaser.Point](phaser.point)}

  Returns a uniformly distributed random point from anywhere within this Rectangle.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `out` | [Phaser.Point](phaser.point) | object |  <optional> | A Phaser.Point, or any object with public x/y properties, that the values will be set in. If no object is provided a new Phaser.Point object will be created. In high performance areas avoid this by re-using an existing object. |

 ##### Returns

   [Phaser.Point](phaser.point) -   An object containing the random point in its `x` and `y` properties.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 367](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L367))   ### 
resize(width, height) → {[Phaser.Rectangle](phaser.rectangle)}

  Resize the Rectangle by providing a new width and height.  
The x and y positions remain unchanged.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | The width of the Rectangle. Should always be either zero or a positive value. |
| `height` | number | The height of the Rectangle. Should always be either zero or a positive value. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   This Rectangle object

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 241](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L241))   ### 
scale(x, y) → {[Phaser.Rectangle](phaser.rectangle)}

  Scales the width and height of this Rectangle by the given amounts.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | The amount to scale the width of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the width, etc. |
| `y` | number |  <optional> | The amount to scale the height of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the height, etc. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   This Rectangle object

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L103))   ### 
setTo(x, y, width, height) → {[Phaser.Rectangle](phaser.rectangle)}

  Sets the members of Rectangle to the specified values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x coordinate of the top-left corner of the Rectangle. |
| `y` | number | The y coordinate of the top-left corner of the Rectangle. |
| `width` | number | The width of the Rectangle. Should always be either zero or a positive value. |
| `height` | number | The height of the Rectangle. Should always be either zero or a positive value. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   This Rectangle object

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L83))   ### 
size(output) → {[Phaser.Point](phaser.point)}

  The size of the Rectangle object, expressed as a Point object with the values of the width and height properties.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `output` | [Phaser.Point](phaser.point) |  <optional> | Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The size of the Rectangle object.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 229](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L229))   ### 
toString() → {string}

  Returns a string representation of this object.

  ##### Returns

   string -   A string representation of the instance.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 439](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L439))   ### 
union(b, out) → {[Phaser.Rectangle](phaser.rectangle)}

  Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `b` | [Phaser.Rectangle](phaser.rectangle) |  | The second Rectangle object. |
| `out` | [Phaser.Rectangle](phaser.rectangle) |  <optional> | Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   A Rectangle object that is the union of the two Rectangles.

    Source code: [geom/Rectangle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js) ([Line 354](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Rectangle.js#L354))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Rectangle.html>

Class: Phaser.Text
==================

 Constructor
-----------

 ### 
new Text(game, x, y, text, style)

  Create a new game object for displaying Text.

 This uses a local hidden Canvas object and renders the type into it. It then makes a texture from this for rendering to the view.  
Because of this you can only display fonts that are currently loaded and available to the browser: fonts must be pre-loaded.

 See [this compatibility table](http://www.jordanm.co.uk/tinytype) for the available default fonts across mobile browsers.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  | Current game instance. |
| `x` | number |  | X position of the new text object. |
| `y` | number |  | Y position of the new text object. |
| `text` | string |  | The actual text that will be written. |
| `style` | object |  <optional> | The style properties to be set on the Text. Properties

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `font` | string |  <optional> |  'bold 20pt Arial'  | The style and size of the font. |
| `fontStyle` | string |  <optional> |  (from font)  | The style of the font (eg. 'italic'): overrides the value in `style.font`. |
| `fontVariant` | string |  <optional> |  (from font)  | The variant of the font (eg. 'small-caps'): overrides the value in `style.font`. |
| `fontWeight` | string |  <optional> |  (from font)  | The weight of the font (eg. 'bold'): overrides the value in `style.font`. |
| `fontSize` | string | number |  <optional> |  (from font)  | The size of the font (eg. 32 or '32px'): overrides the value in `style.font`. |
| `backgroundColor` | string |  <optional> |  null  | A canvas fillstyle that will be used as the background for the whole Text object. Set to `null` to disable. |
| `fill` | string |  <optional> |  'black'  | A canvas fillstyle that will be used on the text eg 'red', '#00FF00'. |
| `align` | string |  <optional> |  'left'  | Horizontal alignment of each line in multiline text. Can be: 'left', 'center' or 'right'. Does not affect single lines of text (see `textBounds` and `boundsAlignH` for that). |
| `boundsAlignH` | string |  <optional> |  'left'  | Horizontal alignment of the text within the `textBounds`. Can be: 'left', 'center' or 'right'. |
| `boundsAlignV` | string |  <optional> |  'top'  | Vertical alignment of the text within the `textBounds`. Can be: 'top', 'middle' or 'bottom'. |
| `stroke` | string |  <optional> |  'black'  | A canvas stroke style that will be used on the text stroke eg 'blue', '#FCFF00'. |
| `strokeThickness` | number |  <optional> |  0  | A number that represents the thickness of the stroke. Default is 0 (no stroke). |
| `wordWrap` | boolean |  <optional> |  false  | Indicates if word wrap should be used. |
| `wordWrapWidth` | number |  <optional> |  100  | The width in pixels at which text will wrap. |
| `maxLines` | number |  <optional> |  0  | The maximum number of lines to be shown for wrapped text. |
| `tabs` | number |  <optional> |  0  | The size (in pixels) of the tabs, for when text includes tab characters. 0 disables. Can be an array of varying tab sizes, one per tab stop. |

 |

  Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L40))   Extends
-------

 * [Phaser.Sprite](phaser.sprite)

 Public Properties
-----------------

  ### 
align : string

  Controls the horizontal alignment for multiline text.  
Can be: 'left', 'center' or 'right'.  
Does not affect single lines of text. For that please see `setTextBounds`.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1870](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1870))   ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
anchor :Point

  The anchor sets the origin point of the texture.  
The default is 0,0 this means the texture's origin is the top left  
Setting than anchor to 0.5,0.5 means the textures origin is centered  
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

   Inherited From * [PIXI.Sprite#anchor](pixi.sprite#anchor)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L17))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
autoRound : boolean

  Should the linePositionX and Y values be automatically rounded before rendering the Text?  
You may wish to enable this if you want to remove the effect of sub-pixel aliasing from text.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L119))   ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

 Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

   Inherited From * [PIXI.Sprite#blendMode](pixi.sprite#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L82))   ### 
body : [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated  
properties and methods via it.

 By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

 To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object  
and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

 You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

 Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5,  
so the physics body is centered on the Game Object.

 If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  ##### Type

 * [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  Inherited From * [Phaser.Component.PhysicsBody#body](phaser.component.physicsbody#body)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L91))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
boundsAlignH : string

  Horizontal alignment of the text within the `textBounds`. Can be: 'left', 'center' or 'right'.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1946](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1946))   ### 
boundsAlignV : string

  Vertical alignment of the text within the `textBounds`. Can be: 'top', 'middle' or 'bottom'.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1969))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
canvas :HTMLCanvasElement

  The canvas element that the text is rendered.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L86))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
checkWorldBounds : boolean

  If this is set to `true` the Game Object checks if it is within the World bounds each frame. 

 When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

 If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

 It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

 When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.InWorld#checkWorldBounds](phaser.component.inworld#checkWorldBounds)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L98))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
colors :array

  An array of the color values as specified by [addColor](phaser.text#addColor).

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 96](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L96))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
context :HTMLCanvasElement

  The context of the canvas element that the text is rendered to.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L91))   ### 
cropRect : [Phaser.Rectangle](phaser.rectangle)

  The Rectangle used to crop the texture this Game Object uses.  
Set this property via `crop`.  
If you modify this property directly you must call `updateCrop` in order to have the change take effect.

   Inherited From * [Phaser.Component.Crop#cropRect](phaser.component.crop#cropRect)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L24))   ### 
cssFont : string

  Change the font used.

 This is equivalent of the `font` property specified to [setStyle](phaser.text#setStyle), except  
that unlike using `setStyle` this will not change any current font fill/color settings.

 The CSS font string can also be individually altered with the `font`, `fontSize`, `fontWeight`, `fontStyle`, and `fontVariant` properties.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1682))   ### 
damage

  Damages the Game Object. This removes the given amount of health from the `health` property.

 If health is taken below or is equal to zero then the `kill` method is called.

   Inherited From * [Phaser.Component.Health#damage](phaser.component.health#damage)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L46))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] deltaX : number

  Returns the delta x value. The difference between world.x now and in the previous frame.

 The value will be positive if the Game Object has moved to the right or negative if to the left.

   Inherited From * [Phaser.Component.Delta#deltaX](phaser.component.delta#deltaX)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L24))   ### 
[readonly] deltaY : number

  Returns the delta y value. The difference between world.y now and in the previous frame.

 The value will be positive if the Game Object has moved down or negative if up.

   Inherited From * [Phaser.Component.Delta#deltaY](phaser.component.delta#deltaY)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L42))   ### 
[readonly] deltaZ : number

  Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

   Inherited From * [Phaser.Component.Delta#deltaZ](phaser.component.delta#deltaZ)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L58))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Sprite is processed by the core Phaser game loops and Group loops.

   Inherited From * [PIXI.Sprite#exists](pixi.sprite#exists)
 Default Value * true
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L103))   ### 
fill : Object

  A canvas fillstyle that will be used on the text eg 'red', '#00FF00'.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1848](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1848))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
font : string

  Change the font family that the text will be rendered in, such as 'Arial'.

 Multiple CSS font families and generic fallbacks can be specified as long as  
[CSS font-family rules](http://www.w3.org/TR/CSS2/fonts.html#propdef-font-family) are followed.

 To change the entire font string use [cssFont](phaser.text#cssFont) instead: eg. `text.cssFont = 'bold 20pt Arial'`.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1708](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1708))   ### 
fontSize : number | string

  The size of the font.

 If the font size is specified in pixels (eg. `32` or `'32px`') then a number (ie. `32`) representing  
the font size in pixels is returned; otherwise the value with CSS unit is returned as a string (eg. `'12pt'`).

  ##### Type

 * number | string

  Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1743](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1743))   ### 
fontStyle : string

  The style of the font: 'normal', 'italic', 'oblique'

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1806](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1806))   ### 
fontStyles :array

  An array of the font styles values as specified by [addFontStyle](phaser.text#addFontStyle).

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L106))   ### 
fontVariant : string

  The variant the font: 'normal', 'small-caps'

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1827](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1827))   ### 
fontWeight : string

  The weight of the font: 'normal', 'bold', or [a valid CSS font weight](http://www.w3.org/TR/CSS2/fonts.html#propdef-font-weight).

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1785](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1785))   ### 
fontWeights :array

  An array of the font weights values as specified by [addFontWeight](phaser.text#addFontWeight).

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 111](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L111))   ### 
frame : integer

  Gets or sets the current frame index of the texture being used to render this Game Object.

 To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,  
for example: `player.frame = 4`.

 If the frame index given doesn't exist it will revert to the first frame found in the texture.

 If you are using a texture atlas then you should use the `frameName` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frame](phaser.component.loadtexture#frame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L254))   ### 
frameName : string

  Gets or sets the current frame name of the texture being used to render this Game Object.

 To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use,  
for example: `player.frameName = "idle"`.

 If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

 If you are using a sprite sheet then you should use the `frame` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frameName](phaser.component.loadtexture#frameName)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L279))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
heal

  Heal the Game Object. This adds the given amount of health to the `health` property.

   Inherited From * [Phaser.Component.Health#heal](phaser.component.health#heal)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L90))   ### 
health : number

  The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

 It can be used in combination with the `damage` method or modified directly.

   Inherited From * [Phaser.Component.Health#health](phaser.component.health#health)
 Default Value * 1
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L26))   ### 
height : number

  The height of the Text. Setting this will modify the scale to achieve the value requested.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2264](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2264))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Inherited From * [Phaser.Component.InputEnabled#input](phaser.component.inputenabled#input)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Inherited From * [Phaser.Component.InputEnabled#inputEnabled](phaser.component.inputenabled#inputEnabled)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   ### 
[readonly] inWorld : boolean

  Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

   Inherited From * [Phaser.Component.InWorld#inWorld](phaser.component.inworld#inWorld)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L129))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
lineSpacing : number

  Additional spacing (in pixels) between each line of text if multi-line.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2080](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2080))   ### 
maxHealth : number

  The Game Objects maximum health value. This works in combination with the `heal` method to ensure  
the health value never exceeds the maximum.

   Inherited From * [Phaser.Component.Health#maxHealth](phaser.component.health#maxHealth)
 Default Value * 100
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L35))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
outOfBoundsKill : boolean

  If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

   Inherited From * [Phaser.Component.InWorld#outOfBoundsKill](phaser.component.inworld#outOfBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L106))   ### 
outOfCameraBoundsKill : boolean

  If this and the `autoCull` property are both set to `true`, then the `kill` method  
is called as soon as the Game Object leaves the camera bounds.

   Inherited From * [Phaser.Component.InWorld#outOfCameraBoundsKill](phaser.component.inworld#outOfCameraBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L115))   ### 
padding : [Phaser.Point](phaser.point)

  Specify a padding value which is added to the line width and height when calculating the Text size.  
ALlows you to add extra spacing if Phaser is unable to accurately determine the true font dimensions.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L73))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L66))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
resolution : integer

  The resolution of the canvas the text is rendered to.  
This defaults to match the resolution of the renderer, but can be changed on a per Text object basis.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1895](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1895))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
scaleMax : [Phaser.Point](phaser.point)

  The maximum scale this Game Object will scale up to. 

 It allows you to prevent a parent from scaling this Game Object higher than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMax](phaser.component.scaleminmax#scaleMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L46))   ### 
scaleMin : [Phaser.Point](phaser.point)

  The minimum scale this Game Object will scale down to.

 It allows you to prevent a parent from scaling this Game Object lower than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMin](phaser.component.scaleminmax#scaleMin)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L36))   ### 
setHealth

  Sets the health property of the Game Object to the given amount.  
Will never exceed the `maxHealth` value.

   Inherited From * [Phaser.Component.Health#setHealth](phaser.component.health#setHealth)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L70))   ### 
shader : [PIXI.AbstractFilter](pixi.abstractfilter)

  The shader that will be used to render this Sprite.  
Set to null to remove a current shader.

   Inherited From * [PIXI.Sprite#shader](pixi.sprite#shader)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L93))   ### 
shadowBlur : number

  The shadowBlur value. Make the shadow softer by applying a Gaussian blur to it. A number from 0 (no blur) up to approx. 10 (depending on scene).

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2173](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2173))   ### 
shadowColor : string

  The color of the shadow, as given in CSS rgba format. Set the alpha component to 0 to disable the shadow.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2151](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2151))   ### 
shadowFill : boolean

  Sets if the drop shadow is applied to the Text fill.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2217))   ### 
shadowOffsetX : number

  The shadowOffsetX value in pixels. This is how far offset horizontally the shadow effect will be.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2107))   ### 
shadowOffsetY : number

  The shadowOffsetY value in pixels. This is how far offset vertically the shadow effect will be.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2129))   ### 
shadowStroke : boolean

  Sets if the drop shadow is applied to the Text stroke.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2195](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2195))   ### 
smoothed : boolean

  Enable or disable texture smoothing for this Game Object.

 It only takes effect if the Game Object is using an image based texture.

 Smoothing is enabled by default.

   Inherited From * [Phaser.Component.Smoothed#smoothed](phaser.component.smoothed#smoothed)
 Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L25))   ### 
stroke : string

  A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00'.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1992](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1992))   ### 
strokeColors :array

  An array of the stroke color values as specified by [addStrokeColor](phaser.text#addStrokeColor).

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 101](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L101))   ### 
strokeThickness : number

  A number that represents the thickness of the stroke. Default is 0 (no stroke)

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2014](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2014))   ### 
tabs : integer | array

  The size (in pixels) of the tabs, for when text includes tab characters. 0 disables.  
Can be an integer or an array of varying tab sizes, one tab per element.  
For example if you set tabs to 100 then when Text encounters a tab it will jump ahead 100 pixels.  
If you set tabs to be `[100,200]` then it will set the first tab at 100px and the second at 200px.

  ##### Type

 * integer | array

  Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1919](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1919))   ### 
text : string

  The text to be displayed by this Text object.  
Use a \n to insert a carriage return and split the text.  
The text will be rendered with any style currently set.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1651](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1651))   ### 
[readonly] textBounds : [Phaser.Rectangle](phaser.rectangle)

  The textBounds property allows you to specify a rectangular region upon which text alignment is based.  
See `Text.setTextBounds` for more details.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 81](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L81))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture that the sprite is using

   Inherited From * [PIXI.Sprite#texture](pixi.sprite#texture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L28))   ### 
tint : number

  The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

   Inherited From * [PIXI.Sprite#tint](pixi.sprite#tint)
 Default Value * 0xFFFFFF
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L54))   ### 
tintedTexture :Canvas

  A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

   Inherited From * [PIXI.Sprite#tintedTexture](pixi.sprite#tintedTexture)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L73))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
transformCallback : Function

  The callback that will apply any scale limiting to the worldTransform.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallback](phaser.component.scaleminmax#transformCallback)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L20))   ### 
transformCallbackContext : Object

  The context under which `transformCallback` is called.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallbackContext](phaser.component.scaleminmax#transformCallbackContext)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L26))   ### 
type : number

  The const type of this object.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L60))   ### 
useAdvancedWrap : boolean

  Will this Text object use Basic or Advanced Word Wrapping?

 Advanced wrapping breaks long words if they are the first of a line, and repeats the process as necessary.  
White space is condensed (e.g., consecutive spaces are replaced with one).  
Lines are trimmed of white space before processing.

 It throws an error if wordWrapWidth is less than a single character.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L132))   ### 
width : number

  The width of the Text. Setting this will modify the scale to achieve the value requested.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2239](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2239))   ### 
wordWrap : boolean

  Indicates if word wrap should be used.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2036](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2036))   ### 
wordWrapWidth : number

  The width at which text will wrap.

   Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 2058](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L2058))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
x : number

  The position of the Game Object on the x axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#x](phaser.component.physicsbody#x)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L98))   ### 
y : number

  The position of the Game Object on the y axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#y](phaser.component.physicsbody#y)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L124))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
addColor(color, position) → {[Phaser.Text](phaser.text)}

  Set specific colors for certain characters within the Text.

 It works by taking a color value, which is a typical HTML string such as `#ff0000` or `rgb(255,0,0)` and a position.  
The position value is the index of the character in the Text string to start applying this color to.  
Once set the color remains in use until either another color or the end of the string is encountered.  
For example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow.

 If you wish to change the stroke color see addStrokeColor instead.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | string | A canvas fillstyle that will be used on the text eg `red`, `#00FF00`, `rgba()`. |
| `position` | number | The index of the character in the string to start applying this color value from. |

 ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 829](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L829))   ### 
addFontStyle(style, position) → {[Phaser.Text](phaser.text)}

  Set specific font styles for certain characters within the Text.

 It works by taking a font style value, which is a typical string such as `normal`, `italic` or `oblique`.  
The position value is the index of the character in the Text string to start applying this font style to.  
Once set the font style remains in use until either another font style or the end of the string is encountered.  
For example if the Text was `Photon Storm` and you did `Text.addFontStyle('italic', 6)` it would font style in the word `Storm` in italic.

 If you wish to change the text font weight see addFontWeight instead.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `style` | string | A canvas font-style that will be used on the text style eg `normal`, `italic`, `oblique`. |
| `position` | number | The index of the character in the string to start applying this font style value from. |

 ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 879](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L879))   ### 
addFontWeight(style, position) → {[Phaser.Text](phaser.text)}

  Set specific font weights for certain characters within the Text.

 It works by taking a font weight value, which is a typical string such as `normal`, `bold`, `bolder`, etc.  
The position value is the index of the character in the Text string to start applying this font weight to.  
Once set the font weight remains in use until either another font weight or the end of the string is encountered.  
For example if the Text was `Photon Storm` and you did `Text.addFontWeight('bold', 6)` it would font weight in the word `Storm` in bold.

 If you wish to change the text font style see addFontStyle instead.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `style` | string | A canvas font-weight that will be used on the text weight eg `normal`, `bold`, `bolder`, `lighter`, etc. |
| `position` | number | The index of the character in the string to start applying this font weight value from. |

 ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 903](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L903))   ### 
addStrokeColor(color, position) → {[Phaser.Text](phaser.text)}

  Set specific stroke colors for certain characters within the Text.

 It works by taking a color value, which is a typical HTML string such as `#ff0000` or `rgb(255,0,0)` and a position.  
The position value is the index of the character in the Text string to start applying this color to.  
Once set the color remains in use until either another color or the end of the string is encountered.  
For example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow.

 This has no effect if stroke is disabled or has a thickness of 0.

 If you wish to change the text fill color see addColor instead.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | string | A canvas fillstyle that will be used on the text stroke eg `red`, `#00FF00`, `rgba()`. |
| `position` | number | The index of the character in the string to start applying this color value from. |

 ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 853](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L853))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#bringToTop](phaser.component.bringtotop#bringToTop)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
clearColors() → {[Phaser.Text](phaser.text)}

  Clears any text fill or stroke colors that were set by `addColor` or `addStrokeColor`.

  ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 797](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L797))   ### 
clearFontValues() → {[Phaser.Text](phaser.text)}

  Clears any text styles or weights font that were set by `addFontStyle` or `addFontWeight`.

  ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 813](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L813))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
crop(rect, copy)

  Crop allows you to crop the texture being used to display this Game Object.  
Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

 Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,  
or by modifying `cropRect` property directly and then calling `updateCrop`.

 The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object  
so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

 A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`,  
in which case the values are duplicated to a local object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) |  |  | The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. |
| `copy` | boolean |  <optional> |  false  | If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect. |

  Inherited From * [Phaser.Component.Crop#crop](phaser.component.crop#crop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L49))   ### 
destroy(destroyChildren)

  Destroy this Text object, removing it from the group it belongs to.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called? |

  Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L217))   ### 
getBounds(matrix) → {[Phaser.Rectangle](phaser.rectangle)}

  Returns the bounds of the Text as a rectangle.  
The bounds calculation takes the worldTransform into account.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | [Phaser.Matrix](phaser.matrix) | The transformation matrix of the Text. |

 ##### Returns

   [Phaser.Rectangle](phaser.rectangle) -   The framing rectangle

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1631](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1631))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.Sprite#getLocalBounds](pixi.sprite#getLocalBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L315))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
loadTexture(key, frame, stopAnimation)

  Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

 If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

 You should only use `loadTexture` if you want to replace the base texture entirely.

 Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

 You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite.  
Doing this then sets the key to be the `frame` argument (the frame is set to zero). 

 This allows you to create sprites using `load.image` during development, and then change them  
to use a Texture Atlas later in development by simply searching your code for 'PENDING\_ATLAS'  
and swapping it to be the key of the atlas data.

 Note: You cannot use a RenderTexture as a texture for a TileSprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `stopAnimation` | boolean |  <optional> |  true  | If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. |

  Inherited From * [Phaser.Component.LoadTexture#loadTexture](phaser.component.loadtexture#loadTexture)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L51))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveDown](phaser.component.bringtotop#moveDown)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveUp](phaser.component.bringtotop#moveUp)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
overlap(displayObject) → {boolean}

  Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,  
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

 This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

 Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.  
It should be fine for low-volume testing where physics isn't required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Button](phaser.button) | PIXI.DisplayObject | The display object to check against. |

 ##### Returns

   boolean -   True if the bounds of this Game Object intersects at any point with the bounds of the given display object.

    Inherited From * [Phaser.Component.Overlap#overlap](phaser.component.overlap#overlap)
 Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L29))   ### 
parseList(list) → {[Phaser.Text](phaser.text)}

  Converts the given array into a tab delimited string and then updates this Text object.  
This is mostly used when you want to display external data using tab stops.

 The array can be either single or multi dimensional depending on the result you need:

 `[ 'a', 'b', 'c' ]` would convert in to `"a\tb\tc"`.

 Where as:

 `[
 [ 'a', 'b', 'c' ],
 [ 'd', 'e', 'f']
]`

 would convert in to: `"a\tb\tc\nd\te\tf"`

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `list` | array | The array of data to convert into a string. |

 ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1286](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1286))   ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays an Animation.

 The animation should have previously been created via `animations.add`.

 If the animation is already playing calling this again won't do anything.  
If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'. |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation.

    Inherited From * [Phaser.Component.Animation#play](phaser.component.animation#play)
 Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L31))   ### 
<internal> postUpdate()

  Internal method called by the World postUpdate cycle.

   Inherited From * [Phaser.Component.Core#postUpdate](phaser.component.core#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L338))   ### 
precalculateWordWrap(text) → {array}

  Runs the given text through the Text.runWordWrap function and returns  
the results as an array, where each element of the array corresponds to a wrapped  
line of text.

 Useful if you wish to control pagination on long pieces of content.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `text` | string | The text for which the wrapping will be calculated. |

 ##### Returns

   array -   An array of strings with the pieces of wrapped text.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 927](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L927))   ### 
<internal> preUpdate()

  Automatically called by World.preUpdate.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 190](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L190))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
reset(x, y, health) → {PIXI.DisplayObject}

  Resets the Game Object.

 This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`,  
`visible` and `renderable` to true.

 If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

 If this Game Object has a Physics Body it will reset the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Game Object at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Game Object at. |
| `health` | number |  <optional> |  1  | The health to give the Game Object if it has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.Reset#reset](phaser.component.reset#reset)
 Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L30))   ### 
resetFrame()

  Resets the texture frame dimensions that the Game Object uses for rendering.

   Inherited From * [Phaser.Component.LoadTexture#resetFrame](phaser.component.loadtexture#resetFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L232))   ### 
resizeFrame(parent, width, height)

  Resizes the Frame dimensions that the Game Object uses for rendering.

 You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData  
it can be useful to adjust the dimensions directly in this way.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | object | The parent texture object that caused the resize, i.e. a Phaser.Video object. |
| `width` | integer | The new width of the texture. |
| `height` | integer | The new height of the texture. |

  Inherited From * [Phaser.Component.LoadTexture#resizeFrame](phaser.component.loadtexture#resizeFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L220))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#sendToBack](phaser.component.bringtotop#sendToBack)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setFrame(frame)

  Sets the texture frame the Game Object uses for rendering.

 This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The Frame to be used by the texture. |

  Inherited From * [Phaser.Component.LoadTexture#setFrame](phaser.component.loadtexture#setFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L155))   ### 
setScaleMinMax(minX, minY, maxX, maxY)

  Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

 For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored  
and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

 By setting these values you can carefully control how Game Objects deal with responsive scaling.

 If only one parameter is given then that value will be used for both scaleMin and scaleMax:  
`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

 If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:  
`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

 If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly,  
or pass `null` for the `maxX` and `maxY` parameters.

 Call `setScaleMinMax(null)` to clear all previously set values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `minX` | number | null | The minimum horizontal scale value this Game Object can scale down to. |
| `minY` | number | null | The minimum vertical scale value this Game Object can scale down to. |
| `maxX` | number | null | The maximum horizontal scale value this Game Object can scale up to. |
| `maxY` | number | null | The maximum vertical scale value this Game Object can scale up to. |

  Inherited From * [Phaser.Component.ScaleMinMax#setScaleMinMax](phaser.component.scaleminmax#setScaleMinMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L110))   ### 
setShadow(x, y, color, blur, shadowStroke, shadowFill) → {[Phaser.Text](phaser.text)}

  Sets a drop shadow effect on the Text. You can specify the horizontal and vertical distance of the drop shadow with the `x` and `y` parameters.  
The color controls the shade of the shadow (default is black) and can be either an `rgba` or `hex` value.  
The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow.  
To remove a shadow already in place you can call this method with no parameters set.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The shadowOffsetX value in pixels. This is how far offset horizontally the shadow effect will be. |
| `y` | number |  <optional> |  0  | The shadowOffsetY value in pixels. This is how far offset vertically the shadow effect will be. |
| `color` | string |  <optional> |  'rgba(0,0,0,1)'  | The color of the shadow, as given in CSS rgba or hex format. Set the alpha component to 0 to disable the shadow. |
| `blur` | number |  <optional> |  0  | The shadowBlur value. Make the shadow softer by applying a Gaussian blur to it. A number from 0 (no blur) up to approx. 10 (depending on scene). |
| `shadowStroke` | boolean |  <optional> |  true  | Apply the drop shadow to the Text stroke (if set). |
| `shadowFill` | boolean |  <optional> |  true  | Apply the drop shadow to the Text fill (if set). |

 ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 231](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L231))   ### 
setStyle(style, update) → {[Phaser.Text](phaser.text)}

  Set the style of the text by passing a single style object to it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `style` | object |  <optional> |  | The style properties to be set on the Text. Properties

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `font` | string |  <optional> |  'bold 20pt Arial'  | The style and size of the font. |
| `fontStyle` | string |  <optional> |  (from font)  | The style of the font (eg. 'italic'): overrides the value in `style.font`. |
| `fontVariant` | string |  <optional> |  (from font)  | The variant of the font (eg. 'small-caps'): overrides the value in `style.font`. |
| `fontWeight` | string |  <optional> |  (from font)  | The weight of the font (eg. 'bold'): overrides the value in `style.font`. |
| `fontSize` | string | number |  <optional> |  (from font)  | The size of the font (eg. 32 or '32px'): overrides the value in `style.font`. |
| `backgroundColor` | string |  <optional> |  null  | A canvas fillstyle that will be used as the background for the whole Text object. Set to `null` to disable. |
| `fill` | string |  <optional> |  'black'  | A canvas fillstyle that will be used on the text eg 'red', '#00FF00'. |
| `align` | string |  <optional> |  'left'  | Horizontal alignment of each line in multiline text. Can be: 'left', 'center' or 'right'. Does not affect single lines of text (see `textBounds` and `boundsAlignH` for that). |
| `boundsAlignH` | string |  <optional> |  'left'  | Horizontal alignment of the text within the `textBounds`. Can be: 'left', 'center' or 'right'. |
| `boundsAlignV` | string |  <optional> |  'top'  | Vertical alignment of the text within the `textBounds`. Can be: 'top', 'middle' or 'bottom'. |
| `stroke` | string |  <optional> |  'black'  | A canvas stroke style that will be used on the text stroke eg 'blue', '#FCFF00'. |
| `strokeThickness` | number |  <optional> |  0  | A number that represents the thickness of the stroke. Default is 0 (no stroke). |
| `wordWrap` | boolean |  <optional> |  false  | Indicates if word wrap should be used. |
| `wordWrapWidth` | number |  <optional> |  100  | The width in pixels at which text will wrap. |
| `maxLines` | number |  <optional> |  0  | The maximum number of lines to be shown for wrapped text. |
| `tabs` | number | array |  <optional> |  0  | The size (in pixels) of the tabs, for when text includes tab characters. 0 disables. Can be an array of varying tab sizes, one per tab stop. |

 |
| `update` | boolean |  <optional> |  false  | Immediately update the Text object after setting the new style? Or wait for the next frame. |

 ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 267](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L267))   ### 
setText(text, immediate) → {[Phaser.Text](phaser.text)}

  The text to be displayed by this Text object.  
Use a \n to insert a carriage return and split the text.  
The text will be rendered with any style currently set.

 Use the optional `immediate` argument if you need the Text display to update immediately.

 If not it will re-create the texture of this Text object during the next time the render  
loop is called.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `text` | string |  <optional> |  | The text to be displayed. Set to an empty string to clear text that is already present. |
| `immediate` | boolean |  <optional> |  false  | Update the texture used by this Text object immediately (true) or automatically during the next render loop (false). |

 ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1252](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1252))   ### 
setTextBounds(x, y, width, height) → {[Phaser.Text](phaser.text)}

  The Text Bounds is a rectangular region that you control the dimensions of into which the Text object itself is positioned,  
regardless of the number of lines in the text, the font size or any other attribute.

 Alignment is controlled via the properties `boundsAlignH` and `boundsAlignV` within the Text.style object, or can be directly  
set through the setters `Text.boundsAlignH` and `Text.boundsAlignV`. Bounds alignment is independent of text alignment.

 For example: If your game is 800x600 in size and you set the text bounds to be 0,0,800,600 then by setting boundsAlignH to  
'center' and boundsAlignV to 'bottom' the text will render in the center and at the bottom of your game window, regardless of  
how many lines of text there may be. Even if you adjust the text content or change the style it will remain at the bottom center  
of the text bounds.

 This is especially powerful when you need to align text against specific coordinates in your game, but the actual text dimensions  
may vary based on font (say for multi-lingual games).

 If `Text.wordWrapWidth` is greater than the width of the text bounds it is clamped to match the bounds width.

 Call this method with no arguments given to reset an existing textBounds.

 It works by calculating the final position based on the Text.canvas size, which is modified as the text is updated. Some fonts  
have additional padding around them which you can mitigate by tweaking the Text.padding property. It then adjusts the `pivot`  
property based on the given bounds and canvas size. This means if you need to set the pivot property directly in your game then  
you either cannot use `setTextBounds` or you must place the Text object inside another DisplayObject on which you set the pivot.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  <optional> | The x coordinate of the Text Bounds region. |
| `y` | number |  <optional> | The y coordinate of the Text Bounds region. |
| `width` | number |  <optional> | The width of the Text Bounds region. |
| `height` | number |  <optional> | The height of the Text Bounds region. |

 ##### Returns

   [Phaser.Text](phaser.text) -   This Text instance.

    Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 1347](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L1347))   ### 
setTexture(texture, destroy)

  Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous  
texture this Sprite was using.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) |  |  | The PIXI texture that is displayed by the sprite |
| `destroy` | Boolean |  <optional> |  false  | Call Texture.destroy on the current texture before replacing it with the new one? |

  Inherited From * [PIXI.Sprite#setTexture](pixi.sprite#setTexture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L163))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
<internal> update()

  Override this function to handle any special update requirements.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 207](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L207))   ### 
updateCrop()

  If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,  
or the rectangle it references, then you need to update the crop frame by calling this method.

   Inherited From * [Phaser.Component.Crop#updateCrop](phaser.component.crop#updateCrop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L86))   ### 
updateShadow(state)

  Sets the Shadow on the Text.context based on the Style settings, or disables it if not enabled.  
This is called automatically by Text.updateText.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `state` | boolean | If true the shadow will be set to the Style values, otherwise it will be set to zero. |

  Source code: [gameobjects/Text.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js) ([Line 652](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Text.js#L652))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Text.html>

Class: Phaser.Physics
=====================

 Constructor
-----------

 ### 
new Physics(game, physicsConfig)

  The Physics Manager is responsible for looking after all of the running physics systems.  
Phaser supports 4 physics systems: Arcade Physics, P2, Ninja Physics and Box2D via a commercial plugin.

 Game Objects (such as Sprites) can only belong to 1 physics system, but you can have multiple systems active in a single game.

 For example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use the  
faster (due to being much simpler) Arcade Physics system.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `physicsConfig` | object |  <optional> |  null  | A physics configuration object to pass to the Physics world on creation. |

  Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L21))   Classes
-------

   [Arcade](phaser.physics.arcade)   [Ninja](phaser.physics.ninja)   [P2](phaser.physics.p2)   Public Properties
-----------------

  ### 
[static] ARCADE : number

  Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L73))   ### 
[static] BOX2D : number

  Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L91))   ### 
[static] CHIPMUNK : number

  Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 97](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L97))   ### 
[static] MATTERJS : number

  Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L103))   ### 
[static] NINJA : number

  Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L85))   ### 
[static] P2JS : number

  Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L79))   ### 
arcade : [Phaser.Physics.Arcade](phaser.physics.arcade)

  The Arcade Physics system.

   Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L38))   ### 
box2d :Phaser.Physics.Box2D

  The Box2D Physics system.

   Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L53))   ### 
chipmunk :Phaser.Physics.Chipmunk

  The Chipmunk Physics system (to be done).

   Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L58))   ### 
config : Object

  The physics configuration object as passed to the game on creation.

   Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L33))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L28))   ### 
matter :Phaser.Physics.Matter

  The MatterJS Physics system (coming soon).

   Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L63))   ### 
ninja : [Phaser.Physics.Ninja](phaser.physics.ninja)

  The N+ Ninja Physics system.

   Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L48))   ### 
p2 : [Phaser.Physics.P2](phaser.physics.p2)

  The P2.JS Physics system.

   Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L43))    Public Methods
--------------

  ### 
<internal> clear()

  Clears down all active physics systems. This doesn't destroy them, it just clears them of objects and is called when the State changes.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 349](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L349))   ### 
destroy()

  Destroys all active physics systems. Usually only called on a Game Shutdown, not on a State swap.

   Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 399](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L399))   ### 
enable(object, system, debug)

  This will create a default physics body on the given game object or array of objects.  
A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.  
It can be for any of the physics systems that have been started:

 Phaser.Physics.Arcade - A light weight AABB based collision system with basic separation.  
Phaser.Physics.P2JS - A full-body advanced physics system supporting multiple object shapes, polygon loading, contact materials, springs and constraints.  
Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system. Advanced AABB and Circle vs. Tile collision.  
Phaser.Physics.BOX2D - A port of https://code.google.com/p/box2d-html5  
Phaser.Physics.MATTER - A full-body and light-weight advanced physics system (still in development)  
Phaser.Physics.CHIPMUNK is still in development.

 If you require more control over what type of body is created, for example to create a Ninja Physics Circle instead of the default AABB, then see the  
individual physics systems `enable` methods instead of using this generic one.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object` | object | array |  |  | The game object to create the physics body on. Can also be an array of objects, a body will be created on every object in the array. |
| `system` | number |  <optional> |  Phaser.Physics.ARCADE  | The physics system that will be used to create the body. Defaults to Arcade Physics. |
| `debug` | boolean |  <optional> |  false  | Enable the debug drawing for this body. Defaults to false. |

  Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L208))   ### 
parseConfig()

  Parses the Physics Configuration object passed to the Game constructor and starts any physics systems specified within.

   Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L107))   ### 
<internal> preUpdate()

  preUpdate checks.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 260](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L260))   ### 
<internal> reset()

  Resets the active physics system. Called automatically on a Phaser.State swap.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 374](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L374))   ### 
setBoundsToWorld(left, right, top, bottom, setCollisionGroup)

  Sets the bounds of the Physics world to match the Game.World dimensions.  
You can optionally set which 'walls' to create: left, right, top or bottom.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `left` | boolean |  <optional> |  true  | If true will create the left bounds wall. |
| `right` | boolean |  <optional> |  true  | If true will create the right bounds wall. |
| `top` | boolean |  <optional> |  true  | If true will create the top bounds wall. |
| `bottom` | boolean |  <optional> |  true  | If true will create the bottom bounds wall. |
| `setCollisionGroup` | boolean |  <optional> |  true  | If true the Bounds will be set to use its own Collision Group. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 552](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L552))   ### 
<internal> setBoundsToWorld()

  Updates the physics bounds to match the world dimensions.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 314](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L314))   ### 
setWorldMaterial(material, left, right, top, bottom)

  Sets the given material against the 4 bounds of this World.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `material` | [Phaser.Physics.P2.Material](phaser.physics.p2.material) |  |  | The material to set. |
| `left` | boolean |  <optional> |  true  | If true will set the material on the left bounds wall. |
| `right` | boolean |  <optional> |  true  | If true will set the material on the right bounds wall. |
| `top` | boolean |  <optional> |  true  | If true will set the material on the top bounds wall. |
| `bottom` | boolean |  <optional> |  true  | If true will set the material on the bottom bounds wall. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 569](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L569))   ### 
startSystem(system)

  This will create an instance of the requested physics simulation.  
Phaser.Physics.Arcade is running by default, but all others need activating directly.

 You can start the following physics systems:

 Phaser.Physics.P2JS - A full-body advanced physics system by Stefan Hedman.  
Phaser.Physics.NINJA - A port of Metanet Softwares N+ physics system.  
Phaser.Physics.BOX2D - A commercial Phaser Plugin (see http://phaser.io)

 Both Ninja Physics and Box2D require their respective plugins to be loaded before you can start them.  
They are not bundled into the core Phaser library.

 If the physics world has already been created (i.e. in another state in your game) then  
calling startSystem will reset the physics world, not re-create it. If you need to start them again from their constructors  
then set Phaser.Physics.p2 (or whichever system you want to recreate) to `null` before calling `startSystem`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `system` | number | The physics system to start: Phaser.Physics.ARCADE, Phaser.Physics.P2JS, Phaser.Physics.NINJA or Phaser.Physics.BOX2D. |

  Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L142))   ### 
<internal> update()

  Updates all running physics systems.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/Physics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js) ([Line 287](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/Physics.js#L287))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.html>

Class: Phaser.Physics.Ninja.Body
================================

 Constructor
-----------

 ### 
new Body(system, sprite, type, id, radius, x, y, width, height)

  The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than  
the Sprite itself. For example you can set the velocity, bounce values etc all on the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `system` | [Phaser.Physics.Ninja](phaser.physics.ninja) |  |  | The physics system this Body belongs to. |
| `sprite` | [Phaser.Sprite](phaser.sprite) |  |  | The Sprite object this physics body belongs to. |
| `type` | number |  <optional> |  1  | The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. |
| `id` | number |  <optional> |  1  | 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. |
| `radius` | number |  <optional> |  16  | If this body is using a Circle shape this controls the radius. |
| `x` | number |  <optional> |  0  | The x coordinate of this Body. This is only used if a sprite is not provided. |
| `y` | number |  <optional> |  0  | The y coordinate of this Body. This is only used if a sprite is not provided. |
| `width` | number |  <optional> |  0  | The width of this Body. This is only used if a sprite is not provided. |
| `height` | number |  <optional> |  0  | The height of this Body. This is only used if a sprite is not provided. |

  Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L23))   Public Properties
-----------------

  ### 
aabb : [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb)

  The AABB object this body is using for collision.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L54))   ### 
[readonly] angle : number

  The angle of this Body

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 535](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L535))   ### 
[readonly] bottom : number

  The bottom value of this Body (same as Body.y + Body.height)

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 496](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L496))   ### 
bounce : number

  The bounciness of this object when it collides. A value between 0 and 1. We recommend setting it to 0.999 to avoid jittering.

   Default Value * 0.3
 Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L95))   ### 
checkCollision : Object

  Set the checkCollision properties to control which directions collision is processed for this Body.  
For example checkCollision.up = false means it won't collide when the collision happened while moving up. An object containing allowed collision.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L125))   ### 
circle : [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle)

  The Circle object this body is using for collision.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L64))   ### 
collideWorldBounds : boolean

  A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. Should the Body collide with the World bounds?

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 118](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L118))   ### 
drag : number

  The drag applied to this object as it moves.

   Default Value * 1
 Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L77))   ### 
facing : number

  A const reference to the direction the Body is traveling or facing.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L106))   ### 
friction : number

  The friction applied to this object as it moves.

   Default Value * 0.05
 Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L83))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L39))   ### 
gravityScale : number

  How much of the world gravity should be applied to this object? 1 = all of it, 0.5 = 50%, etc.

   Default Value * 1
 Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L89))   ### 
[readonly] height : number

  The height of this Body

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 483](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L483))   ### 
immovable : boolean

  An immovable Body will not receive any impacts from other bodies. Not fully implemented.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L112))   ### 
maxSpeed : number

  The maximum speed this body can travel at (taking drag and friction into account)

   Default Value * 8
 Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L144))   ### 
[readonly] right : number

  The right value of this Body (same as Body.x + Body.width)

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 509](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L509))   ### 
shape : Object

  A local reference to the body shape.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L69))   ### 
[readonly] speed : number

  The speed of this Body

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 522](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L522))   ### 
sprite : [Phaser.Sprite](phaser.sprite)

  Reference to the parent Sprite.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L34))   ### 
system : [Phaser.Physics.Ninja](phaser.physics.ninja)

  The parent physics system.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L49))   ### 
tile : [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile)

  The Tile object this body is using for collision.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L59))   ### 
touching : Object

  This object is populated with boolean values when the Body collides with another.  
touching.up = true means the collision happened to the top of this Body for example. An object containing touching results.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L132))   ### 
type : number

  The type of physics system this body belongs to.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L44))   ### 
velocity : [Phaser.Point](phaser.point)

  The velocity in pixels per second sq. of the Body.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L100))   ### 
wasTouching : Object

  This object is populated with previous touching values from the bodies previous collision. An object containing previous touching results.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L138))   ### 
[readonly] width : number

  The width of this Body

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 470](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L470))   ### 
x : number

  The x position.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 438](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L438))   ### 
y : number

  The y position.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 454](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L454))    Public Methods
--------------

  ### 
deltaAbsX() → {number}

  Returns the absolute delta x value.

  ##### Returns

   number -   The absolute delta value.

    Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 381](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L381))   ### 
deltaAbsY() → {number}

  Returns the absolute delta y value.

  ##### Returns

   number -   The absolute delta value.

    Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 391](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L391))   ### 
deltaX() → {number}

  Returns the delta x value. The difference between Body.x now and in the previous step.

  ##### Returns

   number -   The delta value. Positive if the motion was to the right, negative if to the left.

    Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 401](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L401))   ### 
deltaY() → {number}

  Returns the delta y value. The difference between Body.y now and in the previous step.

  ##### Returns

   number -   The delta value. Positive if the motion was downwards, negative if upwards.

    Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 411](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L411))   ### 
destroy()

  Destroys this body's reference to the sprite and system, and destroys its shape.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 421](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L421))   ### 
<internal> postUpdate()

  Internal method.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 214](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L214))   ### 
<internal> preUpdate()

  Internal method.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 184](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L184))   ### 
render(context, body, color, filled)

  Render Sprite's Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `context` | object |  |  | The context to render to. |
| `body` | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) |  |  | The Body to render. |
| `color` | string |  <optional> |  'rgba(0,255,0,0.4)'  | color of the debug shape to be rendered. (format is css color string). |
| `filled` | boolean |  <optional> |  true  | Render the shape as a filled (default, true) or a stroked (false) |

  Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 548](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L548))   ### 
reset()

  Resets all Body values and repositions on the Sprite.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 365](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L365))   ### 
setZeroVelocity()

  Stops all movement of this body.

   Source code: [physics/ninja/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js) ([Line 257](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Body.js#L257))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.Ninja.Body.html>

Class: Phaser.Physics.Ninja
===========================

 Constructor
-----------

 ### 
new Ninja(game)

  Ninja Physics. The Ninja Physics system was created in Flash by Metanet Software and ported to JavaScript by Richard Davey.

 It allows for AABB and Circle to Tile collision. Tiles can be any of 34 different types, including slopes, convex and concave shapes.

 It does what it does very well, but is ripe for expansion and optimisation. Here are some features that I'd love to see the community add:

 * AABB to AABB collision
* AABB to Circle collision
* AABB and Circle 'immovable' property support
* n-way collision, so an AABB/Circle could pass through a tile from below and land upon it.
* QuadTree or spatial grid for faster Body vs. Tile Group look-ups.
* Optimise the internal vector math and reduce the quantity of temporary vars created.
* Expand Gravity and Bounce to allow for separate x/y axis values.
* Support Bodies linked to Sprites that don't have anchor set to 0.5

 Feel free to attempt any of the above and submit a Pull Request with your code! Be sure to include test cases proving they work.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | reference to the current game instance. |

  Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L29))   Classes
-------

   [AABB](phaser.physics.ninja.aabb)   [Body](phaser.physics.ninja.body)   [Circle](phaser.physics.ninja.circle)   [Tile](phaser.physics.ninja.tile)   Public Properties
-----------------

  ### 
bounds : [Phaser.Rectangle](phaser.rectangle)

  The bounds inside of which the physics world exists. Defaults to match the world bounds.

   Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L49))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L34))   ### 
gravity : number

  The World gravity setting.

   Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L44))   ### 
maxLevels : number

  Used by the QuadTree to set the maximum number of iteration levels.

   Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L59))   ### 
maxObjects : number

  Used by the QuadTree to set the maximum number of objects per quad.

   Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L54))   ### 
quadTree : [Phaser.QuadTree](phaser.quadtree)

  The world QuadTree.

   Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L64))   ### 
time : [Phaser.Time](phaser.time)

  Local reference to game.time.

   Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L39))    Public Methods
--------------

  ### 
clearTilemapLayerBodies(map, layer)

  Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `map` | [Phaser.Tilemap](phaser.tilemap) |  | The Tilemap to get the map data from. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to operate on. If not given will default to map.currentLayer. |

  Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 224](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L224))   ### 
collide(object1, object2, collideCallback, processCallback, callbackContext) → {boolean}

  Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions.  
The second parameter can be an array of objects, of differing types.  
The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead.  
An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place,  
giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped.  
The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object1` | [Phaser.Sprite](phaser.sprite) | [Phaser.Group](phaser.group) | Phaser.Particles.Emitter | [Phaser.TilemapLayer](phaser.tilemaplayer) |  |  | The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.TilemapLayer. |
| `object2` | [Phaser.Sprite](phaser.sprite) | [Phaser.Group](phaser.group) | Phaser.Particles.Emitter | [Phaser.TilemapLayer](phaser.tilemaplayer) | array |  |  | The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.TilemapLayer. |
| `collideCallback` | function |  <optional> |  null  | An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them. |
| `processCallback` | function |  <optional> |  null  | A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them. |
| `callbackContext` | object |  <optional> |  | The context in which to run the callbacks. |

 ##### Returns

   boolean -   True if a collision occured otherwise false.

    Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 330](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L330))   ### 
convertTilemap(map, layer, slopeMap) → {array}

  Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics tiles.  
Only call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc.  
Every time you call this method it will destroy any previously created bodies and remove them from the world.  
Therefore understand it's a very expensive operation and not to be done in a core game update loop.

 In Ninja the Tiles have an ID from 0 to 33, where 0 is 'empty', 1 is a full tile, 2 is a 45-degree slope, etc. You can find the ID  
list either at the very bottom of `Tile.js`, or in a handy visual reference in the `resources/Ninja Physics Debug Tiles` folder in the repository.  
The slopeMap parameter is an array that controls how the indexes of the tiles in your tilemap data will map to the Ninja Tile IDs.  
For example if you had 6 tiles in your tileset: Imagine the first 4 should be converted into fully solid Tiles and the other 2 are 45-degree slopes.  
Your slopeMap array would look like this: `[ 1, 1, 1, 1, 2, 3 ]`.  
Where each element of the array is a tile in your tilemap and the resulting Ninja Tile it should create.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `map` | [Phaser.Tilemap](phaser.tilemap) | The Tilemap to get the map data from. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) | The layer to operate on. If not given will default to map.currentLayer. |
| `slopeMap` | object | The tilemap index to Tile ID map. |

 ##### Returns

   array -   An array of the Phaser.Physics.Ninja.Tile objects that were created.

    Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L246))   ### 
enable(object, type, id, radius, children)

  This will create a Ninja Physics body on the given game object or array of game objects.  
A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object` | object | array | [Phaser.Group](phaser.group) |  |  | The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. |
| `type` | number |  <optional> |  1  | The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. |
| `id` | number |  <optional> |  1  | 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. |
| `radius` | number |  <optional> |  0  | If this body is using a Circle shape this controls the radius. |
| `children` | boolean |  <optional> |  true  | Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. |

  Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 121](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L121))   ### 
enableAABB(object, children)

  This will create a Ninja Physics AABB body on the given game object. Its dimensions will match the width and height of the object at the point it is created.  
A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object` | object | array | [Phaser.Group](phaser.group) |  |  | The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. |
| `children` | boolean |  <optional> |  true  | Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. |

  Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L75))   ### 
enableBody(object)

  Creates a Ninja Physics body on the given game object.  
A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | object | The game object to create the physics body on. A body will only be created if this object has a null `body` property. |

  Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 181](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L181))   ### 
enableCircle(object, radius, children)

  This will create a Ninja Physics Circle body on the given game object.  
A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object` | object | array | [Phaser.Group](phaser.group) |  |  | The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. |
| `radius` | number |  |  | The radius of the Circle. |
| `children` | boolean |  <optional> |  true  | Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. |

  Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L89))   ### 
enableTile(object, id, children)

  This will create a Ninja Physics Tile body on the given game object. There are 34 different types of tile you can create, including 45 degree slopes,  
convex and concave circles and more. The id parameter controls which Tile type is created, but you can also change it at run-time.  
Note that for all degree based tile types they need to have an equal width and height. If the given object doesn't have equal width and height it will use the width.  
A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object` | object | array | [Phaser.Group](phaser.group) |  |  | The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. |
| `id` | number |  <optional> |  1  | The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE\_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. |
| `children` | boolean |  <optional> |  true  | Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. |

  Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L104))   ### 
overlap(object1, object2, overlapCallback, processCallback, callbackContext) → {boolean}

  Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters.  
You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks.  
Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results.  
The second parameter can be an array of objects, of differing types.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object1` | [Phaser.Sprite](phaser.sprite) | [Phaser.Group](phaser.group) | Phaser.Particles.Emitter |  |  | The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. |
| `object2` | [Phaser.Sprite](phaser.sprite) | [Phaser.Group](phaser.group) | Phaser.Particles.Emitter | array |  |  | The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. |
| `overlapCallback` | function |  <optional> |  null  | An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them. |
| `processCallback` | function |  <optional> |  null  | A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then overlapCallback will only be called if processCallback returns true. |
| `callbackContext` | object |  <optional> |  | The context in which to run the callbacks. |

 ##### Returns

   boolean -   True if an overlap occured otherwise false.

    Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 291](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L291))   ### 
separate(body1, body2) → {boolean}

  The core separation function to separate two physics bodies.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `body1` | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | The Body object to separate. |
| `body2` | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | The Body object to separate. |

 ##### Returns

   boolean -   Returns true if the bodies collided, otherwise false.

    Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 567](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L567))   ### 
setBounds(x, y, width, height)

  Updates the size of this physics world.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Top left most corner of the world. |
| `y` | number | Top left most corner of the world. |
| `width` | number | New width of the world. Can never be smaller than the Game.width. |
| `height` | number | New height of the world. Can never be smaller than the Game.height. |

  Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L198))   ### 
setBoundsToWorld()

  Updates the size of this physics world to match the size of the game world.

   Source code: [physics/ninja/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/World.js#L213))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.Ninja.html>

Class: Phaser.Math
==================

 Constructor
-----------

 ### 
new Math()

  A collection of useful mathematical functions.

 These are normally accessed through `game.math`.

   Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L17))  See  * [Phaser.Utils](phaser.utils)
* [Phaser.ArrayUtils](phaser.arrayutils)

   Public Properties
-----------------

  ### 
<static> PI2

  Twice PI.

   ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `Phaser.Math#PI2` | number |  |

  Default Value * ~6.283
 Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L24))    Public Methods
--------------

  ### 
angleBetween(x1, y1, x2, y2) → {number}

  Find the angle of a segment from (x1, y1) -> (x2, y2).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x1` | number | The x coordinate of the first value. |
| `y1` | number | The y coordinate of the first value. |
| `x2` | number | The x coordinate of the second value. |
| `y2` | number | The y coordinate of the second value. |

 ##### Returns

   number -   The angle, in radians.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 404](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L404))   ### 
angleBetweenPoints(point1, point2) → {number}

  Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `point1` | [Phaser.Point](phaser.point) | The first point. |
| `point2` | [Phaser.Point](phaser.point) | The second point. |

 ##### Returns

   number -   The angle between the two points, in radians.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 439](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L439))   ### 
angleBetweenPointsY(point1, point2) → {number}

  Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `point1` | [Phaser.Point](phaser.point) |  |
| `point2` | [Phaser.Point](phaser.point) |  |

 ##### Returns

   number -   The angle, in radians.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 453](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L453))   ### 
angleBetweenY(x1, y1, x2, y2) → {number}

  Find the angle of a segment from (x1, y1) -> (x2, y2).

 The difference between this method and Math.angleBetween is that this assumes the y coordinate travels  
down the screen.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x1` | number | The x coordinate of the first value. |
| `y1` | number | The y coordinate of the first value. |
| `x2` | number | The x coordinate of the second value. |
| `y2` | number | The y coordinate of the second value. |

 ##### Returns

   number -   The angle, in radians.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 420](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L420))   ### 
average() → {number}

  Averages all values passed to the function and returns the result.

  ##### Returns

   number -   The average of all given values.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 123](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L123))   ### 
<internal> bernstein(n, i) → {number}

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `n` | number |  |
| `i` | number |  |

 ##### Returns

   number -    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 846](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L846))   ### 
between(min, max) → {number}

  Returns a number between the `min` and `max` values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `min` | number | The minimum value. Must be positive, and less than 'max'. |
| `max` | number | The maximum value. Must be position, and greater than 'min'. |

 ##### Returns

   number -   A value between the range min to max.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L26))   ### 
bezierInterpolation(v, k) → {number}

  A Bezier Interpolation Method, mostly used by Phaser.Tween.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `v` | Array | The input array of values to interpolate between. |
| `k` | number | The percentage of interpolation, between 0 and 1. |

 ##### Returns

   number -   The interpolated value

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 769](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L769))   ### 
<internal> catmullRom(p0, p1, p2, p3, t) → {number}

  Calculates a catmum rom value.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `p0` | number |  |
| `p1` | number |  |
| `p2` | number |  |
| `p3` | number |  |
| `t` | number |  |

 ##### Returns

   number -    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 882](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L882))   ### 
catmullRomInterpolation(v, k) → {number}

  A Catmull Rom Interpolation Method, mostly used by Phaser.Tween.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `v` | Array | The input array of values to interpolate between. |
| `k` | number | The percentage of interpolation, between 0 and 1. |

 ##### Returns

   number -   The interpolated value

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 791](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L791))   ### 
ceilTo(value, place, base) → {number}

  Ceils to some place comparative to a `base`, default is 10 for decimal place.  
The `place` is represented by the power applied to `base` to get that place.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `value` | number |  |  | The value to round. |
| `place` | number |  <optional> |  0  | The place to round to. |
| `base` | number |  <optional> |  10  | The base to round in. Default is 10 for decimal. |

 ##### Returns

   number -   The rounded value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 302](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L302))   ### 
clamp(v, min, max) → {number}

  Force a value within the boundaries by clamping it to the range `min`, `max`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `v` | float | The value to be clamped. |
| `min` | float | The minimum bounds. |
| `max` | float | The maximum bounds. |

 ##### Returns

   number -   The clamped value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1028](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1028))   ### 
clampBottom(x, a) → {number}

  Clamp `x` to the range `[a, Infinity)`.  
Roughly the same as `Math.max(x, a)`, except for NaN handling.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number |  |
| `a` | number |  |

 ##### Returns

   number -    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1054](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1054))   ### 
degToRad(degrees) → {number}

  Convert degrees to radians.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `degrees` | number | Angle in degrees. |

 ##### Returns

   number -   Angle in radians.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1186))   ### 
difference(a, b) → {number}

  The absolute difference between two values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | number | The first value to check. |
| `b` | number | The second value to check. |

 ##### Returns

   number -   The absolute difference between the two values.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 902](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L902))   ### 
distance(x1, y1, x2, y2) → {number}

  Returns the euclidian distance between the two given set of coordinates.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x1` | number |  |
| `y1` | number |  |
| `x2` | number |  |
| `y2` | number |  |

 ##### Returns

   number -   The distance between the two sets of coordinates.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 970](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L970))   ### 
distancePow(x1, y1, x2, y2, pow) → {number}

  Returns the distance between the two given set of coordinates at the power given.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x1` | number |  |  |  |
| `y1` | number |  |  |  |
| `x2` | number |  |  |  |
| `y2` | number |  |  |  |
| `pow` | number |  <optional> |  2  |  |

 ##### Returns

   number -   The distance between the two sets of coordinates.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1009](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1009))   ### 
distanceSq(x1, y1, x2, y2) → {number}

  Returns the euclidean distance squared between the two given set of  
coordinates (cuts out a square root operation before returning).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x1` | number |  |
| `y1` | number |  |
| `x2` | number |  |
| `y2` | number |  |

 ##### Returns

   number -   The distance squared between the two sets of coordinates.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 989](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L989))   ### 
factorial(value) → {number}

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | number | the number you want to evaluate |

 ##### Returns

   number -    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 859](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L859))   ### 
floorTo(value, place, base) → {number}

  Floors to some place comparative to a `base`, default is 10 for decimal place.  
The `place` is represented by the power applied to `base` to get that place.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `value` | number |  |  | The value to round. |
| `place` | number |  <optional> |  0  | The place to round to. |
| `base` | number |  <optional> |  10  | The base to round in. Default is 10 for decimal. |

 ##### Returns

   number -   The rounded value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 281](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L281))   ### 
fuzzyCeil(val, epsilon) → {number}

  Applies a fuzzy ceil to the given value.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `val` | number |  |  | The value to ceil. |
| `epsilon` | number |  <optional> |  0.0001  | The epsilon (a small value used in the calculation) |

 ##### Returns

   number -   ceiling(val-epsilon)

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L91))   ### 
fuzzyEqual(a, b, epsilon) → {boolean}

  Two number are fuzzyEqual if their difference is less than epsilon.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | number |  |  | The first number to compare. |
| `b` | number |  |  | The second number to compare. |
| `epsilon` | number |  <optional> |  0.0001  | The epsilon (a small value used in the calculation) |

 ##### Returns

   boolean -   True if | a-b | <epsilon

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L40))   ### 
fuzzyFloor(val, epsilon) → {number}

  Applies a fuzzy floor to the given value.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `val` | number |  |  | The value to floor. |
| `epsilon` | number |  <optional> |  0.0001  | The epsilon (a small value used in the calculation) |

 ##### Returns

   number -   floor(val+epsilon)

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L107))   ### 
fuzzyGreaterThan(a, b, epsilon) → {boolean}

  `a` is fuzzyGreaterThan `b` if it is more than b - epsilon.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | number |  |  | The first number to compare. |
| `b` | number |  |  | The second number to compare. |
| `epsilon` | number |  <optional> |  0.0001  | The epsilon (a small value used in the calculation) |

 ##### Returns

   boolean -   True if a>b+epsilon

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 74](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L74))   ### 
fuzzyLessThan(a, b, epsilon) → {boolean}

  `a` is fuzzyLessThan `b` if it is less than b + epsilon.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | number |  |  | The first number to compare. |
| `b` | number |  |  | The second number to compare. |
| `epsilon` | number |  <optional> |  0.0001  | The epsilon (a small value used in the calculation) |

 ##### Returns

   boolean -   True if a<b+epsilon

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L57))   ### 
getShortestAngle(angle1, angle2) → {number}

  Gets the shortest angle between `angle1` and `angle2`.  
Both angles must be in the range -180 to 180, which is the same clamped  
range that `sprite.angle` uses, so you can pass in two sprite angles to  
this method, and get the shortest angle back between the two of them.

 The angle returned will be in the same range. If the returned angle is  
greater than 0 then it's a counter-clockwise rotation, if < 0 then it's  
a clockwise rotation.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `angle1` | number | The first angle. In the range -180 to 180. |
| `angle2` | number | The second angle. In the range -180 to 180. |

 ##### Returns

   number -   The shortest angle, in degrees. If greater than zero it's a counter-clockwise rotation.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 374](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L374))   ### 
isEven(n) → {boolean}

  Returns true if the number given is even.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `n` | integer | The number to check. |

 ##### Returns

   boolean -   True if the given number is even. False if the given number is odd.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 589](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L589))   ### 
isOdd(n) → {boolean}

  Returns true if the number given is odd.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `n` | integer | The number to check. |

 ##### Returns

   boolean -   True if the given number is odd. False if the given number is even.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 575](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L575))   ### 
linear(p0, p1, t) → {number}

  Calculates a linear (interpolation) value over t.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `p0` | number |  |
| `p1` | number |  |
| `t` | number | A value between 0 and 1. |

 ##### Returns

   number -    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 831](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L831))   ### 
linearInterpolation(v, k) → {number}

  A Linear Interpolation Method, mostly used by Phaser.Tween.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `v` | Array | The input array of values to interpolate between. |
| `k` | number | The percentage of interpolation, between 0 and 1. |

 ##### Returns

   number -   The interpolated value

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 741](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L741))   ### 
mapLinear(x, a1, a2, b1, b2) → {number}

  Linear mapping from range  to range 

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The value to map |
| `a1` | number | First endpoint of the range  |
| `a2` | number | Final endpoint of the range  |
| `b1` | number | First endpoint of the range  |
| `b2` | number | Final endpoint of the range  |

 ##### Returns

   number -    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1085](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1085))   ### 
max() → {number}

  Variation of Math.max that can be passed either an array of numbers or the numbers as parameters.

 Prefer the standard `Math.max` function when appropriate.

  ##### Returns

   number -   The largest value from those given.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 635](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L635))  See  * <http://jsperf.com/math-s-min-max-vs-homemade>

   ### 
maxAdd(value, amount, max) → {number}

  Adds the given amount to the value, but never lets the value go over the specified maximum.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | number | The value to add the amount to. |
| `amount` | number | The amount to add to the value. |
| `max` | number | The maximum the value is allowed to be. |

 ##### Returns

   number -   The new value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 491](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L491))   ### 
maxProperty() → {number}

  Variation of Math.max that can be passed a property and either an array of objects or the objects as parameters.  
It will find the largest matching property value from the given objects.

  ##### Returns

   number -   The largest value from those given.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 697](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L697))   ### 
min() → {number}

  Variation of Math.min that can be passed either an array of numbers or the numbers as parameters.

 Prefer the standard `Math.min` function when appropriate.

  ##### Returns

   number -   The lowest value from those given.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 603](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L603))  See  * <http://jsperf.com/math-s-min-max-vs-homemade>

   ### 
minProperty() → {number}

  Variation of Math.min that can be passed a property and either an array of objects or the objects as parameters.  
It will find the lowest matching property value from the given objects.

  ##### Returns

   number -   The lowest value from those given.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 667](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L667))   ### 
minSub(value, amount, min) → {number}

  Subtracts the given amount from the value, but never lets the value go below the specified minimum.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | number | The base value. |
| `amount` | number | The amount to subtract from the base value. |
| `min` | number | The minimum the value is allowed to be. |

 ##### Returns

   number -   The new value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 506](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L506))   ### 
normalizeAngle(angleRad) → {number}

  Normalizes an angle to the [0,2pi) range.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `angleRad` | number | The angle to normalize, in radians. |

 ##### Returns

   number -   The angle, fit within the [0,2pi] range, in radians.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 478](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L478))   ### 
percent(a, b, base) → {number}

  Work out what percentage value `a` is of value `b` using the given base.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | number |  |  | The value to work out the percentage for. |
| `b` | number |  |  | The value you wish to get the percentage of. |
| `base` | number |  <optional> |  0  | The base value. |

 ##### Returns

   number -   The percentage a is of b, between 0 and 1.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1153))   ### 
radToDeg(radians) → {number}

  Convert radians to degrees.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `radians` | number | Angle in radians. |

 ##### Returns

   number -   Angle in degrees

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1197](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1197))   ### 
reverseAngle(angleRad) → {number}

  Reverses an angle.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `angleRad` | number | The angle to reverse, in radians. |

 ##### Returns

   number -   The reverse angle, in radians.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 466](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L466))   ### 
rotateToAngle(currentAngle, targetAngle, lerp) → {number}

  Rotates currentAngle towards targetAngle, taking the shortest rotation distance.  
The lerp argument is the amount to rotate by in this call.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `currentAngle` | number |  |  | The current angle, in radians. |
| `targetAngle` | number |  |  | The target angle to rotate to, in radians. |
| `lerp` | number |  <optional> |  0.05  | The lerp value to add to the current angle. |

 ##### Returns

   number -   The adjusted angle.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 323](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L323))   ### 
roundAwayFromZero(value) → {integer}

  Round to the next whole number *away* from zero.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | number | Any number. |

 ##### Returns

   integer -   The rounded value of that number.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 916](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L916))   ### 
roundTo(value, place, base) → {number}

  Round to some place comparative to a `base`, default is 10 for decimal place.  
The `place` is represented by the power applied to `base` to get that place.

 
```
e.g. 2000/7 ~= 285.714285714285714285714 ~= (bin)100011101.1011011011011011

roundTo(2000/7,3) === 0
roundTo(2000/7,2) == 300
roundTo(2000/7,1) == 290
roundTo(2000/7,0) == 286
roundTo(2000/7,-1) == 285.7
roundTo(2000/7,-2) == 285.71
roundTo(2000/7,-3) == 285.714
roundTo(2000/7,-4) == 285.7143
roundTo(2000/7,-5) == 285.71429

roundTo(2000/7,3,2)  == 288       -- 100100000
roundTo(2000/7,2,2)  == 284       -- 100011100
roundTo(2000/7,1,2)  == 286       -- 100011110
roundTo(2000/7,0,2)  == 286       -- 100011110
roundTo(2000/7,-1,2) == 285.5     -- 100011101.1
roundTo(2000/7,-2,2) == 285.75    -- 100011101.11
roundTo(2000/7,-3,2) == 285.75    -- 100011101.11
roundTo(2000/7,-4,2) == 285.6875  -- 100011101.1011
roundTo(2000/7,-5,2) == 285.71875 -- 100011101.10111
```

Note what occurs when we round to the 3rd space (8ths place), 100100000, this is to be assumed  
because we are rounding 100011.1011011011011011 which rounds up.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `value` | number |  |  | The value to round. |
| `place` | number |  <optional> |  0  | The place to round to. |
| `base` | number |  <optional> |  10  | The base to round in. Default is 10 for decimal. |

 ##### Returns

   number -   The rounded value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 235](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L235))   ### 
shear(n) → {number}

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `n` | number |  |

 ##### Returns

   number -   n mod 1

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L144))   ### 
sign(x) → {integer}

  A value representing the sign of the value: -1 for negative, +1 for positive, 0 if value is 0.

 This works differently from `Math.sign` for values of NaN and -0, etc.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number |  |

 ##### Returns

   integer -   An integer in {-1, 0, 1}

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1138))   ### 
sinCosGenerator(length, sinAmplitude, cosAmplitude, frequency) → {Object}

  Generate a sine and cosine table simultaneously and extremely quickly.  
The parameters allow you to specify the length, amplitude and frequency of the wave.  
This generator is fast enough to be used in real-time.  
Code based on research by Franky of scene.at

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `length` | number | The length of the wave |
| `sinAmplitude` | number | The amplitude to apply to the sine table (default 1.0) if you need values between say -+ 125 then give 125 as the value |
| `cosAmplitude` | number | The amplitude to apply to the cosine table (default 1.0) if you need values between say -+ 125 then give 125 as the value |
| `frequency` | number | The frequency of the sine and cosine table data |

 ##### Returns

   Object -   Returns the table data.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 930](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L930))   ### 
smootherstep(x, min, max) → {float}

  Smootherstep function as detailed at http://en.wikipedia.org/wiki/Smoothstep

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | float | The input value. |
| `min` | float | The left edge. Should be smaller than the right edge. |
| `max` | float | The right edge. |

 ##### Returns

   float -   A value between 0 and 1.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1121](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1121))   ### 
smoothstep(x, min, max) → {float}

  Smoothstep function as detailed at http://en.wikipedia.org/wiki/Smoothstep

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | float | The input value. |
| `min` | float | The left edge. Should be smaller than the right edge. |
| `max` | float | The right edge. |

 ##### Returns

   float -   A value between 0 and 1.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1102))   ### 
snapTo(input, gap, start) → {number}

  Snap a value to nearest grid slice, using rounding.

 Example: if you have an interval gap of 5 and a position of 12... you will snap to 10 whereas 14 will snap to 15.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `input` | number |  |  | The value to snap. |
| `gap` | number |  |  | The interval gap of the grid. |
| `start` | number |  <optional> |  0  | Optional starting offset for gap. |

 ##### Returns

   number -   The snapped value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L155))   ### 
snapToCeil(input, gap, start) → {number}

  Snap a value to nearest grid slice, using ceil.

 Example: if you have an interval gap of 5 and a position of 12... you will snap to 15.  
As will 14 will snap to 15... but 16 will snap to 20.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `input` | number |  |  | The value to snap. |
| `gap` | number |  |  | The interval gap of the grid. |
| `start` | number |  <optional> |  0  | Optional starting offset for gap. |

 ##### Returns

   number -   The snapped value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L208))   ### 
snapToFloor(input, gap, start) → {number}

  Snap a value to nearest grid slice, using floor.

 Example: if you have an interval gap of 5 and a position of 12... you will snap to 10.  
As will 14 snap to 10... but 16 will snap to 15.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `input` | number |  |  | The value to snap. |
| `gap` | number |  |  | The interval gap of the grid. |
| `start` | number |  <optional> |  0  | Optional starting offset for gap. |

 ##### Returns

   number -   The snapped value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 181](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L181))   ### 
within(a, b, tolerance) → {boolean}

  Checks if two values are within the given tolerance of each other.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | number | The first number to check |
| `b` | number | The second number to check |
| `tolerance` | number | The tolerance. Anything equal to or less than this is considered within the range. |

 ##### Returns

   boolean -   True if a is <= tolerance of b.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 1069](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L1069))  See  * Phaser.Math.fuzzyEqual

   ### 
wrap(value, min, max) → {number}

  Ensures that the value always stays between min and max, by wrapping the value around.

 If `max` is not larger than `min` the result is 0.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | number | The value to wrap. |
| `min` | number | The minimum the value is allowed to be. |
| `max` | number | The maximum the value is allowed to be, should be larger than `min`. |

 ##### Returns

   number -   The wrapped value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 521](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L521))   ### 
wrapAngle(angle, radians) → {number}

  Keeps an angle value between -180 and +180; or -PI and PI if radians.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `angle` | number |  |  | The angle value to wrap |
| `radians` | boolean |  <optional> |  false  | Set to `true` if the angle is given in radians, otherwise degrees is expected. |

 ##### Returns

   number -   The new angle value; will be the same as the input angle if it was within bounds.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 727](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L727))   ### 
wrapValue(value, amount, max) → {number}

  Adds value to amount and ensures that the result always stays between 0 and max, by wrapping the value around.

 Values *must* be positive integers, and are passed through Math.abs. See [Phaser.Math#wrap](phaser.math#wrap) for an alternative.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | number | The value to add the amount to. |
| `amount` | number | The amount to add to the value. |
| `max` | number | The maximum the value is allowed to be. |

 ##### Returns

   number -   The wrapped value.

    Source code: [math/Math.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js) ([Line 552](https://github.com/photonstorm/phaser/tree/v2.6.2/src/math/Math.js#L552))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Math.html>

Class: Phaser.Physics.Ninja.Tile
================================

 Constructor
-----------

 ### 
new Tile(body, x, y, width, height, type)

  Ninja Physics Tile constructor.  
A Tile is defined by its width, height and type. It's type can include slope data, such as 45 degree slopes, or convex slopes.  
Understand that for any type including a slope (types 2 to 29) the Tile must be SQUARE, i.e. have an equal width and height.  
Also note that as Tiles are primarily used for levels they have gravity disabled and world bounds collision disabled by default.

 Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `body` | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) |  |  | The body that owns this shape. |
| `x` | number |  |  | The x coordinate to create this shape at. |
| `y` | number |  |  | The y coordinate to create this shape at. |
| `width` | number |  |  | The width of this AABB. |
| `height` | number |  |  | The height of this AABB. |
| `type` | number |  <optional> |  1  | The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. |

  Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L25))   Public Properties
-----------------

  ### 
body

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `system` | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | A reference to the body that owns this shape. |

  Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L32))   ### 
[readonly] bottom : number

  The bottom value of this Body (same as Body.y + Body.height)

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 701](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L701))   ### 
[readonly] height : number

  The height.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L89))   ### 
[readonly] id : number

  The ID of this Tile.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L43))   ### 
oldpos : [Phaser.Point](phaser.point)

  The position of this object in the previous update.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L59))   ### 
pos : [Phaser.Point](phaser.point)

  The position of this object.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L54))   ### 
[readonly] right : number

  The right value of this Body (same as Body.x + Body.width)

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 714](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L714))   ### 
system : [Phaser.Physics.Ninja](phaser.physics.ninja)

  A reference to the physics system.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L37))   ### 
[readonly] type : number

  The type of this Tile.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L49))   ### 
velocity : [Phaser.Point](phaser.point)

  The velocity of this object.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L94))   ### 
[readonly] width : number

  The width.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L83))   ### 
x : number

  The x position.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 669](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L669))   ### 
[readonly] xw : number

  Half the width.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 71](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L71))   ### 
y : number

  The y position.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 685](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L685))   ### 
[readonly] yw

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `xw` | number | Half the height. |

  Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L77))    Public Methods
--------------

  ### 
clear()

  Sets this tile to be empty.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 290](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L290))   ### 
collideWorldBounds()

  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.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L153))   ### 
destroy()

  Destroys this Tiles reference to Body and System.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 302](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L302))   ### 
integrate()

  Updates this objects position.

   Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L135))   ### 
reportCollisionVsWorld(px, py, dx, dy, obj)

  Process a world collision and apply the resulting forces.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `px` | number | The tangent velocity |
| `py` | number | The tangent velocity |
| `dx` | number | Collision normal |
| `dy` | number | Collision normal |
| `obj` | number | Object this Tile collided with |

  Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 194](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L194))   ### 
setType(id)

  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.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `id` | number | The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE\_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. |

  Source code: [physics/ninja/Tile.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js) ([Line 268](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Tile.js#L268))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.Ninja.Tile.html>

Class: Phaser.Physics.P2.Material
=================================

 Constructor
-----------

 ### 
new Material(name)

  A P2 Material.

 \o/ ~ "Because I'm a Material girl"

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The user defined name given to this Material. |

  Source code: [physics/p2/Material.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Material.js) ([Line 16](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Material.js#L16))   Public Properties
-----------------

  ### 
name : string

  The user defined name given to this Material.

   Source code: [physics/p2/Material.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Material.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Material.js#L22))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.Material.html>

Class: Phaser.Physics.P2.ContactMaterial
========================================

 Constructor
-----------

 ### 
new ContactMaterial(materialA, materialB, options)

  Defines a physics material

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `materialA` | [Phaser.Physics.P2.Material](phaser.physics.p2.material) |  | First material participating in the contact material. |
| `materialB` | [Phaser.Physics.P2.Material](phaser.physics.p2.material) |  | Second material participating in the contact material. |
| `options` | object |  <optional> | Additional configuration options. |

  Source code: [physics/p2/ContactMaterial.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/ContactMaterial.js) ([Line 16](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/ContactMaterial.js#L16))  

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.ContactMaterial.html>

Class: Phaser.Physics.P2.CollisionGroup
=======================================

 Constructor
-----------

 ### 
new CollisionGroup(bitmask)

  Collision Group

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `bitmask` | number | The CollisionGroup bitmask. |

  Source code: [physics/p2/CollisionGroup.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/CollisionGroup.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/CollisionGroup.js#L14))   Public Properties
-----------------

  ### 
mask : number

  The CollisionGroup bitmask.

   Source code: [physics/p2/CollisionGroup.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/CollisionGroup.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/CollisionGroup.js#L19))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.CollisionGroup.html>

Class: Phaser.Tilemap
=====================

 Constructor
-----------

 ### 
new Tilemap(game, key, tileWidth, tileHeight, width, height)

  Creates a new Phaser.Tilemap object. The map can either be populated with data from a Tiled JSON file or from a CSV file.

 Tiled is a free software package specifically for creating tile maps, and is available from http://www.mapeditor.org

 To do this pass the Cache key as the first parameter. When using Tiled data you need only provide the key.  
When using CSV data you must provide the key and the tileWidth and tileHeight parameters.  
If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here.  
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.  
A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself.  
A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | Game reference to the currently running game. |
| `key` | string |  <optional> |  | 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 `null`. |
| `tileWidth` | number |  <optional> |  32  | The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. |
| `tileHeight` | number |  <optional> |  32  | The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. |
| `width` | number |  <optional> |  10  | The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. |
| `height` | number |  <optional> |  10  | The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L28))   Public Properties
-----------------

  ### 
[static] CSV : number

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 176](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L176))   ### 
[static] EAST : number

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 194](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L194))   ### 
[static] NORTH : number

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 188](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L188))   ### 
[static] SOUTH : number

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 200](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L200))   ### 
[static] TILED\_JSON : number

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 182](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L182))   ### 
[static] WEST : number

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 206](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L206))   ### 
collideIndexes :array

  An array of tile indexes that collide.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L125))   ### 
collision :array

  An array of collision data (polylines, etc).

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L130))   ### 
currentLayer : number

  The current layer.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 145](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L145))   ### 
debugMap :array

  Map data used for debug values only.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L150))   ### 
enableDebug : boolean

  If set then console.log is used to dump out useful layer creation debug data.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 140](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L140))   ### 
format : number

  The format of the map data, either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED\_JSON.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L75))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L33))   ### 
height : number

  The height of the map (in tiles).

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L55))   ### 
heightInPixels : number

  The height of the map in pixels based on height \* tileHeight.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L95))   ### 
imagecollections :array

  An array of Image Collections.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L110))   ### 
images :array

  An array of Tiled Image Layers.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L135))   ### 
key : string

  The key of this map data in the Phaser.Cache.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L38))   ### 
layer : number | string | [Phaser.TilemapLayer](phaser.tilemaplayer)

  The current layer object.

  ##### Type

 * number | string | [Phaser.TilemapLayer](phaser.tilemaplayer)

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1947](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1947))   ### 
layers :array

  An array of Tilemap layer data.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L100))   ### 
objects :array

  An array of Tiled Object Layers.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 120](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L120))   ### 
orientation : string

  The orientation of the map data (as specified in Tiled), usually 'orthogonal'.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L70))   ### 
properties : Object

  Map specific properties as specified in Tiled.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L85))   ### 
tileHeight : number

  The base height of the tiles in the map (in pixels).

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L65))   ### 
tiles :array

  The super array of Tiles.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L115))   ### 
tilesets :array

  An array of Tilesets.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L105))   ### 
tileWidth : number

  The base width of the tiles in the map (in pixels).

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L60))   ### 
version : number

  The version of the map data (as specified in Tiled, usually 1).

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L80))   ### 
width : number

  The width of the map (in tiles).

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L50))   ### 
widthInPixels : number

  The width of the map in pixels based on width \* tileWidth.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L90))    Public Methods
--------------

  ### 
addTilesetImage(tileset, key, tileWidth, tileHeight, tileMargin, tileSpacing, gid) → {[Phaser.Tileset](phaser.tileset)}

  Adds an image to the map to be used as a tileset. A single map may use multiple tilesets.  
Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `tileset` | string |  |  | The name of the tileset as specified in the map data. |
| `key` | string | [Phaser.BitmapData](phaser.bitmapdata) |  <optional> |  | The key of the Phaser.Cache image used for this tileset. If `undefined` or `null` it will look for an image with a key matching the tileset parameter. You can also pass in a BitmapData which can be used instead of an Image. |
| `tileWidth` | number |  <optional> |  32  | The width of the tiles in the Tileset Image. If not given it will default to the map.tileWidth value, if that isn't set then 32. |
| `tileHeight` | number |  <optional> |  32  | The height of the tiles in the Tileset Image. If not given it will default to the map.tileHeight value, if that isn't set then 32. |
| `tileMargin` | number |  <optional> |  0  | The width of the tiles in the Tileset Image. |
| `tileSpacing` | number |  <optional> |  0  | The height of the tiles in the Tileset Image. |
| `gid` | number |  <optional> |  0  | If adding multiple tilesets to a blank/dynamic map, specify the starting GID the set will use here. |

 ##### Returns

   [Phaser.Tileset](phaser.tileset) -   Returns the Tileset object that was created or updated, or null if it failed.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 253](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L253))   ### 
<internal> calculateFaces(layer)

  Internal function.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `layer` | number | The index of the TilemapLayer to operate on. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1073](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1073))   ### 
copy(x, y, width, height, layer) → {array}

  Copies all of the tiles in the given rectangular block into the tilemap data buffer.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | integer |  | X position of the top left of the area to copy (given in tiles, not pixels) |
| `y` | integer |  | Y position of the top left of the area to copy (given in tiles, not pixels) |
| `width` | integer |  | The width of the area to copy (given in tiles, not pixels) |
| `height` | integer |  | The height of the area to copy (given in tiles, not pixels) |
| `layer` | integer | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to copy the tiles from. |

 ##### Returns

   array -   An array of the tiles that were copied.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1543](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1543))   ### 
create(name, width, height, tileWidth, tileHeight, group) → {[Phaser.TilemapLayer](phaser.tilemaplayer)}

  Creates an empty map of the given dimensions and one blank layer. If layers already exist they are erased.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `name` | string |  | The name of the default layer of the map. |
| `width` | number |  | The width of the map in tiles. |
| `height` | number |  | The height of the map in tiles. |
| `tileWidth` | number |  | The width of the tiles the map uses for calculations. |
| `tileHeight` | number |  | The height of the tiles the map uses for calculations. |
| `group` | [Phaser.Group](phaser.group) |  <optional> | Optional Group to add the layer to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.TilemapLayer](phaser.tilemaplayer) -   The TilemapLayer object. This is an extension of Phaser.Image and can be moved around the display list accordingly.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 210](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L210))   ### 
createBlankLayer(name, width, height, tileWidth, tileHeight, group) → {[Phaser.TilemapLayer](phaser.tilemaplayer)}

  Creates a new and empty layer on this Tilemap. By default TilemapLayers are fixed to the camera.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `name` | string |  | The name of this layer. Must be unique within the map. |
| `width` | number |  | The width of the layer in tiles. |
| `height` | number |  | The height of the layer in tiles. |
| `tileWidth` | number |  | The width of the tiles the layer uses for calculations. |
| `tileHeight` | number |  | The height of the tiles the layer uses for calculations. |
| `group` | [Phaser.Group](phaser.group) |  <optional> | Optional Group to add the layer to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.TilemapLayer](phaser.tilemaplayer) -   The TilemapLayer object. This is an extension of Phaser.Image and can be moved around the display list accordingly.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 635](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L635))   ### 
createFromObjects(name, gid, key, frame, exists, autoCull, group, CustomClass, adjustY)

  Creates a Sprite for every object matching the given gid in the map data. You can optionally specify the group that the Sprite will be created in. If none is  
given it will be created in the World. All properties from the map data objectgroup are copied across to the Sprite, so you can use this as an easy way to  
configure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the  
Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the Object Group to create Sprites from. |
| `gid` | number |  |  | The layer array index value, or if a string is given the layer name within the map data. |
| `key` | string |  |  | The Game.cache key of the image that this Sprite will use. |
| `frame` | number | string |  <optional> |  | If the Sprite image contains multiple frames you can specify which one to use here. |
| `exists` | boolean |  <optional> |  true  | The default exists state of the Sprite. |
| `autoCull` | boolean |  <optional> |  false  | The default autoCull state of the Sprite. Sprites that are autoCulled are culled from the camera if out of its range. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  Phaser.World  | Group to add the Sprite to. If not specified it will be added to the World group. |
| `CustomClass` | object |  <optional> |  Phaser.Sprite  | If you wish to create your own class, rather than Phaser.Sprite, pass the class here. Your class must extend Phaser.Sprite and have the same constructor parameters. |
| `adjustY` | boolean |  <optional> |  true  | By default the Tiled map editor uses a bottom-left coordinate system. Phaser uses top-left. So most objects will appear too low down. This parameter moves them up by their height. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 378](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L378))   ### 
createFromTiles(tiles, replacements, key, layer, group, properties) → {integer}

  Creates a Sprite for every object matching the given tile indexes in the map data.  
You can specify the group that the Sprite will be created in. If none is given it will be created in the World.  
You can optional specify if the tile will be replaced with another after the Sprite is created. This is useful if you want to lay down special  
tiles in a level that are converted to Sprites, but want to replace the tile itself with a floor tile or similar once converted.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `tiles` | integer | Array |  |  | The tile index, or array of indexes, to create Sprites from. |
| `replacements` | integer | Array |  |  | The tile index, or array of indexes, to change a converted tile to. Set to `null` to not change. |
| `key` | string |  |  | The Game.cache key of the image that this Sprite will use. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> |  | The layer to operate on. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  Phaser.World  | Group to add the Sprite to. If not specified it will be added to the World group. |
| `properties` | object |  <optional> |  | An object that contains the default properties for your newly created Sprite. This object will be iterated and any matching Sprite property will be set. |

 ##### Returns

   integer -   The number of Sprites that were created.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 467](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L467))   ### 
createLayer(layer, width, height, group) → {[Phaser.TilemapLayer](phaser.tilemaplayer)}

  Creates a new TilemapLayer object. By default TilemapLayers are fixed to the camera.  
The `layer` parameter is important. If you've created your map in Tiled then you can get this by looking in Tiled and looking at the Layer name.  
Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match.  
If you wish to create a blank layer to put your own tiles on then see Tilemap.createBlankLayer.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `layer` | number | string |  | The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. |
| `width` | number |  <optional> | The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width. |
| `height` | number |  <optional> | The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height. |
| `group` | [Phaser.Group](phaser.group) |  <optional> | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.TilemapLayer](phaser.tilemaplayer) -   The TilemapLayer object. This is an extension of Phaser.Sprite and can be moved around the display list accordingly.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 561](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L561))   ### 
destroy()

  Removes all layer data from this tile map and nulls the game reference.  
Note: You are responsible for destroying any TilemapLayer objects you generated yourself, as Tilemap doesn't keep a reference to them.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1929](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1929))   ### 
dump()

  Dumps the tilemap data out to the console.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1888](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1888))   ### 
fill(index, x, y, width, height, layer)

  Fills the given area with the specified tile.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `index` | number |  | The index of the tile that the area will be filled with. |
| `x` | number |  | X position of the top left of the area to operate one, given in tiles, not pixels. |
| `y` | number |  | Y position of the top left of the area to operate one, given in tiles, not pixels. |
| `width` | number |  | The width in tiles of the area to operate on. |
| `height` | number |  | The height in tiles of the area to operate on. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to operate on. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1845](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1845))   ### 
forEach(callback, context, x, y, width, height, layer)

  For each tile in the given area defined by x/y and width/height run the given callback.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `callback` | number |  | The callback. Each tile in the given area will be passed to this callback as the first and only parameter. |
| `context` | number |  | The context under which the callback should be run. |
| `x` | number |  | X position of the top left of the area to operate one, given in tiles, not pixels. |
| `y` | number |  | Y position of the top left of the area to operate one, given in tiles, not pixels. |
| `width` | number |  | The width in tiles of the area to operate on. |
| `height` | number |  | The height in tiles of the area to operate on. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to operate on. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1694](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1694))   ### 
getImageIndex(name) → {number}

  Gets the image index based on its name.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name of the image to get. |

 ##### Returns

   number -   The index of the image in this tilemap, or null if not found.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 766](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L766))   ### 
<internal> getIndex(location, name) → {number}

  Gets the layer index based on the layers name.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `location` | array | The local array to search. |
| `name` | string | The name of the array element to get. |

 ##### Returns

   number -   The index of the element in the array, or null if not found.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L717))   ### 
<internal> getLayer(layer) → {number}

  Gets the TilemapLayer index as used in the setCollision calls.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) | The layer to operate on. If not given will default to this.currentLayer. |

 ##### Returns

   number -   The TilemapLayer index.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1017](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1017))   ### 
getLayerIndex(name) → {number}

  Gets the layer index based on its name.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name of the layer to get. |

 ##### Returns

   number -   The index of the layer in this tilemap, or null if not found.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 740](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L740))   ### 
getTile(x, y, layer, nonNull) → {[Phaser.Tile](phaser.tile)}

  Gets a tile from the Tilemap Layer. The coordinates are given in tile values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | X position to get the tile from (given in tile units, not pixels) |
| `y` | number |  |  | Y position to get the tile from (given in tile units, not pixels) |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> |  | The layer to get the tile from. |
| `nonNull` | boolean |  <optional> |  false  | If true getTile won't return null for empty tiles, but a Tile object with an index of -1. |

 ##### Returns

   [Phaser.Tile](phaser.tile) -   The tile at the given coordinates or null if no tile was found or the coordinates were invalid.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1476](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1476))   ### 
getTileAbove(layer, x, y)

  Gets the tile above the tile coordinates given.  
Mostly used as an internal function by calculateFaces.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `layer` | number | The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
| `x` | number | The x coordinate to get the tile from. In tiles, not pixels. |
| `y` | number | The y coordinate to get the tile from. In tiles, not pixels. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1143](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1143))   ### 
getTileBelow(layer, x, y)

  Gets the tile below the tile coordinates given.  
Mostly used as an internal function by calculateFaces.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `layer` | number | The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
| `x` | number | The x coordinate to get the tile from. In tiles, not pixels. |
| `y` | number | The y coordinate to get the tile from. In tiles, not pixels. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1163))   ### 
getTileLeft(layer, x, y)

  Gets the tile to the left of the tile coordinates given.  
Mostly used as an internal function by calculateFaces.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `layer` | number | The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
| `x` | number | The x coordinate to get the tile from. In tiles, not pixels. |
| `y` | number | The y coordinate to get the tile from. In tiles, not pixels. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1183](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1183))   ### 
getTileRight(layer, x, y)

  Gets the tile to the right of the tile coordinates given.  
Mostly used as an internal function by calculateFaces.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `layer` | number | The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). |
| `x` | number | The x coordinate to get the tile from. In tiles, not pixels. |
| `y` | number | The y coordinate to get the tile from. In tiles, not pixels. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1203))   ### 
getTilesetIndex(name) → {number}

  Gets the tileset index based on its name.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name of the tileset to get. |

 ##### Returns

   number -   The index of the tileset in this tilemap, or null if not found.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 753](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L753))   ### 
getTileWorldXY(x, y, tileWidth, tileHeight, layer, nonNull) → {[Phaser.Tile](phaser.tile)}

  Gets a tile from the Tilemap layer. The coordinates are given in pixel values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | X position to get the tile from (given in pixels) |
| `y` | number |  |  | Y position to get the tile from (given in pixels) |
| `tileWidth` | number |  <optional> |  | The width of the tiles. If not given the map default is used. |
| `tileHeight` | number |  <optional> |  | The height of the tiles. If not given the map default is used. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> |  | The layer to get the tile from. |
| `nonNull` | boolean |  <optional> |  false  | If true getTile won't return null for empty tiles, but a Tile object with an index of -1. |

 ##### Returns

   [Phaser.Tile](phaser.tile) -   The tile at the given coordinates.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1517](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1517))   ### 
hasTile(x, y, layer) → {boolean}

  Checks if there is a tile at the given location.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | X position to check if a tile exists at (given in tile units, not pixels) |
| `y` | number | Y position to check if a tile exists at (given in tile units, not pixels) |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) | The layer to set as current. |

 ##### Returns

   boolean -   True if there is a tile at the given location, otherwise false.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1240))   ### 
paste(x, y, tileblock, layer)

  Pastes a previously copied block of tile data into the given x/y coordinates. Data should have been prepared with Tilemap.copy.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | X position of the top left of the area to paste to (given in tiles, not pixels) |
| `y` | number |  | Y position of the top left of the area to paste to (given in tiles, not pixels) |
| `tileblock` | array |  | The block of tiles to paste. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to paste the tiles into. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1605](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1605))   ### 
putTile(tile, x, y, layer) → {[Phaser.Tile](phaser.tile)}

  Puts a tile of the given index value at the coordinate specified.  
If you pass `null` as the tile it will pass your call over to Tilemap.removeTile instead.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `tile` | [Phaser.Tile](phaser.tile) | number | null |  | The index of this tile to set or a Phaser.Tile object. If null the tile is removed from the map. |
| `x` | number |  | X position to place the tile (given in tile units, not pixels) |
| `y` | number |  | Y position to place the tile (given in tile units, not pixels) |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to modify. |

 ##### Returns

   [Phaser.Tile](phaser.tile) -   The Tile object that was created or added to this map.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1315))   ### 
putTileWorldXY(tile, x, y, tileWidth, tileHeight, layer) → {[Phaser.Tile](phaser.tile)}

  Puts a tile into the Tilemap layer. The coordinates are given in pixel values.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `tile` | [Phaser.Tile](phaser.tile) | number |  | The index of this tile to set or a Phaser.Tile object. |
| `x` | number |  | X position to insert the tile (given in pixels) |
| `y` | number |  | Y position to insert the tile (given in pixels) |
| `tileWidth` | number |  | The width of the tile in pixels. |
| `tileHeight` | number |  | The height of the tile in pixels. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to modify. |

 ##### Returns

   [Phaser.Tile](phaser.tile) -   The Tile object that was created or added to this map.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1386))   ### 
random(x, y, width, height, layer)

  Randomises a set of tiles in a given area.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | X position of the top left of the area to operate one, given in tiles, not pixels. |
| `y` | number |  | Y position of the top left of the area to operate one, given in tiles, not pixels. |
| `width` | number |  | The width in tiles of the area to operate on. |
| `height` | number |  | The height in tiles of the area to operate on. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to operate on. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1758](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1758))   ### 
removeAllLayers()

  Removes all layers from this tile map.

   Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1876](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1876))   ### 
removeTile(x, y, layer) → {[Phaser.Tile](phaser.tile)}

  Removes the tile located at the given coordinates and updates the collision data.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | X position to place the tile (given in tile units, not pixels) |
| `y` | number |  | Y position to place the tile (given in tile units, not pixels) |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to modify. |

 ##### Returns

   [Phaser.Tile](phaser.tile) -   The Tile object that was removed from this map.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1262](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1262))   ### 
removeTileWorldXY(x, y, tileWidth, tileHeight, layer) → {[Phaser.Tile](phaser.tile)}

  Removes the tile located at the given coordinates and updates the collision data. The coordinates are given in pixel values.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | X position to insert the tile (given in pixels) |
| `y` | number |  | Y position to insert the tile (given in pixels) |
| `tileWidth` | number |  | The width of the tile in pixels. |
| `tileHeight` | number |  | The height of the tile in pixels. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to modify. |

 ##### Returns

   [Phaser.Tile](phaser.tile) -   The Tile object that was removed from this map.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1293))   ### 
replace(source, dest, x, y, width, height, layer)

  Scans the given area for tiles with an index matching `source` and updates their index to match `dest`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `source` | number |  | The tile index value to scan for. |
| `dest` | number |  | The tile index value to replace found tiles with. |
| `x` | number |  | X position of the top left of the area to operate one, given in tiles, not pixels. |
| `y` | number |  | Y position of the top left of the area to operate one, given in tiles, not pixels. |
| `width` | number |  | The width in tiles of the area to operate on. |
| `height` | number |  | The height in tiles of the area to operate on. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to operate on. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1723](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1723))   ### 
searchTileIndex(index, skip, reverse, layer) → {[Phaser.Tile](phaser.tile)}

  Searches the entire map layer for the first tile matching the given index, then returns that Phaser.Tile object.  
If no match is found it returns null.  
The search starts from the top-left tile and continues horizontally until it hits the end of the row, then it drops down to the next column.  
If the reverse boolean is true, it scans starting from the bottom-right corner traveling up to the top-left.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `index` | number |  |  | The tile index value to search for. |
| `skip` | number |  <optional> |  0  | The number of times to skip a matching tile before returning. |
| `reverse` | number |  <optional> |  false  | If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> |  | The layer to get the tile from. |

 ##### Returns

   [Phaser.Tile](phaser.tile) -   The first (or n skipped) tile with the matching index.

    Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1409](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1409))   ### 
setCollision(indexes, collides, layer, recalculate)

  Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20].  
The `collides` parameter controls if collision will be enabled (true) or disabled (false).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `indexes` | number | array |  |  | Either a single tile index, or an array of tile IDs to be checked for collision. |
| `collides` | boolean |  <optional> |  true  | If true it will enable collision. If false it will clear collision. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> |  | The layer to operate on. If not given will default to this.currentLayer. |
| `recalculate` | boolean |  <optional> |  true  | Recalculates the tile faces after the update. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 842](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L842))   ### 
setCollisionBetween(start, stop, collides, layer, recalculate)

  Sets collision on a range of tiles where the tile IDs increment sequentially.  
Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14.  
The `collides` parameter controls if collision will be enabled (true) or disabled (false).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `start` | number |  |  | The first index of the tile to be set for collision. |
| `stop` | number |  |  | The last index of the tile to be set for collision. |
| `collides` | boolean |  <optional> |  true  | If true it will enable collision. If false it will clear collision. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> |  | The layer to operate on. If not given will default to this.currentLayer. |
| `recalculate` | boolean |  <optional> |  true  | Recalculates the tile faces after the update. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 880](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L880))   ### 
setCollisionByExclusion(indexes, collides, layer, recalculate)

  Sets collision on all tiles in the given layer, except for the IDs of those in the given array.  
The `collides` parameter controls if collision will be enabled (true) or disabled (false).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `indexes` | array |  |  | An array of the tile IDs to not be counted for collision. |
| `collides` | boolean |  <optional> |  true  | If true it will enable collision. If false it will clear collision. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> |  | The layer to operate on. If not given will default to this.currentLayer. |
| `recalculate` | boolean |  <optional> |  true  | Recalculates the tile faces after the update. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 917](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L917))   ### 
<internal> setCollisionByIndex(index, collides, layer, recalculate)

  Sets collision values on a tile in the set.  
You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `index` | number |  |  | The index of the tile on the layer. |
| `collides` | boolean |  <optional> |  true  | If true it will enable collision on the tile. If false it will clear collision values from the tile. |
| `layer` | number |  <optional> |  | The layer to operate on. If not given will default to this.currentLayer. |
| `recalculate` | boolean |  <optional> |  true  | Recalculates the tile faces after the update. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 951](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L951))   ### 
setLayer(layer)

  Sets the current layer to the given index.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) | The layer to set as current. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1223))   ### 
setPreventRecalculate(value)

  Turn off/on the recalculation of faces for tile or collision updates.  
`setPreventRecalculate(true)` puts recalculation on hold while `setPreventRecalculate(false)` recalculates all the changed layers.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | boolean | If true it will put the recalculation on hold. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1044](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1044))   ### 
setTileIndexCallback(indexes, callback, callbackContext, layer)

  Sets a global collision callback for the given tile index within the layer. This will affect all tiles on this layer that have the same index.  
If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it.  
If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `indexes` | number | array |  | Either a single tile index, or an array of tile indexes to have a collision callback set for. |
| `callback` | function |  | The callback that will be invoked when the tile is collided with. |
| `callbackContext` | object |  | The context under which the callback is called. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to operate on. If not given will default to this.currentLayer. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 779](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L779))   ### 
setTileLocationCallback(x, y, width, height, callback, callbackContext, layer)

  Sets a global collision callback for the given map location within the layer. This will affect all tiles on this layer found in the given area.  
If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it.  
If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | X position of the top left of the area to copy (given in tiles, not pixels) |
| `y` | number |  | Y position of the top left of the area to copy (given in tiles, not pixels) |
| `width` | number |  | The width of the area to copy (given in tiles, not pixels) |
| `height` | number |  | The height of the area to copy (given in tiles, not pixels) |
| `callback` | function |  | The callback that will be invoked when the tile is collided with. |
| `callbackContext` | object |  | The context under which the callback is called. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to operate on. If not given will default to this.currentLayer. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 810](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L810))   ### 
setTileSize(tileWidth, tileHeight)

  Sets the base tile size for the map.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `tileWidth` | number | The width of the tiles the map uses for calculations. |
| `tileHeight` | number | The height of the tiles the map uses for calculations. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 237](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L237))   ### 
shuffle(x, y, width, height, layer)

  Shuffles a set of tiles in a given area. It will only randomise the tiles in that area, so if they're all the same nothing will appear to have changed!

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | X position of the top left of the area to operate one, given in tiles, not pixels. |
| `y` | number |  | Y position of the top left of the area to operate one, given in tiles, not pixels. |
| `width` | number |  | The width in tiles of the area to operate on. |
| `height` | number |  | The height in tiles of the area to operate on. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to operate on. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1803](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1803))   ### 
swap(tileA, tileB, x, y, width, height, layer)

  Scans the given area for tiles with an index matching tileA and swaps them with tileB.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `tileA` | number |  | First tile index. |
| `tileB` | number |  | Second tile index. |
| `x` | number |  | X position of the top left of the area to operate one, given in tiles, not pixels. |
| `y` | number |  | Y position of the top left of the area to operate one, given in tiles, not pixels. |
| `width` | number |  | The width in tiles of the area to operate on. |
| `height` | number |  | The height in tiles of the area to operate on. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to operate on. |

  Source code: [tilemap/Tilemap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js) ([Line 1640](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/Tilemap.js#L1640))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Tilemap.html>

Class: Phaser.Physics.Arcade.Body
=================================

 Constructor
-----------

 ### 
new Body(sprite)

  The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than  
the Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | The Sprite object this physics body belongs to. |

  Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L15))   Public Properties
-----------------

  ### 
acceleration : [Phaser.Point](phaser.point)

  The acceleration is the rate of change of the velocity. Measured in pixels per second squared.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L160))   ### 
allowGravity : boolean

  Allow this Body to be influenced by gravity? Either world or local.

   Default Value * true
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L171))   ### 
allowRotation : boolean

  Allow this Body to be rotated? (via angularVelocity, etc)

   Default Value * true
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L78))   ### 
[readonly] angle : number

  The angle of the Body's velocity in radians.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 288](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L288))   ### 
angularAcceleration : number

  The angular acceleration is the rate of change of the angular velocity. Measured in degrees per second squared.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 264](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L264))   ### 
angularDrag : number

  The drag applied during the rotation of the Body. Measured in degrees per second squared.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 270](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L270))   ### 
angularVelocity : number

  The angular velocity controls the rotation speed of the Body. It is measured in degrees per second.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 258](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L258))   ### 
blocked : Object

  This object is populated with boolean values when the Body collides with the World bounds or a Tile.  
For example if blocked.up is true then the Body cannot move up. An object containing on which faces this Body is blocked from moving, if any.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 390](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L390))   ### 
[readonly] bottom : number

  The bottom value of this Body (same as Body.y + Body.height)

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1370](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1370))   ### 
bounce : [Phaser.Point](phaser.point)

  The elasticity of the Body when colliding. bounce.x/y = 1 means full rebound, bounce.x/y = 0.5 means 50% rebound velocity.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 181](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L181))   ### 
[readonly] center : [Phaser.Point](phaser.point)

  The center coordinate of the Physics Body.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L139))   ### 
checkCollision : Object

  Set the checkCollision properties to control which directions collision is processed for this Body.  
For example checkCollision.up = false means it won't collide when the collision happened while moving up.  
If you need to disable a Body entirely, use `body.enable = false`, this will also disable motion.  
If you need to disable just collision and/or overlap checks, but retain motion, set `checkCollision.none = true`. An object containing allowed collision.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 370](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L370))   ### 
collideWorldBounds : boolean

  A Body can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. Should the Body collide with the World bounds?

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 361](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L361))   ### 
customSeparateX : boolean

  This flag allows you to disable the custom x separation that takes place by Physics.Arcade.separate.  
Used in combination with your own collision processHandler you can create whatever type of collision response you need. Use a custom separation system or the built-in one?

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 323](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L323))   ### 
customSeparateY : boolean

  This flag allows you to disable the custom y separation that takes place by Physics.Arcade.separate.  
Used in combination with your own collision processHandler you can create whatever type of collision response you need. Use a custom separation system or the built-in one?

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 331](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L331))   ### 
deltaMax : [Phaser.Point](phaser.point)

  The Sprite position is updated based on the delta x/y values. You can set a cap on those (both +-) using deltaMax.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L155))   ### 
dirty : boolean

  If this Body in a preUpdate (true) or postUpdate (false) state?

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 402](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L402))   ### 
drag : [Phaser.Point](phaser.point)

  The drag applied to the motion of the Body.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L165))   ### 
embedded : boolean

  If a body is overlapping with another body, but neither of them are moving (maybe they spawned on-top of each other?) this is set to true. Body embed value.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 355](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L355))   ### 
enable : boolean

  A disabled body won't be checked for any form of collision or overlap or have its pre/post updates run.

   Default Value * true
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L36))   ### 
facing : number

  A const reference to the direction the Body is traveling or facing.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 300](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L300))   ### 
friction : [Phaser.Point](phaser.point)

  The amount of movement that will occur if another object 'rides' this one.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 252](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L252))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L25))   ### 
gravity : [Phaser.Point](phaser.point)

  A local gravity applied to this Body. If non-zero this over rides any world gravity, unless Body.allowGravity is set to false.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 176](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L176))   ### 
[readonly] halfHeight : number

  The calculated height / 2 of the physics body.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 133](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L133))   ### 
[readonly] halfWidth : number

  The calculated width / 2 of the physics body.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 127](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L127))   ### 
[readonly] height : number

  The calculated height of the physics body.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L103))   ### 
immovable : boolean

  An immovable Body will not receive any impacts from other bodies.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 306](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L306))   ### 
[readonly] isCircle : boolean

  If `true` this Body is using circular collision detection. If `false` it is using rectangular.  
Use `Body.setCircle` to control the collision shape this Body uses.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L45))   ### 
isMoving : boolean

  Set by the `moveTo` and `moveFrom` methods.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 422](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L422))   ### 
left : number

  The x position of the Body. The same as `Body.x`.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1327](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1327))   ### 
mass : number

  The mass of the Body. When two bodies collide their mass is used in the calculation to determine the exchange of velocity.

   Default Value * 1
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 282](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L282))   ### 
maxAngular : number

  The maximum angular velocity in degrees per second that the Body can reach.

   Default Value * 1000
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 276](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L276))   ### 
maxVelocity : [Phaser.Point](phaser.point)

  The maximum velocity in pixels per second sq. that the Body can reach.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 247](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L247))   ### 
movementCallback : Function

  Optional callback. If set, invoked during the running of `moveTo` or `moveFrom` events.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 467](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L467))   ### 
movementCallbackContext : Object

  Context in which to call the movementCallback.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 472](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L472))   ### 
moves : boolean

  If you have a Body that is being moved around the world via a tween or a Group motion, but its local x/y position never  
actually changes, then you should set Body.moves = false. Otherwise it will most likely fly off the screen.  
If you want the physics system to move the body around, then set moves to true. Set to true to allow the Physics system to move this Body, otherwise false to move it manually.

   Default Value * true
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L315))   ### 
[readonly] newVelocity : [Phaser.Point](phaser.point)

  The new velocity. Calculated during the Body.preUpdate and applied to its position.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L150))   ### 
offset : [Phaser.Point](phaser.point)

  The offset of the Physics Body from the Sprite x/y position.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L60))   ### 
onCollide : [Phaser.Signal](phaser.signal)

  A Signal that is dispatched when this Body collides with another Body.

 You still need to call `game.physics.arcade.collide` in your `update` method in order  
for this signal to be dispatched.

 Usually you'd pass a callback to the `collide` method, but this signal provides for  
a different level of notification.

 Due to the potentially high volume of signals this could create it is disabled by default.

 To use this feature set this property to a Phaser.Signal: `sprite.body.onCollide = new Phaser.Signal()`  
and it will be called when a collision happens, passing two arguments: the sprites which collided.  
The first sprite in the argument is always the owner of this Body.

 If two Bodies with this Signal set collide, both will dispatch the Signal.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L221))   ### 
onMoveComplete : [Phaser.Signal](phaser.signal)

  Listen for the completion of `moveTo` or `moveFrom` events.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 462](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L462))   ### 
onOverlap : [Phaser.Signal](phaser.signal)

  A Signal that is dispatched when this Body overlaps with another Body.

 You still need to call `game.physics.arcade.overlap` in your `update` method in order  
for this signal to be dispatched.

 Usually you'd pass a callback to the `overlap` method, but this signal provides for  
a different level of notification.

 Due to the potentially high volume of signals this could create it is disabled by default.

 To use this feature set this property to a Phaser.Signal: `sprite.body.onOverlap = new Phaser.Signal()`  
and it will be called when a collision happens, passing two arguments: the sprites which collided.  
The first sprite in the argument is always the owner of this Body.

 If two Bodies with this Signal set collide, both will dispatch the Signal.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 241](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L241))   ### 
onWorldBounds : [Phaser.Signal](phaser.signal)

  A Signal that is dispatched when this Body collides with the world bounds.  
Due to the potentially high volume of signals this could create it is disabled by default.  
To use this feature set this property to a Phaser.Signal: `sprite.body.onWorldBounds = new Phaser.Signal()`  
and it will be called when a collision happens, passing five arguments:  
`onWorldBounds(sprite, up, down, left, right)`  
where the Sprite is a reference to the Sprite that owns this Body, and the other arguments are booleans  
indicating on which side of the world the Body collided.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 201](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L201))   ### 
overlapR : number

  If `Body.isCircle` is true, and this body collides with another circular body, the amount of overlap is stored here. The amount of overlap during the collision.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 349](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L349))   ### 
overlapX : number

  When this body collides with another, the amount of overlap is stored here. The amount of horizontal overlap during the collision.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 337](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L337))   ### 
overlapY : number

  When this body collides with another, the amount of overlap is stored here. The amount of vertical overlap during the collision.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 343](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L343))   ### 
[readonly] position : [Phaser.Point](phaser.point)

  The position of the physics body.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L66))   ### 
[readonly] preRotation : number

  The previous rotation of the physics body.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L91))   ### 
[readonly] prev : [Phaser.Point](phaser.point)

  The previous position of the physics body.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L72))   ### 
[readonly] radius : number

  The radius of the circular collision shape this Body is using if Body.setCircle has been enabled.  
If you wish to change the radius then call `setCircle` again with the new value.  
If you wish to stop the Body using a circle then call `setCircle` with a radius of zero (or undefined).

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L55))   ### 
[readonly] right : number

  The right value of this Body (same as Body.x + Body.width)

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1341))   ### 
rotation : number

  The Body's rotation in degrees, as calculated by its angularVelocity and angularAcceleration. Please understand that the collision Body  
itself never rotates, it is always axis-aligned. However these values are passed up to the parent Sprite and updates its rotation.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L85))   ### 
skipQuadTree : boolean

  If true and you collide this Sprite against a Group, it will disable the collision check from using a QuadTree.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 407](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L407))   ### 
[readonly] sourceHeight : number

  The un-scaled original size.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L115))   ### 
[readonly] sourceWidth : number

  The un-scaled original size.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L109))   ### 
[readonly] speed : number

  The speed of the Body as calculated by its velocity.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 294](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L294))   ### 
sprite : [Phaser.Sprite](phaser.sprite)

  Reference to the parent Sprite.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L20))   ### 
stopVelocityOnCollide : boolean

  Set by the `moveTo` and `moveFrom` methods.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 427](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L427))   ### 
syncBounds : boolean

  If true the Body will check itself against the Sprite.getBounds() dimensions and adjust its width and height accordingly.  
If false it will compare its dimensions against the Sprite scale instead, and adjust its width height if the scale has changed.  
Typically you would need to enable syncBounds if your sprite is the child of a responsive display object such as a FlexLayer,  
or in any situation where the Sprite scale doesn't change, but its parents scale is effecting the dimensions regardless.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 417](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L417))   ### 
tilePadding : [Phaser.Point](phaser.point)

  If this is an especially small or fast moving object then it can sometimes skip over tilemap collisions if it moves through a tile in a step.  
Set this padding value to add extra padding to its bounds. tilePadding.x applied to its width, y to its height. Extra padding to be added to this sprite's dimensions when checking for tile collision.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 397](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L397))   ### 
top : number

  The y position of the Body. The same as `Body.y`.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1356](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1356))   ### 
touching : Object

  This object is populated with boolean values when the Body collides with another.  
touching.up = true means the collision happened to the top of this Body for example. An object containing touching results.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 377](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L377))   ### 
type : number

  The type of physics system this body belongs to.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L30))   ### 
velocity : [Phaser.Point](phaser.point)

  The velocity, or rate of change in speed of the Body. Measured in pixels per second.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L144))   ### 
wasTouching : Object

  This object is populated with previous touching values from the bodies previous collision. An object containing previous touching results.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 383](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L383))   ### 
[readonly] width : number

  The calculated width of the physics body.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 97](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L97))   ### 
worldBounce : [Phaser.Point](phaser.point)

  The elasticity of the Body when colliding with the World bounds.  
By default this property is `null`, in which case `Body.bounce` is used instead. Set this property  
to a Phaser.Point object in order to enable a World bounds specific bounce value.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 189](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L189))   ### 
x : number

  The x position.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1385](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1385))   ### 
y : number

  The y position.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1404](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1404))    Public Methods
--------------

  ### 
<internal> checkWorldBounds() → {boolean}

  Internal method.

  ##### Returns

   boolean -   True if the Body collided with the world bounds, otherwise false.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 795](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L795))   ### 
deltaAbsX() → {number}

  Returns the absolute delta x value.

  ##### Returns

   number -   The absolute delta value.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1245](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1245))   ### 
deltaAbsY() → {number}

  Returns the absolute delta y value.

  ##### Returns

   number -   The absolute delta value.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1257](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1257))   ### 
deltaX() → {number}

  Returns the delta x value. The difference between Body.x now and in the previous step.

  ##### Returns

   number -   The delta value. Positive if the motion was to the right, negative if to the left.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1269](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1269))   ### 
deltaY() → {number}

  Returns the delta y value. The difference between Body.y now and in the previous step.

  ##### Returns

   number -   The delta value. Positive if the motion was downwards, negative if upwards.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1281](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1281))   ### 
deltaZ() → {number}

  Returns the delta z value. The difference between Body.rotation now and in the previous step.

  ##### Returns

   number -   The delta value. Positive if the motion was clockwise, negative if anti-clockwise.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1293))   ### 
destroy()

  Destroys this Body.

 First it calls Group.removeFromHash if the Game Object this Body belongs to is part of a Group.  
Then it nulls the Game Objects body reference, and nulls this Body.sprite reference.

   Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1305](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1305))   ### 
getBounds(obj) → {object}

  Returns the bounds of this physics body.

 Only used internally by the World collision methods.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `obj` | object | The object in which to set the bounds values. |

 ##### Returns

   object -   The object that was given to this method.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1165))   ### 
hitTest(x, y) → {boolean}

  Tests if a world point lies within this Body.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The world x coordinate to test. |
| `y` | number | The world y coordinate to test. |

 ##### Returns

   boolean -   True if the given coordinates are inside this Body, otherwise false.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1195](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1195))   ### 
moveFrom(duration, speed, direction) → {boolean}

  Note: This method is experimental, and may be changed or removed in a future release.

 This method moves the Body in the given direction, for the duration specified.  
It works by setting the velocity on the Body, and an internal timer, and then  
monitoring the duration each frame. When the duration is up the movement is  
stopped and the `Body.onMoveComplete` signal is dispatched.

 Movement also stops if the Body collides or overlaps with any other Body.

 You can control if the velocity should be reset to zero on collision, by using  
the property `Body.stopVelocityOnCollide`.

 Stop the movement at any time by calling `Body.stopMovement`.

 You can optionally set a speed in pixels per second. If not specified it  
will use the current `Body.speed` value. If this is zero, the function will return false.

 Please note that due to browser timings you should allow for a variance in  
when the duration will actually expire. Depending on system it may be as much as  
+- 50ms. Also this method doesn't take into consideration any other forces acting  
on the Body, such as Gravity, drag or maxVelocity, all of which may impact the  
movement.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `duration` | integer |  | The duration of the movement, in ms. |
| `speed` | integer |  <optional> | The speed of the movement, in pixels per second. If not provided `Body.speed` is used. |
| `direction` | integer |  <optional> | The angle of movement. If not provided `Body.angle` is used. |

 ##### Returns

   boolean -   True if the movement successfully started, otherwise false.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 879](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L879))   ### 
moveTo(duration, distance, direction) → {boolean}

  Note: This method is experimental, and may be changed or removed in a future release.

 This method moves the Body in the given direction, for the duration specified.  
It works by setting the velocity on the Body, and an internal distance counter.  
The distance is monitored each frame. When the distance equals the distance  
specified in this call, the movement is stopped, and the `Body.onMoveComplete`  
signal is dispatched.

 Movement also stops if the Body collides or overlaps with any other Body.

 You can control if the velocity should be reset to zero on collision, by using  
the property `Body.stopVelocityOnCollide`.

 Stop the movement at any time by calling `Body.stopMovement`.

 Please note that due to browser timings you should allow for a variance in  
when the distance will actually expire.

 Note: This method doesn't take into consideration any other forces acting  
on the Body, such as Gravity, drag or maxVelocity, all of which may impact the  
movement.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `duration` | integer |  | The duration of the movement, in ms. |
| `distance` | integer |  | The distance, in pixels, the Body will move. |
| `direction` | integer |  <optional> | The angle of movement. If not provided `Body.angle` is used. |

 ##### Returns

   boolean -   True if the movement successfully started, otherwise false.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 953](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L953))   ### 
onCeiling() → {boolean}

  Returns true if the top of this Body is in contact with either the world bounds or a tile.

  ##### Returns

   boolean -   True if in contact with either the world bounds or a tile.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1221))   ### 
onFloor() → {boolean}

  Returns true if the bottom of this Body is in contact with either the world bounds or a tile.

  ##### Returns

   boolean -   True if in contact with either the world bounds or a tile.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1209](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1209))   ### 
onWall() → {boolean}

  Returns true if either side of this Body is in contact with either the world bounds or a tile.

  ##### Returns

   boolean -   True if in contact with either the world bounds or a tile.

    Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1233](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1233))   ### 
<internal> postUpdate()

  Internal method.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 709](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L709))   ### 
<internal> preUpdate()

  Internal method.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 552](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L552))   ### 
render(context, body, color, filled)

  Render Sprite Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `context` | object |  |  | The context to render to. |
| `body` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) |  |  | The Body to render the info of. |
| `color` | string |  <optional> |  'rgba(0,255,0,0.4)'  | color of the debug info to be rendered. (format is css color string). |
| `filled` | boolean |  <optional> |  true  | Render the objected as a filled (default, true) or a stroked (false) |

  Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1424](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1424))   ### 
renderBodyInfo(body, x, y, color)

  Render Sprite Body Physics Data as text.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `body` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) |  |  | The Body to render the info of. |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1470](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1470))   ### 
reset(x, y)

  Resets all Body values (velocity, acceleration, rotation, etc)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The new x position of the Body. |
| `y` | number | The new y position of the Body. |

  Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1130))   ### 
setCircle(radius, offsetX, offsetY)

  Sets this Body as using a circle, of the given radius, for all collision detection instead of a rectangle.  
The radius is given in pixels and is the distance from the center of the circle to the edge.

 You can also control the x and y offset, which is the position of the Body relative to the top-left of the Sprite.

 To change a Body back to being rectangular again call `Body.setSize`.

 Note: Circular collision only happens with other Arcade Physics bodies, it does not  
work against tile maps, where rectangular collision is the only method supported.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `radius` | number |  <optional> | The radius of the Body in pixels. Pass a value of zero / undefined, to stop the Body using a circle for collision. |
| `offsetX` | number |  <optional> | The X offset of the Body from the Sprite position. |
| `offsetY` | number |  <optional> | The Y offset of the Body from the Sprite position. |

  Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1084](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1084))   ### 
setSize(width, height, offsetX, offsetY)

  You can modify the size of the physics Body to be any dimension you need.  
This allows you to make it smaller, or larger, than the parent Sprite.  
You can also control the x and y offset of the Body. This is the position of the  
Body relative to the top-left of the Sprite *texture*.

 For example: If you have a Sprite with a texture that is 80x100 in size,  
and you want the physics body to be 32x32 pixels in the middle of the texture, you would do:

 `setSize(32, 32, 24, 34)`

 Where the first two parameters is the new Body size (32x32 pixels).  
24 is the horizontal offset of the Body from the top-left of the Sprites texture, and 34  
is the vertical offset.

 Calling `setSize` on a Body that has already had `setCircle` will reset all of the Circle  
properties, making this Body rectangular again.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `width` | number |  | The width of the Body. |
| `height` | number |  | The height of the Body. |
| `offsetX` | number |  <optional> | The X offset of the Body from the top-left of the Sprites texture. |
| `offsetY` | number |  <optional> | The Y offset of the Body from the top-left of the Sprites texture. |

  Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 1040](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L1040))   ### 
stopMovement(stopVelocity)

  If this Body is moving as a result of a call to `moveTo` or `moveFrom` (i.e. it  
has Body.isMoving true), then calling this method will stop the movement before  
either the duration or distance counters expire.

 The `onMoveComplete` signal is dispatched.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `stopVelocity` | boolean |  <optional> | Should the Body.velocity be set to zero? |

  Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 681](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L681))   ### 
<internal> updateBounds()

  Internal method.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 508](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L508))   ### 
<internal> updateMovement()

  Internal method.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/arcade/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js) ([Line 640](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/Body.js#L640))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.Arcade.Body.html>

Class: Phaser.Weapon
====================

 Constructor
-----------

 ### 
new Weapon(game, parent)

  The Weapon Plugin provides the ability to easily create a bullet pool and manager.

 Weapons fire Phaser.Bullet objects, which are essentially Sprites with a few extra properties.  
The Bullets are enabled for Arcade Physics. They do not currently work with P2 Physics.

 The Bullets are created inside of `Weapon.bullets`, which is a Phaser.Group instance. Anything you  
can usually do with a Group, such as move it around the display list, iterate it, etc can be done  
to the bullets Group too.

 Bullets can have textures and even animations. You can control the speed at which they are fired,  
the firing rate, the firing angle, and even set things like gravity for them.

 A small example, assumed to be running from within a Phaser.State create method.

 `var weapon = this.add.weapon(10, 'bullet');`  
`weapon.fireFrom.set(300, 300);`  
`this.input.onDown.add(weapon.fire, this);`

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the current Phaser.Game instance. |
| `parent` | [Phaser.PluginManager](phaser.pluginmanager) | The Phaser Plugin Manager which looks after this plugin. |

  Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L31))   Public Properties
-----------------

  ### 
[static] KILL\_CAMERA\_BOUNDS : integer

  A `bulletKillType` constant that automatically kills the bullets when they leave the `Camera.bounds` rectangle.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 417](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L417))   ### 
[static] KILL\_DISTANCE : integer

  A `bulletKillType` constant that automatically kills the bullets after they  
exceed the `bulletDistance` from their original firing position.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 403](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L403))   ### 
[static] KILL\_LIFESPAN : integer

  A `bulletKillType` constant that automatically kills the bullets when their `bulletLifespan` expires.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 395](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L395))   ### 
[static] KILL\_NEVER : integer

  A `bulletKillType` constant that stops the bullets from ever being destroyed automatically.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 388](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L388))   ### 
[static] KILL\_STATIC\_BOUNDS : integer

  A `bulletKillType` constant that automatically kills the bullets when they leave the `Weapon.bounds` rectangle.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 431](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L431))   ### 
[static] KILL\_WEAPON\_BOUNDS : integer

  A `bulletKillType` constant that automatically kills the bullets when they leave the `Weapon.bounds` rectangle.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 410](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L410))   ### 
[static] KILL\_WORLD\_BOUNDS : integer

  A `bulletKillType` constant that automatically kills the bullets when they leave the `World.bounds` rectangle.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 424](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L424))   ### 
autoExpandBulletsGroup : boolean

  Should the bullet pool run out of bullets (i.e. they are all in flight) then this  
boolean controls if the Group will create a brand new bullet object or not.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L46))   ### 
autofire : boolean

  Will this weapon auto fire? If set to true then a new bullet will be fired  
based on the `fireRate` value.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L53))   ### 
bounds : [Phaser.Rectangle](phaser.rectangle)

  This Rectangle defines the bounds that are used when determining if a Bullet should be killed or not.  
It's used in combination with `Weapon.bulletKillType` when that is set to either `Phaser.Weapon.KILL_WEAPON_BOUNDS`  
or `Phaser.Weapon.KILL_STATIC_BOUNDS`. If you are not using either of these kill types then the bounds are ignored.  
If you are tracking a Sprite or Point then the bounds are centered on that object every frame.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 266](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L266))   ### 
bulletAngleOffset : number

  An optional angle offset applied to the Bullets when they are launched.  
This is useful if for example your bullet sprites have been drawn facing up, instead of  
to the right, and you want to fire them at an angle. In which case you can set the  
angle offset to be 90 and they'll be properly rotated when fired.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L153))   ### 
bulletAngleVariance : number

  This is a variance added to the angle of Bullets when they are fired.  
If you fire from an angle of 90 and have a `bulletAngleVariance` of 20 then the actual  
angle of the Bullets will be between 70 and 110 degrees. This is a quick way to add a  
great 'spread' effect to a Weapon.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 162](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L162))   ### 
bulletAnimation : string

  The string based name of the animation that the Bullet will be given on launch.  
This is set via `Weapon.addBulletAnimation`.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L112))   ### 
bulletClass : Object

  The Class of the bullets that are launched by this Weapon. Defaults `Phaser.Bullet`, but can be  
overridden before calling `createBullets` and set to your own class type.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 1111](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L1111))   ### 
bulletCollideWorldBounds : boolean

  Should bullets collide with the World bounds or not?

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 1199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L1199))   ### 
bulletFrame : string | integer

  The Texture Frame that the Bullets use when rendering.  
Changing this has no effect on bullets in-flight, only on newly spawned bullets.

  ##### Type

 * string | integer

  Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L221))   ### 
bulletFrameCycle : boolean

  If you've added a set of frames via `Weapon.setBulletFrames` then you can optionally  
chose for each Bullet fired to use the next frame in the set. The frame index is then  
advanced one frame until it reaches the end of the set, then it starts from the start  
again. Cycling frames like this allows you to create varied bullet effects via  
sprite sheets.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L129))   ### 
bulletFrameRandom : boolean

  If you've added a set of frames via `Weapon.setBulletFrames` then you can optionally  
chose for each Bullet fired to pick a random frame from the set.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L119))   ### 
<internal> bulletFrames : Array

  This array stores the frames added via `Weapon.setBulletFrames`.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 282](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L282))   ### 
bulletGravity : [Phaser.Point](phaser.point)

  This is the amount of gravity added to the Bullets physics body when fired.  
Gravity is expressed in pixels / second / second.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L199))   ### 
bulletInheritSpriteSpeed : boolean

  When a Bullet is fired it can optionally inherit the velocity of the `trackedSprite` if set.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L105))   ### 
bulletKey : string

  The Texture Key that the Bullets use when rendering.  
Changing this has no effect on bullets in-flight, only on newly spawned bullets.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 214](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L214))   ### 
bulletKillDistance : number

  If you've set `bulletKillType` to `Phaser.Weapon.KILL_DISTANCE` this controls the distance  
the Bullet can travel before it is automatically killed. The distance is given in pixels.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 192](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L192))   ### 
bulletKillType : integer

  This controls how the bullets will be killed. The default is `Phaser.Weapon.KILL_WORLD_BOUNDS`.

 There are 7 different "kill types" available:

 * `Phaser.Weapon.KILL_NEVER`  
The bullets are never destroyed by the Weapon. It's up to you to destroy them via your own code.
* `Phaser.Weapon.KILL_LIFESPAN`  
The bullets are automatically killed when their `bulletLifespan` amount expires.
* `Phaser.Weapon.KILL_DISTANCE`  
The bullets are automatically killed when they exceed `bulletDistance` pixels away from their original launch position.
* `Phaser.Weapon.KILL_WEAPON_BOUNDS`  
The bullets are automatically killed when they no longer intersect with the `Weapon.bounds` rectangle.
* `Phaser.Weapon.KILL_CAMERA_BOUNDS`  
The bullets are automatically killed when they no longer intersect with the `Camera.bounds` rectangle.
* `Phaser.Weapon.KILL_WORLD_BOUNDS`  
The bullets are automatically killed when they no longer intersect with the `World.bounds` rectangle.
* `Phaser.Weapon.KILL_STATIC_BOUNDS`  
The bullets are automatically killed when they no longer intersect with the `Weapon.bounds` rectangle.  
The difference between static bounds and weapon bounds, is that a static bounds will never be adjusted to  
match the position of a tracked sprite or pointer.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 1136](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L1136))   ### 
bulletLifespan : number

  If you've set `bulletKillType` to `Phaser.Weapon.KILL_LIFESPAN` this controls the amount  
of lifespan the Bullets have set on launch. The value is given in milliseconds.  
When a Bullet hits its lifespan limit it will be automatically killed.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L185))   ### 
bulletRotateToVelocity : boolean

  Bullets can optionally adjust their rotation in-flight to match their velocity.  
This can create the effect of a bullet 'pointing' to the path it is following, for example  
an arrow being fired from a bow, and works especially well when added to `bulletGravity`.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 207](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L207))   ### 
bullets : [Phaser.Group](phaser.group)

  This is the Phaser.Group that contains all of the bullets managed by this plugin.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L39))   ### 
bulletSpeed : number

  The speed at which the bullets are fired. This value is given in pixels per second, and  
is used to set the starting velocity of the bullets.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 169](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L169))   ### 
bulletSpeedVariance : number

  This is a variance added to the speed of Bullets when they are fired.  
If bullets have a `bulletSpeed` value of 200, and a `bulletSpeedVariance` of 50  
then the actual speed of the Bullets will be between 150 and 250 pixels per second.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L177))   ### 
bulletWorldWrap : boolean

  Should the Bullets wrap around the world bounds? This automatically calls  
`World.wrap` on the Bullet each frame. See the docs for that method for details.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 136](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L136))   ### 
bulletWorldWrapPadding : integer

  If `bulletWorldWrap` is true then you can provide an optional padding value with this  
property. It's added to the calculations determining when the Bullet should wrap around  
the world or not. The value is given in pixels.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L144))   ### 
fireAngle : integer

  The angle at which the bullets are fired. This can be a const such as Phaser.ANGLE\_UP  
or it can be any number from 0 to 360 inclusive, where 0 degrees is to the right.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 99](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L99))   ### 
fireFrom : [Phaser.Rectangle](phaser.rectangle)

  This is a Rectangle from within which the bullets are fired. By default it's a 1x1  
rectangle, the equivalent of a Point. But you can change the width and height, and if  
larger than 1x1 it'll pick a random point within the rectangle to launch the bullet from.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L92))   ### 
fireLimit : number

  The maximum number of shots that this Weapon is allowed to fire before it stops.  
When the limit is his the `Weapon.onFireLimit` Signal is dispatched.  
You can reset the shot counter via `Weapon.resetShots`.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L69))   ### 
fireRate : number

  The rate at which this Weapon can fire. The value is given in milliseconds.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L75))   ### 
fireRateVariance : number

  This is a modifier that is added to the `fireRate` each update to add variety  
to the firing rate of the Weapon. The value is given in milliseconds.  
If you've a `fireRate` of 200 and a `fireRateVariance` of 50 then the actual  
firing rate of the Weapon will be between 150 and 250.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L84))   ### 
onFire : [Phaser.Signal](phaser.signal)

  The onFire Signal is dispatched each time `Weapon.fire` is called, and a Bullet is  
*successfully* launched. The callback is set two arguments: a reference to the bullet sprite itself,  
and a reference to the Weapon that fired the bullet.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 306](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L306))   ### 
onFireLimit : [Phaser.Signal](phaser.signal)

  The onFireLimit Signal is dispatched if `Weapon.fireLimit` is > 0, and a bullet launch takes the number  
of shots fired to equal the fire limit.  
The callback is sent two arguments: A reference to the Weapon that hit the limit, and the value of  
`Weapon.fireLimit`.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 325](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L325))   ### 
onKill : [Phaser.Signal](phaser.signal)

  The onKill Signal is dispatched each time a Bullet that is in-flight is killed. This can be the result  
of leaving the Weapon bounds, an expiring lifespan, or exceeding a specified distance.  
The callback is sent one argument: A reference to the bullet sprite itself.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L315))   ### 
shots : number

  The total number of bullets this Weapon has fired so far.  
You can limit the number of shots allowed (via `fireLimit`), and reset  
this total via `Weapon.resetShots`.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L61))   ### 
trackedPointer : [Phaser.Pointer](phaser.pointer)

  The Pointer currently being tracked by the Weapon, if any.  
This is set via the `Weapon.trackPointer` method.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L341))   ### 
trackedSprite : [Phaser.Sprite](phaser.sprite) | Object

  The Sprite currently being tracked by the Weapon, if any.  
This is set via the `Weapon.trackSprite` method.

  ##### Type

 * [Phaser.Sprite](phaser.sprite) | Object

  Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 333](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L333))   ### 
trackOffset : [Phaser.Point](phaser.point)

  The Track Offset is a Point object that allows you to specify a pixel offset that bullets use  
when launching from a tracked Sprite or Pointer. For example if you've got a bullet that is 2x2 pixels  
in size, but you're tracking a Sprite that is 32x32, then you can set `trackOffset.x = 16` to have  
the bullet launched from the center of the Sprite.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 360](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L360))   ### 
trackRotation : boolean

  If the Weapon is tracking a Sprite, should it also track the Sprites rotation?  
This is useful for a game such as Asteroids, where you want the weapon to fire based  
on the sprites rotation.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 350](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L350))   ### 
x : number

  The x coordinate from which bullets are fired. This is the same as `Weapon.fireFrom.x`, and  
can be overridden by the `Weapon.fire` arguments.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 1224](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L1224))   ### 
y : number

  The y coordinate from which bullets are fired. This is the same as `Weapon.fireFrom.y`, and  
can be overridden by the `Weapon.fire` arguments.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 1246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L1246))    Public Methods
--------------

  ### 
addBulletAnimation(name, frames, frameRate, loop, useNumericIndex) → {[Phaser.Weapon](phaser.weapon)}

  Adds a new animation under the given key. Optionally set the frames, frame rate and loop.  
The arguments are all the same as for `Animation.add`, and work in the same way.

 `Weapon.bulletAnimation` will be set to this animation after it's created. From that point on, all  
bullets fired will play using this animation. You can swap between animations by calling this method  
several times, and then just changing the `Weapon.bulletAnimation` property to the name of the animation  
you wish to play for the next launched bullet.

 If you wish to stop using animations at all, set `Weapon.bulletAnimation` to '' (an empty string).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The unique (within the Weapon instance) name for the animation, i.e. "fire", "blast". |
| `frames` | Array |  <optional> |  null  | An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used. |
| `frameRate` | number |  <optional> |  60  | The speed at which the animation should play. The speed is given in frames per second. |
| `loop` | boolean |  <optional> |  false  | Whether or not the animation is looped or just plays once. |
| `useNumericIndex` | boolean |  <optional> |  true  | Are the given frames using numeric indexes (default) or strings? |

 ##### Returns

   [Phaser.Weapon](phaser.weapon) -   The Weapon Plugin.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 1048](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L1048))   ### 
createBullets(quantity, key, frame, group) → {[Phaser.Weapon](phaser.weapon)}

  This method performs two actions: First it will check to see if the `Weapon.bullets` Group exists or not,  
and if not it creates it, adding it the `group` given as the 4th argument.

 Then it will seed the bullet pool with the `quantity` number of Bullets, using the texture key and frame  
provided (if any).

 If for example you set the quantity to be 10, then this Weapon will only ever be able to have 10 bullets  
in-flight simultaneously. If you try to fire an 11th bullet then nothing will happen until one, or more, of  
the in-flight bullets have been killed, freeing them up for use by the Weapon again.

 If you do not wish to have a limit set, then pass in -1 as the quantity. In this instance the Weapon will  
keep increasing the size of the bullet pool as needed. It will never reduce the size of the pool however,  
so be careful it doesn't grow too large.

 You can either set the texture key and frame here, or via the `Weapon.bulletKey` and `Weapon.bulletFrame`  
properties. You can also animate bullets, or set them to use random frames. All Bullets belonging to a  
single Weapon instance must share the same texture key however.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | integer |  <optional> |  1  | The quantity of bullets to seed the Weapon with. If -1 it will set the pool to automatically expand. |
| `key` | string |  <optional> |  | The Game.cache key of the image that this Sprite will use. |
| `frame` | integer | string |  <optional> |  | If the Sprite image contains multiple frames you can specify which one to use here. |
| `group` | [Phaser.Group](phaser.group) |  <optional> |  | Optional Group to add the object to. If not specified it will be added to the World group. |

 ##### Returns

   [Phaser.Weapon](phaser.weapon) -   This Weapon instance.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 433](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L433))   ### 
debug(x, y, debugBodies)

  Uses `Game.Debug` to draw some useful information about this Weapon, including the number of bullets  
both in-flight, and available. And optionally the physics debug bodies of the bullets.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | integer |  <optional> |  16  | The coordinate, in screen space, at which to draw the Weapon debug data. |
| `y` | integer |  <optional> |  32  | The coordinate, in screen space, at which to draw the Weapon debug data. |
| `debugBodies` | boolean |  <optional> |  false  | Optionally draw the physics body of every bullet in-flight. |

  Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 1086](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L1086))   ### 
destroy()

  Destroys this Weapon. It removes itself from the PluginManager, destroys  
the bullets Group, and nulls internal references.

   Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 579](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L579))   ### 
fire(from, x, y) → {[Phaser.Bullet](phaser.bullet)}

  Attempts to fire a single Bullet. If there are no more bullets available in the pool, and the pool cannot be extended,  
then this method returns `false`. It will also return false if not enough time has expired since the last time  
the Weapon was fired, as defined in the `Weapon.fireRate` property.

 Otherwise the first available bullet is selected and launched.

 The arguments are all optional, but allow you to control both where the bullet is launched from, and aimed at.

 If you don't provide any of the arguments then it uses those set via properties such as `Weapon.trackedSprite`,  
`Weapon.bulletAngle` and so on.

 When the bullet is launched it has its texture and frame updated, as required. The velocity of the bullet is  
calculated based on Weapon properties like `bulletSpeed`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `from` | [Phaser.Sprite](phaser.sprite) | [Phaser.Point](phaser.point) | Object |  <optional> | Optionally fires the bullet **from** the `x` and `y` properties of this object. If set this overrides `Weapon.trackedSprite` or `trackedPointer`. Pass `null` to ignore it. |
| `x` | number |  <optional> | The x coordinate, in world space, to fire the bullet **towards**. If left as `undefined` the bullet direction is based on its angle. |
| `y` | number |  <optional> | The y coordinate, in world space, to fire the bullet **towards**. If left as `undefined` the bullet direction is based on its angle. |

 ##### Returns

   [Phaser.Bullet](phaser.bullet) -   The fired bullet if successful, null otherwise.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 691](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L691))   ### 
fireAtPointer(pointer) → {[Phaser.Bullet](phaser.bullet)}

  Fires a bullet **at** the given Pointer. The bullet will be launched from the `Weapon.fireFrom` position,  
or from a Tracked Sprite or Pointer, if you have one set.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  <optional> | The Pointer to fire the bullet towards. |

 ##### Returns

   [Phaser.Bullet](phaser.bullet) -   The fired bullet if successful, null otherwise.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 928](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L928))   ### 
fireAtSprite(sprite) → {[Phaser.Bullet](phaser.bullet)}

  Fires a bullet **at** the given Sprite. The bullet will be launched from the `Weapon.fireFrom` position,  
or from a Tracked Sprite or Pointer, if you have one set.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) |  <optional> | The Sprite to fire the bullet towards. |

 ##### Returns

   [Phaser.Bullet](phaser.bullet) -   The fired bullet if successful, null otherwise.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 944](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L944))   ### 
fireAtXY(x, y) → {[Phaser.Bullet](phaser.bullet)}

  Fires a bullet **at** the given coordinates. The bullet will be launched from the `Weapon.fireFrom` position,  
or from a Tracked Sprite or Pointer, if you have one set.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  <optional> | The x coordinate, in world space, to fire the bullet towards. |
| `y` | number |  <optional> | The y coordinate, in world space, to fire the bullet towards. |

 ##### Returns

   [Phaser.Bullet](phaser.bullet) -   The fired bullet if successful, null otherwise.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 958](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L958))   ### 
forEach(callback, callbackContext, args) → {[Phaser.Weapon](phaser.weapon)}

  Call a function on each in-flight bullet in this Weapon.

 See [forEachExists](phaser.group#forEachExists) for more details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

 ##### Returns

   [Phaser.Weapon](phaser.weapon) -   This Weapon instance.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 490](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L490))   ### 
killAll() → {[Phaser.Weapon](phaser.weapon)}

  Calls `Bullet.kill` on every in-flight bullet in this Weapon.  
Also re-enables their physics bodies, should they have been disabled via `pauseAll`.

  ##### Returns

   [Phaser.Weapon](phaser.weapon) -   This Weapon instance.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 541](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L541))   ### 
pauseAll() → {[Phaser.Weapon](phaser.weapon)}

  Sets `Body.enable` to `false` on each bullet in this Weapon.  
This has the effect of stopping them in-flight should they be moving.  
It also stops them being able to be checked for collision.

  ##### Returns

   [Phaser.Weapon](phaser.weapon) -   This Weapon instance.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 509](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L509))   ### 
resetShots(newLimit) → {[Phaser.Weapon](phaser.weapon)}

  Resets the `Weapon.shots` counter back to zero. This is used when you've set  
`Weapon.fireLimit`, and have hit (or just wish to reset) your limit.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `newLimit` | integer |  <optional> | Optionally set a new `Weapon.fireLimit`. |

 ##### Returns

   [Phaser.Weapon](phaser.weapon) -   This Weapon instance.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 558](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L558))   ### 
resumeAll() → {[Phaser.Weapon](phaser.weapon)}

  Sets `Body.enable` to `true` on each bullet in this Weapon.  
This has the effect of resuming their motion should they be in-flight.  
It also enables them for collision checks again.

  ##### Returns

   [Phaser.Weapon](phaser.weapon) -   This Weapon instance.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 525](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L525))   ### 
setBulletBodyOffset(width, height, offsetX, offsetY) → {[Phaser.Weapon](phaser.weapon)}

  You can modify the size of the physics Body the Bullets use to be any dimension you need.  
This allows you to make it smaller, or larger, than the parent Sprite.  
You can also control the x and y offset of the Body. This is the position of the  
Body relative to the top-left of the Sprite *texture*.

 For example: If you have a Sprite with a texture that is 80x100 in size,  
and you want the physics body to be 32x32 pixels in the middle of the texture, you would do:

 `setSize(32, 32, 24, 34)`

 Where the first two parameters is the new Body size (32x32 pixels).  
24 is the horizontal offset of the Body from the top-left of the Sprites texture, and 34  
is the vertical offset.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `width` | number |  | The width of the Body. |
| `height` | number |  | The height of the Body. |
| `offsetX` | number |  <optional> | The X offset of the Body from the top-left of the Sprites texture. |
| `offsetY` | number |  <optional> | The Y offset of the Body from the top-left of the Sprites texture. |

 ##### Returns

   [Phaser.Weapon](phaser.weapon) -   The Weapon Plugin.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 973](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L973))   ### 
setBulletFrames(min, max, cycle, random) → {[Phaser.Weapon](phaser.weapon)}

  Sets the texture frames that the bullets can use when being launched.

 This is intended for use when you've got numeric based frames, such as those loaded via a Sprite Sheet.

 It works by calling `Phaser.ArrayUtils.numberArray` internally, using the min and max values  
provided. Then it sets the frame index to be zero.

 You can optionally set the cycle and random booleans, to allow bullets to cycle through the frames  
when they're fired, or pick one at random.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `min` | integer |  |  | The minimum value the frame can be. Usually zero. |
| `max` | integer |  |  | The maximum value the frame can be. |
| `cycle` | boolean |  <optional> |  true  | Should the bullet frames cycle as they are fired? |
| `random` | boolean |  <optional> |  false  | Should the bullet frames be picked at random as they are fired? |

 ##### Returns

   [Phaser.Weapon](phaser.weapon) -   The Weapon Plugin.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 1014](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L1014))   ### 
trackPointer(pointer, offsetX, offsetY) → {[Phaser.Weapon](phaser.weapon)}

  Sets this Weapon to track the given Pointer.  
When a Weapon tracks a Pointer it will automatically update its `fireFrom` value to match the Pointers  
position within the Game World, adjusting the coordinates based on the offset arguments.

 This allows you to lock a Weapon to a Pointer, so that bullets are always launched from its location.

 Calling `trackPointer` will reset `Weapon.trackedSprite` to null, should it have been set, as you can  
only track *either* a Pointer, or a Sprite, at once, but not both.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  <optional> |  | The Pointer to track the position of. Defaults to `Input.activePointer` if not specified. |
| `offsetX` | integer |  <optional> |  0  | The horizontal offset from the Pointers position to be applied to the Weapon. |
| `offsetY` | integer |  <optional> |  0  | The vertical offset from the Pointers position to be applied to the Weapon. |

 ##### Returns

   [Phaser.Weapon](phaser.weapon) -   This Weapon instance.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 659](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L659))   ### 
trackSprite(sprite, offsetX, offsetY, trackRotation) → {[Phaser.Weapon](phaser.weapon)}

  Sets this Weapon to track the given Sprite, or any Object with a public `world` Point object.  
When a Weapon tracks a Sprite it will automatically update its `fireFrom` value to match the Sprites  
position within the Game World, adjusting the coordinates based on the offset arguments.

 This allows you to lock a Weapon to a Sprite, so that bullets are always launched from its location.

 Calling `trackSprite` will reset `Weapon.trackedPointer` to null, should it have been set, as you can  
only track *either* a Sprite, or a Pointer, at once, but not both.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | Object |  |  | The Sprite to track the position of. |
| `offsetX` | integer |  <optional> |  0  | The horizontal offset from the Sprites position to be applied to the Weapon. |
| `offsetY` | integer |  <optional> |  0  | The vertical offset from the Sprites position to be applied to the Weapon. |
| `trackRotation` | boolean |  <optional> |  false  | Should the Weapon also track the Sprites rotation? |

 ##### Returns

   [Phaser.Weapon](phaser.weapon) -   This Weapon instance.

    Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 626](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L626))   ### 
<internal> update()

  Internal update method, called by the PluginManager.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [plugins/weapon/WeaponPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js) ([Line 598](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/WeaponPlugin.js#L598))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Weapon.html>

Class: Phaser.Physics.Ninja.AABB
================================

 Constructor
-----------

 ### 
new AABB(body, x, y, width, height)

  Ninja Physics AABB constructor.  
Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `body` | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | The body that owns this shape. |
| `x` | number | The x coordinate to create this shape at. |
| `y` | number | The y coordinate to create this shape at. |
| `width` | number | The width of this AABB. |
| `height` | number | The height of this AABB. |

  Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L20))   Public Properties
-----------------

  ### 
aabbTileProjections : Object

  All of the collision response handlers.

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L86))   ### 
body

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `system` | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | A reference to the body that owns this shape. |

  Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L25))   ### 
[readonly] height : number

  The height.

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L64))   ### 
oldpos : [Phaser.Point](phaser.point)

  The position of this object in the previous update.

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L40))   ### 
pos : [Phaser.Point](phaser.point)

  The position of this object.

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L35))   ### 
system : [Phaser.Physics.Ninja](phaser.physics.ninja)

  A reference to the physics system.

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L30))   ### 
velocity : [Phaser.Point](phaser.point)

  The velocity of this object.

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 81](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L81))   ### 
[readonly] width : number

  The width.

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L58))   ### 
[readonly] xw : number

  Half the width.

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L46))   ### 
[readonly] yw

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `xw` | number | Half the height. |

  Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L52))    Public Methods
--------------

  ### 
collideAABBVsAABB(aabb)

  Collides this AABB against a AABB.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `aabb` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB to collide against. |

  Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 336](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L336))   ### 
collideAABBVsTile(tile)

  Collides this AABB against a Tile.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `tile` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile to collide against. |

  Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 408](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L408))   ### 
collideWorldBounds()

  Collides this AABB against the world bounds.

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 295](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L295))   ### 
destroy()

  Destroys this AABB's reference to Body and System

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 993](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L993))   ### 
integrate()

  Updates this AABBs position.

   Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 108](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L108))   ### 
projAABB\_22DegB(x, y, obj, t) → {number}

  Resolves 22 Degree tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `obj` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 702](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L702))   ### 
projAABB\_22DegS(x, y, obj, t) → {number}

  Resolves 22 Degree tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `obj` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 622](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L622))   ### 
projAABB\_45Deg(x, y, obj, t) → {number}

  Resolves 45 Degree tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `obj` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 569](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L569))   ### 
projAABB\_67DegB(x, y, obj, t) → {number}

  Resolves 67 Degree tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `obj` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 834](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L834))   ### 
projAABB\_67DegS(x, y, obj, t) → {number}

  Resolves 67 Degree tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `obj` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 755](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L755))   ### 
projAABB\_Concave(x, y, obj, t) → {number}

  Resolves Concave tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `obj` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 935](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L935))   ### 
projAABB\_Convex(x, y, obj, t) → {number}

  Resolves Convex tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `obj` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 885](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L885))   ### 
projAABB\_Full(x, y, obj, t) → {number}

  Resolves Full tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `obj` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 491](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L491))   ### 
projAABB\_Half(x, y, obj, t) → {number}

  Resolves Half tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `obj` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 510](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L510))   ### 
render(context, xOffset, yOffset, color, filled)

  Render this AABB for debugging purposes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `context` | object | The context to render to. |
| `xOffset` | number | X offset from AABB's position to render at. |
| `yOffset` | number | Y offset from AABB's position to render at. |
| `color` | string | color of the debug shape to be rendered. (format is css color string). |
| `filled` | boolean | Render the shape as solid (true) or hollow (false). |

  Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 1003](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L1003))   ### 
reportCollision(px, py, dx, dy)

  Process a collision partner-agnostic collision response and apply the resulting forces.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `px` | number | The tangent velocity |
| `py` | number | The tangent velocity |
| `dx` | number | Collision normal |
| `dy` | number | Collision normal |

  Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 128](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L128))   ### 
reportCollisionVsBody(px, py, dx, dy, obj)

  Process a body collision and apply the resulting forces. Still very much WIP and doesn't work fully. Feel free to fix!

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `px` | number | The tangent velocity |
| `py` | number | The tangent velocity |
| `dx` | number | Collision normal |
| `dy` | number | Collision normal |
| `obj` | number | Object this AABB collided with |

  Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L248))   ### 
reportCollisionVsWorld(px, py, dx, dy)

  Process a world collision and apply the resulting forces.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `px` | number | The tangent velocity |
| `py` | number | The tangent velocity |
| `dx` | number | Collision normal |
| `dy` | number | Collision normal |

  Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 202](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L202))   ### 
resolveTile(x, y, body, tile) → {boolean}

  Resolves tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `body` | [Phaser.Physics.Ninja.AABB](phaser.physics.ninja.aabb) | The AABB involved in the collision. |
| `tile` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   boolean -   True if the collision was processed, otherwise false.

    Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 467](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L467))   ### 
reverse()

  Source code: [physics/ninja/AABB.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js) ([Line 216](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/AABB.js#L216))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.Ninja.AABB.html>

Class: Phaser.Physics.Ninja.Circle
==================================

 Constructor
-----------

 ### 
new Circle(body, x, y, radius)

  Ninja Physics Circle constructor.  
Note: This class could be massively optimised and reduced in size. I leave that challenge up to you.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `body` | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | The body that owns this shape. |
| `x` | number | The x coordinate to create this shape at. |
| `y` | number | The y coordinate to create this shape at. |
| `radius` | number | The radius of this Circle. |

  Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L19))   Public Properties
-----------------

  ### 
body

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `system` | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | A reference to the body that owns this shape. |

  Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L24))   ### 
circleTileProjections : Object

  All of the collision response handlers.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L90))   ### 
[readonly] height : number

  The height.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L68))   ### 
oldpos : [Phaser.Point](phaser.point)

  The position of this object in the previous update.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L39))   ### 
pos : [Phaser.Point](phaser.point)

  The position of this object.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L34))   ### 
radius : number

  The radius of this circle shape.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L44))   ### 
system : [Phaser.Physics.Ninja](phaser.physics.ninja)

  A reference to the physics system.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L29))   ### 
velocity : [Phaser.Point](phaser.point)

  The velocity of this object.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L85))   ### 
[readonly] width : number

  The width.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 62](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L62))   ### 
[readonly] xw : number

  Half the width.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L50))   ### 
[readonly] yw

  ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `xw` | number | Half the height. |

  Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L56))    Public Methods
--------------

  ### 
collideCircleVsTile(t) → {boolean}

  Collides this Circle with a Tile.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   boolean -   True if they collide, otherwise false.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L248))   ### 
collideWorldBounds()

  Collides this Circle against the world bounds.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 207](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L207))   ### 
destroy()

  Destroys this Circle's reference to Body and System

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 2612](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L2612))   ### 
integrate()

  Updates this Circles position.

   Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L112))   ### 
projCircle\_22DegB(x, y, oH, oV, obj, t) → {number}

  Resolves 22 Degree tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `oH` | number | Grid / voronoi region. |
| `oV` | number | Grid / voronoi region. |
| `obj` | [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle) | The Circle involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 1719](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L1719))   ### 
projCircle\_22DegS(x, y, oH, oV, obj, t) → {number}

  Resolves 22 Degree tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `oH` | number | Grid / voronoi region. |
| `oV` | number | Grid / voronoi region. |
| `obj` | [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle) | The Circle involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 1427](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L1427))   ### 
projCircle\_45Deg(x, y, oH, oV, obj, t) → {number}

  Resolves 45 Degree tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `oH` | number | Grid / voronoi region. |
| `oV` | number | Grid / voronoi region. |
| `obj` | [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle) | The Circle involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 447](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L447))   ### 
projCircle\_67DegB(x, y, oH, oV, obj, t) → {number}

  Resolves 67 Degree tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `oH` | number | Grid / voronoi region. |
| `oV` | number | Grid / voronoi region. |
| `obj` | [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle) | The Circle involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 2307](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L2307))   ### 
projCircle\_67DegS(x, y, oH, oV, obj, t) → {number}

  Resolves 67 Degree tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `oH` | number | Grid / voronoi region. |
| `oV` | number | Grid / voronoi region. |
| `obj` | [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle) | The Circle involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 2022](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L2022))   ### 
projCircle\_Concave(x, y, oH, oV, obj, t) → {number}

  Resolves Concave tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `oH` | number | Grid / voronoi region. |
| `oV` | number | Grid / voronoi region. |
| `obj` | [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle) | The Circle involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L717))   ### 
projCircle\_Convex(x, y, oH, oV, obj, t) → {number}

  Resolves Convex tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `oH` | number | Grid / voronoi region. |
| `oV` | number | Grid / voronoi region. |
| `obj` | [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle) | The Circle involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 951](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L951))   ### 
projCircle\_Full(x, y, oH, oV, obj, t) → {number}

  Resolves Full tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `oH` | number | Grid / voronoi region. |
| `oV` | number | Grid / voronoi region. |
| `obj` | [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle) | The Circle involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 335](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L335))   ### 
projCircle\_Half(x, y, oH, oV, obj, t) → {number}

  Resolves Half tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `oH` | number | Grid / voronoi region. |
| `oV` | number | Grid / voronoi region. |
| `obj` | [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle) | The Circle involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 1193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L1193))   ### 
render(context, xOffset, yOffset, color, filled)

  Render this circle for debugging purposes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `context` | object | The context to render to. |
| `xOffset` | number | X offset from circle's position to render at. |
| `yOffset` | number | Y offset from circle's position to render at. |
| `color` | string | color of the debug shape to be rendered. (format is css color string). |
| `filled` | boolean | Render the shape as solid (true) or hollow (false). |

  Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 2622](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L2622))   ### 
reportCollisionVsWorld(px, py, dx, dy, obj)

  Process a world collision and apply the resulting forces.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `px` | number | The tangent velocity |
| `py` | number | The tangent velocity |
| `dx` | number | Collision normal |
| `dy` | number | Collision normal |
| `obj` | number | Object this Circle collided with |

  Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L132))   ### 
resolveCircleTile(x, y, oH, oV, obj, t) → {number}

  Resolves tile collision.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Penetration depth on the x axis. |
| `y` | number | Penetration depth on the y axis. |
| `oH` | number | Grid / voronoi region. |
| `oV` | number | Grid / voronoi region. |
| `obj` | [Phaser.Physics.Ninja.Circle](phaser.physics.ninja.circle) | The Circle involved in the collision. |
| `t` | [Phaser.Physics.Ninja.Tile](phaser.physics.ninja.tile) | The Tile involved in the collision. |

 ##### Returns

   number -   The result of the collision.

    Source code: [physics/ninja/Circle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js) ([Line 310](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/ninja/Circle.js#L310))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.Ninja.Circle.html>

Class: Phaser.Physics.P2.FixtureList
====================================

 Constructor
-----------

 ### 
new FixtureList(list)

  Allow to access a list of created fixture (coming from Body#addPhaserPolygon)  
which itself parse the input from PhysicsEditor with the custom phaser exporter.  
You can access fixtures of a Body by a group index or even by providing a fixture Key.  
You can set the fixture key and also the group index for a fixture in PhysicsEditor.  
This gives you the power to create a complex body built of many fixtures and modify them  
during runtime (to remove parts, set masks, categories & sensor properties)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `list` | Array | A list of fixtures (from Phaser.Physics.P2.Body#addPhaserPolygon) |

  Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L23))   Public Methods
--------------

  ### 
flatten(array)

  A helper to flatten arrays. This is very useful as the fixtures are nested from time to time due to the way P2 creates and splits polygons.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `array` | array | The array to flatten. Notice: This will happen recursive not shallow. |

  Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 212](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L212))   ### 
getFixtureByKey(key)

  Accessor to get either a single fixture by its key.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the fixture. |

  Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 158](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L158))   ### 
getFixtures(keys)

  Accessor to get either a list of specified fixtures by key or the whole fixture list

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `keys` | array | A list of fixture keys |

  Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 123](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L123))   ### 
getGroup(groupID)

  Accessor to get a group of fixtures by its group index.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `groupID` | number | The group index. |

  Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L170))   ### 
init()

  Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L38))   ### 
parse()

  Parser for the output of Phaser.Physics.P2.Body#addPhaserPolygon

   Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 182](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L182))   ### 
setCategory(bit, fixtureKey)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `bit` | number | The bit to set as the collision group. |
| `fixtureKey` | string | Only apply to the fixture with the given key. |

  Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L63))   ### 
setMask(bit, fixtureKey)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `bit` | number | The bit to set as the collision mask |
| `fixtureKey` | string | Only apply to the fixture with the given key |

  Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L78))   ### 
setMaterial(material, fixtureKey)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `material` | Object | The contact material for a fixture |
| `fixtureKey` | string | Only apply to the fixture with the given key |

  Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 108](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L108))   ### 
setSensor(value, fixtureKey)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | boolean | sensor true or false |
| `fixtureKey` | string | Only apply to the fixture with the given key |

  Source code: [physics/p2/FixtureList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/FixtureList.js#L93))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.FixtureList.html>

Class: Phaser.Physics.P2.DistanceConstraint
===========================================

 Constructor
-----------

 ### 
new DistanceConstraint(world, bodyA, bodyB, distance, localAnchorA, localAnchorB, maxForce)

  A constraint that tries to keep the distance between two bodies constant.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `world` | [Phaser.Physics.P2](phaser.physics.p2) |  |  | A reference to the P2 World. |
| `bodyA` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `distance` | number |  |  | The distance to keep between the bodies. |
| `localAnchorA` | Array |  <optional> |  | The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0]. |
| `localAnchorB` | Array |  <optional> |  | The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0]. |
| `maxForce` | object |  <optional> |  Number.MAX\_VALUE  | Maximum force to apply. |

  Source code: [physics/p2/DistanceConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/DistanceConstraint.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/DistanceConstraint.js#L20))   Public Properties
-----------------

  ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/p2/DistanceConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/DistanceConstraint.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/DistanceConstraint.js#L30))   ### 
world : [Phaser.Physics.P2](phaser.physics.p2)

  Local reference to P2 World.

   Source code: [physics/p2/DistanceConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/DistanceConstraint.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/DistanceConstraint.js#L35))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.DistanceConstraint.html>

Class: Phaser.Physics.P2.GearConstraint
=======================================

 Constructor
-----------

 ### 
new GearConstraint(world, bodyA, bodyB, angle, ratio)

  Connects two bodies at given offset points, letting them rotate relative to each other around this point.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `world` | [Phaser.Physics.P2](phaser.physics.p2) |  |  | A reference to the P2 World. |
| `bodyA` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `angle` | number |  <optional> |  0  | The relative angle |
| `ratio` | number |  <optional> |  1  | The gear ratio. |

  Source code: [physics/p2/GearConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/GearConstraint.js) ([Line 18](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/GearConstraint.js#L18))   Public Properties
-----------------

  ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/p2/GearConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/GearConstraint.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/GearConstraint.js#L26))   ### 
world : [Phaser.Physics.P2](phaser.physics.p2)

  Local reference to P2 World.

   Source code: [physics/p2/GearConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/GearConstraint.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/GearConstraint.js#L31))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.GearConstraint.html>

Class: Phaser.TilemapLayer
==========================

 Constructor
-----------

 ### 
new TilemapLayer(game, tilemap, index, width, height)

  A TilemapLayer is a Phaser.Image/Sprite that renders a specific TileLayer of a Tilemap.

 Since a TilemapLayer is a Sprite it can be moved around the display, added to other groups or display objects, etc.

 By default TilemapLayers have fixedToCamera set to `true`. Changing this will break Camera follow and scrolling behavior.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Game reference to the currently running game. |
| `tilemap` | [Phaser.Tilemap](phaser.tilemap) | The tilemap to which this layer belongs. |
| `index` | integer | The index of the TileLayer to render within the Tilemap. |
| `width` | integer | Width of the renderable area of the layer (in pixels). |
| `height` | integer | Height of the renderable area of the layer (in pixels). |

  Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L23))   Extends
-------

 * [Phaser.Sprite](phaser.sprite)

 Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
anchor :Point

  The anchor sets the origin point of the texture.  
The default is 0,0 this means the texture's origin is the top left  
Setting than anchor to 0.5,0.5 means the textures origin is centered  
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

   Inherited From * [PIXI.Sprite#anchor](pixi.sprite#anchor)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L17))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

 Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

   Inherited From * [PIXI.Sprite#blendMode](pixi.sprite#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L82))   ### 
body : [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated  
properties and methods via it.

 By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

 To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object  
and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

 You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

 Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5,  
so the physics body is centered on the Game Object.

 If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  ##### Type

 * [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  Inherited From * [Phaser.Component.PhysicsBody#body](phaser.component.physicsbody#body)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L91))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
<internal> canvas :HTMLCanvasElement

  The canvas to which this TilemapLayer draws.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L59))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
checkWorldBounds : boolean

  If this is set to `true` the Game Object checks if it is within the World bounds each frame. 

 When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

 If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

 It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

 When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.InWorld#checkWorldBounds](phaser.component.inworld#checkWorldBounds)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L98))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
cropRect : [Phaser.Rectangle](phaser.rectangle)

  The Rectangle used to crop the texture this Game Object uses.  
Set this property via `crop`.  
If you modify this property directly you must call `updateCrop` in order to have the change take effect.

   Inherited From * [Phaser.Component.Crop#cropRect](phaser.component.crop#cropRect)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L24))   ### 
damage

  Damages the Game Object. This removes the given amount of health from the `health` property.

 If health is taken below or is equal to zero then the `kill` method is called.

   Inherited From * [Phaser.Component.Health#damage](phaser.component.health#damage)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L46))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  Enable an additional "debug rendering" pass to display collision information.

   Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L110))   ### 
debugSettings

  Settings used for debugging and diagnostics.

   ##### Properties:

  

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `missingImageFill` | string |  <nullable> | A tile is rendered as a rectangle using the following fill if a valid tileset/image cannot be found. A value of `null` prevents additional rendering for tiles without a valid tileset image. *This takes effect even when debug rendering for the layer is not enabled.* |
| `debuggedTileOverfill` | string |  <nullable> | If a Tile has `Tile#debug` true then, after normal tile image rendering, a rectangle with the following fill is drawn above/over it. *This takes effect even when debug rendering for the layer is not enabled.* |
| `forceFullRedraw` | boolean |  | When debug rendering (`debug` is true), and this option is enabled, the a full redraw is forced and rendering optimization is suppressed. |
| `debugAlpha` | number |  | When debug rendering (`debug` is true), the tileset is initially rendered with this alpha level. This can make the tile edges clearer. |
| `facingEdgeStroke` | string |  <nullable> | When debug rendering (`debug` is true), this color/stroke is used to draw "face" edges. A value of `null` disables coloring facing edges. |
| `collidingTileOverfill` | string |  <nullable> | When debug rendering (`debug` is true), this fill is used for tiles that are collidable. A value of `null` disables applying the additional overfill. |

  Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 133](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L133))   ### 
[readonly] deltaX : number

  Returns the delta x value. The difference between world.x now and in the previous frame.

 The value will be positive if the Game Object has moved to the right or negative if to the left.

   Inherited From * [Phaser.Component.Delta#deltaX](phaser.component.delta#deltaX)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L24))   ### 
[readonly] deltaY : number

  Returns the delta y value. The difference between world.y now and in the previous frame.

 The value will be positive if the Game Object has moved down or negative if up.

   Inherited From * [Phaser.Component.Delta#deltaY](phaser.component.delta#deltaY)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L42))   ### 
[readonly] deltaZ : number

  Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

   Inherited From * [Phaser.Component.Delta#deltaZ](phaser.component.delta#deltaZ)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L58))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
<internal> dirty : boolean

  If true tiles will be force rendered, even if such is not believed to be required.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L167))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if the core game loop and physics update this game object or not.

   Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L115))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
frame : integer

  Gets or sets the current frame index of the texture being used to render this Game Object.

 To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,  
for example: `player.frame = 4`.

 If the frame index given doesn't exist it will revert to the first frame found in the texture.

 If you are using a texture atlas then you should use the `frameName` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frame](phaser.component.loadtexture#frame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L254))   ### 
frameName : string

  Gets or sets the current frame name of the texture being used to render this Game Object.

 To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use,  
for example: `player.frameName = "idle"`.

 If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

 If you are using a sprite sheet then you should use the `frame` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frameName](phaser.component.loadtexture#frameName)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L279))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
heal

  Heal the Game Object. This adds the given amount of health to the `health` property.

   Inherited From * [Phaser.Component.Health#heal](phaser.component.health#heal)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L90))   ### 
health : number

  The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

 It can be used in combination with the `damage` method or modified directly.

   Inherited From * [Phaser.Component.Health#health](phaser.component.health#health)
 Default Value * 1
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L26))   ### 
height : number

  The height of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#height](pixi.sprite#height)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L144))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
<internal, readonly> index : number

  The index of this layer within the Tilemap.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L44))   ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Inherited From * [Phaser.Component.InputEnabled#input](phaser.component.inputenabled#input)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Inherited From * [Phaser.Component.InputEnabled#inputEnabled](phaser.component.inputenabled#inputEnabled)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   ### 
[readonly] inWorld : boolean

  Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

   Inherited From * [Phaser.Component.InWorld#inWorld](phaser.component.inworld#inWorld)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L129))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
<internal, readonly> layer : Object

  The layer object within the Tilemap that this layer represents.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L52))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
<internal, readonly> map : [Phaser.Tilemap](phaser.tilemap)

  The Tilemap to which this layer is bound.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L36))   ### 
maxHealth : number

  The Game Objects maximum health value. This works in combination with the `heal` method to ensure  
the health value never exceeds the maximum.

   Inherited From * [Phaser.Component.Health#maxHealth](phaser.component.health#maxHealth)
 Default Value * 100
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L35))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
outOfBoundsKill : boolean

  If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

   Inherited From * [Phaser.Component.InWorld#outOfBoundsKill](phaser.component.inworld#outOfBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L106))   ### 
outOfCameraBoundsKill : boolean

  If this and the `autoCull` property are both set to `true`, then the `kill` method  
is called as soon as the Game Object leaves the camera bounds.

   Inherited From * [Phaser.Component.InWorld#outOfCameraBoundsKill](phaser.component.inworld#outOfCameraBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L115))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L83))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
rayStepRate : integer

  When ray-casting against tiles this is the number of steps it will jump. For larger tile sizes you can increase this to improve performance.

   Default Value * 4
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L174))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
renderSettings

  Settings that control standard (non-diagnostic) rendering.

   ##### Properties:

  

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `enableScrollDelta` | boolean |  <optional> |  true  | Delta scroll rendering only draws tiles/edges as they come into view. This can greatly improve scrolling rendering performance, especially when there are many small tiles. It should only be disabled in rare cases. |
| `copyCanvas` | DOMCanvasElement |  <optional> <nullable> |  (auto)  | [Internal] If set, force using a separate (shared) copy canvas. Using a canvas bitblt/copy when the source and destinations region overlap produces unexpected behavior in some browsers, notably Safari. |

  Default Value * {"enableScrollDelta":false,"overdrawRatio":0.2,"copyCanvas":null}
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L98))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
scaleMax : [Phaser.Point](phaser.point)

  The maximum scale this Game Object will scale up to. 

 It allows you to prevent a parent from scaling this Game Object higher than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMax](phaser.component.scaleminmax#scaleMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L46))   ### 
scaleMin : [Phaser.Point](phaser.point)

  The minimum scale this Game Object will scale down to.

 It allows you to prevent a parent from scaling this Game Object lower than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMin](phaser.component.scaleminmax#scaleMin)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L36))   ### 
scrollFactorX : number

  Speed at which this layer scrolls horizontally, relative to the camera (e.g. scrollFactorX of 0.5 scrolls half as quickly as the 'normal' camera-locked layers do).

   Default Value * 1
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 152](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L152))   ### 
scrollFactorY : number

  Speed at which this layer scrolls vertically, relative to the camera (e.g. scrollFactorY of 0.5 scrolls half as quickly as the 'normal' camera-locked layers do)

   Default Value * 1
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L160))   ### 
setHealth

  Sets the health property of the Game Object to the given amount.  
Will never exceed the `maxHealth` value.

   Inherited From * [Phaser.Component.Health#setHealth](phaser.component.health#setHealth)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L70))   ### 
shader : [PIXI.AbstractFilter](pixi.abstractfilter)

  The shader that will be used to render this Sprite.  
Set to null to remove a current shader.

   Inherited From * [PIXI.Sprite#shader](pixi.sprite#shader)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L93))   ### 
smoothed : boolean

  Enable or disable texture smoothing for this Game Object.

 It only takes effect if the Game Object is using an image based texture.

 Smoothing is enabled by default.

   Inherited From * [Phaser.Component.Smoothed#smoothed](phaser.component.smoothed#smoothed)
 Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L25))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture that the sprite is using

   Inherited From * [PIXI.Sprite#texture](pixi.sprite#texture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L28))   ### 
tint : number

  The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

   Inherited From * [PIXI.Sprite#tint](pixi.sprite#tint)
 Default Value * 0xFFFFFF
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L54))   ### 
tintedTexture :Canvas

  A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

   Inherited From * [PIXI.Sprite#tintedTexture](pixi.sprite#tintedTexture)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L73))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
transformCallback : Function

  The callback that will apply any scale limiting to the worldTransform.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallback](phaser.component.scaleminmax#transformCallback)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L20))   ### 
transformCallbackContext : Object

  The context under which `transformCallback` is called.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallbackContext](phaser.component.scaleminmax#transformCallbackContext)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L26))   ### 
<internal, readonly> type : number

  The const type of this object.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Default Value * Phaser.TILEMAPLAYER
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L77))   ### 
width : number

  The width of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#width](pixi.sprite#width)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L125))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
x : number

  The position of the Game Object on the x axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#x](phaser.component.physicsbody#x)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L98))   ### 
y : number

  The position of the Game Object on the y axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#y](phaser.component.physicsbody#y)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L124))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#bringToTop](phaser.component.bringtotop#bringToTop)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
crop(rect, copy)

  Crop allows you to crop the texture being used to display this Game Object.  
Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

 Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,  
or by modifying `cropRect` property directly and then calling `updateCrop`.

 The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object  
so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

 A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`,  
in which case the values are duplicated to a local object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) |  |  | The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. |
| `copy` | boolean |  <optional> |  false  | If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect. |

  Inherited From * [Phaser.Component.Crop#crop](phaser.component.crop#crop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L49))   ### 
destroy()

  Destroys this TilemapLayer.

   Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 351](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L351))   ### 
<internal> ensureSharedCopyCanvas()

  Create if needed (and return) a shared copy canvas that is shared across all TilemapLayers.

 Code that uses the canvas is responsible to ensure the dimensions and save/restore state as appropriate.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 253](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L253))   ### 
getBounds(matrix) → {Rectangle}

  Returns the bounds of the Sprite as a rectangle.  
The bounds calculation takes the worldTransform into account.

 It is important to note that the transform is not updated when you call this method.  
So if this Sprite is the child of a Display Object which has had its transform  
updated since the last render pass, those changes will not yet have been applied  
to this Sprites worldTransform. If you need to ensure that all parent transforms  
are factored into this getBounds operation then you should call `updateTransform`  
on the root most object in this Sprites display list first.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Matrix | the transformation matrix of the sprite |

 ##### Returns

   Rectangle -   the framing rectangle

    Inherited From * [PIXI.Sprite#getBounds](pixi.sprite#getBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L199))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.Sprite#getLocalBounds](pixi.sprite#getLocalBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L315))   ### 
getRayCastTiles(line, stepRate, collides, interestingFace) → {Array.<[Phaser.Tile](phaser.tile)>}

  Gets all tiles that intersect with the given line.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `line` | [Phaser.Line](phaser.line) |  |  | The line used to determine which tiles to return. |
| `stepRate` | integer |  <optional> |  (rayStepRate)  | How many steps through the ray will we check? Defaults to `rayStepRate`. |
| `collides` | boolean |  <optional> |  false  | If true, *only* return tiles that collide on one or more faces. |
| `interestingFace` | boolean |  <optional> |  false  | If true, *only* return tiles that have interesting faces. |

 ##### Returns

   Array.<[Phaser.Tile](phaser.tile)> -   An array of Phaser.Tiles.

    Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 551](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L551))   ### 
getTiles(x, y, width, height, collides, interestingFace) → {array.<[Phaser.Tile](phaser.tile)>}

  Get all tiles that exist within the given area, defined by the top-left corner, width and height. Values given are in pixels, not tiles.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | X position of the top left corner (in pixels). |
| `y` | number |  |  | Y position of the top left corner (in pixels). |
| `width` | number |  |  | Width of the area to get (in pixels). |
| `height` | number |  |  | Height of the area to get (in pixels). |
| `collides` | boolean |  <optional> |  false  | If true, *only* return tiles that collide on one or more faces. |
| `interestingFace` | boolean |  <optional> |  false  | If true, *only* return tiles that have interesting faces. |

 ##### Returns

   array.<[Phaser.Tile](phaser.tile)> -   An array of Tiles.

    Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 598](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L598))   ### 
getTileX(x) → {integer}

  Convert a pixel value to a tile coordinate.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | X position of the point in target tile (in pixels). |

 ##### Returns

   integer -   The X map location of the tile.

    Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 502](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L502))   ### 
getTileXY(x, y, point) → {[Phaser.Point](phaser.point) | object}

  Convert a pixel coordinate to a tile coordinate.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | X position of the point in target tile (in pixels). |
| `y` | number | Y position of the point in target tile (in pixels). |
| `point` | [Phaser.Point](phaser.point) | object | The Point/object to update. |

 ##### Returns

   [Phaser.Point](phaser.point) | object -   A Point/object with its `x` and `y` properties set.

    Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 532](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L532))   ### 
getTileY(y) → {integer}

  Convert a pixel value to a tile coordinate.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `y` | number | Y position of the point in target tile (in pixels). |

 ##### Returns

   integer -   The Y map location of the tile.

    Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 517](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L517))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
loadTexture(key, frame, stopAnimation)

  Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

 If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

 You should only use `loadTexture` if you want to replace the base texture entirely.

 Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

 You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite.  
Doing this then sets the key to be the `frame` argument (the frame is set to zero). 

 This allows you to create sprites using `load.image` during development, and then change them  
to use a Texture Atlas later in development by simply searching your code for 'PENDING\_ATLAS'  
and swapping it to be the key of the atlas data.

 Note: You cannot use a RenderTexture as a texture for a TileSprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `stopAnimation` | boolean |  <optional> |  true  | If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. |

  Inherited From * [Phaser.Component.LoadTexture#loadTexture](phaser.component.loadtexture#loadTexture)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L51))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveDown](phaser.component.bringtotop#moveDown)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveUp](phaser.component.bringtotop#moveUp)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
overlap(displayObject) → {boolean}

  Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,  
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

 This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

 Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.  
It should be fine for low-volume testing where physics isn't required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Button](phaser.button) | PIXI.DisplayObject | The display object to check against. |

 ##### Returns

   boolean -   True if the bounds of this Game Object intersects at any point with the bounds of the given display object.

    Inherited From * [Phaser.Component.Overlap#overlap](phaser.component.overlap#overlap)
 Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L29))   ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays an Animation.

 The animation should have previously been created via `animations.add`.

 If the animation is already playing calling this again won't do anything.  
If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'. |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation.

    Inherited From * [Phaser.Component.Animation#play](phaser.component.animation#play)
 Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L31))   ### 
<internal> postUpdate()

  Automatically called by World.postUpdate. Handles cache updates.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L284))   ### 
preUpdate()

  Automatically called by World.preUpdate.

   Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 273](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L273))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
<internal> render()

  Renders the tiles to the layer canvas and pushes to the display.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 1045](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L1045))   ### 
reset(x, y, health) → {PIXI.DisplayObject}

  Resets the Game Object.

 This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`,  
`visible` and `renderable` to true.

 If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

 If this Game Object has a Physics Body it will reset the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Game Object at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Game Object at. |
| `health` | number |  <optional> |  1  | The health to give the Game Object if it has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.Reset#reset](phaser.component.reset#reset)
 Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L30))   ### 
resetFrame()

  Resets the texture frame dimensions that the Game Object uses for rendering.

   Inherited From * [Phaser.Component.LoadTexture#resetFrame](phaser.component.loadtexture#resetFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L232))   ### 
resetTilesetCache()

  The TilemapLayer caches tileset look-ups.

 Call this method of clear the cache if tilesets have been added or updated after the layer has been rendered.

   Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 693](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L693))   ### 
resize(width, height)

  Resizes the internal canvas and texture frame used by this TilemapLayer.

 This is an expensive call, so don't bind it to a window resize event! But instead call it at carefully  
selected times.

 Be aware that no validation of the new sizes takes place and the current map scroll coordinates are not  
modified either. You will have to handle both of these things from your game code if required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | The new width of the TilemapLayer |
| `height` | number | The new height of the TilemapLayer |

  Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 364](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L364))   ### 
resizeFrame(parent, width, height)

  Resizes the Frame dimensions that the Game Object uses for rendering.

 You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData  
it can be useful to adjust the dimensions directly in this way.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | object | The parent texture object that caused the resize, i.e. a Phaser.Video object. |
| `width` | integer | The new width of the texture. |
| `height` | integer | The new height of the texture. |

  Inherited From * [Phaser.Component.LoadTexture#resizeFrame](phaser.component.loadtexture#resizeFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L220))   ### 
resizeWorld()

  Sets the world size to match the size of this layer.

   Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 402](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L402))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#sendToBack](phaser.component.bringtotop#sendToBack)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setFrame(frame)

  Sets the texture frame the Game Object uses for rendering.

 This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The Frame to be used by the texture. |

  Inherited From * [Phaser.Component.LoadTexture#setFrame](phaser.component.loadtexture#setFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L155))   ### 
setScale(xScale, yScale)

  This method will set the scale of the tilemap as well as update the underlying block data of this layer.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `xScale` | number |  <optional> |  1  | The scale factor along the X-plane |
| `yScale` | number |  <optional> |  | The scale factor along the Y-plane |

  Source code: [tilemap/TilemapLayer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js) ([Line 712](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tilemap/TilemapLayer.js#L712))   ### 
setScaleMinMax(minX, minY, maxX, maxY)

  Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

 For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored  
and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

 By setting these values you can carefully control how Game Objects deal with responsive scaling.

 If only one parameter is given then that value will be used for both scaleMin and scaleMax:  
`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

 If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:  
`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

 If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly,  
or pass `null` for the `maxX` and `maxY` parameters.

 Call `setScaleMinMax(null)` to clear all previously set values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `minX` | number | null | The minimum horizontal scale value this Game Object can scale down to. |
| `minY` | number | null | The minimum vertical scale value this Game Object can scale down to. |
| `maxX` | number | null | The maximum horizontal scale value this Game Object can scale up to. |
| `maxY` | number | null | The maximum vertical scale value this Game Object can scale up to. |

  Inherited From * [Phaser.Component.ScaleMinMax#setScaleMinMax](phaser.component.scaleminmax#setScaleMinMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L110))   ### 
setTexture(texture, destroy)

  Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous  
texture this Sprite was using.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) |  |  | The PIXI texture that is displayed by the sprite |
| `destroy` | Boolean |  <optional> |  false  | Call Texture.destroy on the current texture before replacing it with the new one? |

  Inherited From * [PIXI.Sprite#setTexture](pixi.sprite#setTexture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L163))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Override this method in your own custom objects to handle any update requirements.  
It is called immediately after `preUpdate` and before `postUpdate`.  
Remember if this Game Object has any children you should call update on those too.

   Inherited From * [Phaser.Component.Core#update](phaser.component.core#update)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L328))   ### 
updateCrop()

  If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,  
or the rectangle it references, then you need to update the crop frame by calling this method.

   Inherited From * [Phaser.Component.Crop#updateCrop](phaser.component.crop#updateCrop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L86))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.TilemapLayer.html>

Class: Phaser.Physics.P2.LockConstraint
=======================================

 Constructor
-----------

 ### 
new LockConstraint(world, bodyA, bodyB, offset, angle, maxForce)

  Locks the relative position between two bodies.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `world` | [Phaser.Physics.P2](phaser.physics.p2) |  |  | A reference to the P2 World. |
| `bodyA` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `offset` | Array |  <optional> |  | The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `angle` | number |  <optional> |  0  | The angle of bodyB in bodyA's frame. |
| `maxForce` | number |  <optional> |  | The maximum force that should be applied to constrain the bodies. |

  Source code: [physics/p2/LockConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/LockConstraint.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/LockConstraint.js#L19))   Public Properties
-----------------

  ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/p2/LockConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/LockConstraint.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/LockConstraint.js#L28))   ### 
world : [Phaser.Physics.P2](phaser.physics.p2)

  Local reference to P2 World.

   Source code: [physics/p2/LockConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/LockConstraint.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/LockConstraint.js#L33))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.LockConstraint.html>

Class: Phaser.Physics.P2.PrismaticConstraint
============================================

 Constructor
-----------

 ### 
new PrismaticConstraint(world, bodyA, bodyB, lockRotation, anchorA, anchorB, axis, maxForce)

  Connects two bodies at given offset points, letting them rotate relative to each other around this point.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `world` | [Phaser.Physics.P2](phaser.physics.p2) |  |  | A reference to the P2 World. |
| `bodyA` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `lockRotation` | boolean |  <optional> |  true  | If set to false, bodyB will be free to rotate around its anchor point. |
| `anchorA` | Array |  <optional> |  | Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `anchorB` | Array |  <optional> |  | Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `axis` | Array |  <optional> |  | An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `maxForce` | number |  <optional> |  | The maximum force that should be applied to constrain the bodies. |

  Source code: [physics/p2/PrismaticConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PrismaticConstraint.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PrismaticConstraint.js#L21))   Public Properties
-----------------

  ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/p2/PrismaticConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PrismaticConstraint.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PrismaticConstraint.js#L32))   ### 
world : [Phaser.Physics.P2](phaser.physics.p2)

  Local reference to P2 World.

   Source code: [physics/p2/PrismaticConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PrismaticConstraint.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PrismaticConstraint.js#L37))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.PrismaticConstraint.html>

Class: Phaser.Physics.P2.RevoluteConstraint
===========================================

 Constructor
-----------

 ### 
new RevoluteConstraint(world, bodyA, pivotA, bodyB, pivotB, maxForce, worldPivot)

  Connects two bodies at given offset points, letting them rotate relative to each other around this point.  
The pivot points are given in world (pixel) coordinates.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `world` | [Phaser.Physics.P2](phaser.physics.p2) |  |  | A reference to the P2 World. |
| `bodyA` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `pivotA` | Float32Array |  |  | The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `bodyB` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `pivotB` | Float32Array |  |  | The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `maxForce` | number |  <optional> |  0  | The maximum force that should be applied to constrain the bodies. |
| `worldPivot` | Float32Array |  <optional> |  null  | A pivot point given in world coordinates. If specified, localPivotA and localPivotB are automatically computed from this value. |

  Source code: [physics/p2/RevoluteConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RevoluteConstraint.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RevoluteConstraint.js#L21))   Public Properties
-----------------

  ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/p2/RevoluteConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RevoluteConstraint.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RevoluteConstraint.js#L29))   ### 
world : [Phaser.Physics.P2](phaser.physics.p2)

  Local reference to P2 World.

   Source code: [physics/p2/RevoluteConstraint.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RevoluteConstraint.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RevoluteConstraint.js#L34))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.RevoluteConstraint.html>

Class: Phaser.Physics.P2.InversePointProxy
==========================================

 Constructor
-----------

 ### 
new InversePointProxy(world, destination)

  A InversePointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays but inverses the values on set.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `world` | [Phaser.Physics.P2](phaser.physics.p2) | A reference to the P2 World. |
| `destination` | any | The object to bind to. |

  Source code: [physics/p2/InversePointProxy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/InversePointProxy.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/InversePointProxy.js#L15))   Public Properties
-----------------

  ### 
mx : number

  The x property of this InversePointProxy get and set in meters.

   Source code: [physics/p2/InversePointProxy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/InversePointProxy.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/InversePointProxy.js#L64))   ### 
my : number

  The y property of this InversePointProxy get and set in meters.

   Source code: [physics/p2/InversePointProxy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/InversePointProxy.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/InversePointProxy.js#L84))   ### 
x : number

  The x property of this InversePointProxy get and set in pixels.

   Source code: [physics/p2/InversePointProxy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/InversePointProxy.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/InversePointProxy.js#L24))   ### 
y : number

  The y property of this InversePointProxy get and set in pixels.

   Source code: [physics/p2/InversePointProxy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/InversePointProxy.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/InversePointProxy.js#L44))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.InversePointProxy.html>

Class: Phaser.Physics.Arcade
============================

 Constructor
-----------

 ### 
new Arcade(game)

  The Arcade Physics world. Contains Arcade Physics related collision, overlap and motion methods.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | reference to the current game instance. |

  Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L14))   Classes
-------

   [Body](phaser.physics.arcade.body)   [TilemapCollision](phaser.physics.arcade.tilemapcollision)   Public Properties
-----------------

  ### 
[static] BOTTOM\_TOP : number

  A constant used for the sortDirection value.  
Use this if your game world is narrow but tall and scrolls from the bottom to the top (i.e. Commando or a vertically scrolling shoot-em-up)

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L130))   ### 
[static] LEFT\_RIGHT : number

  A constant used for the sortDirection value.  
Use this if your game world is wide but short and scrolls from the left to the right (i.e. Mario)

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L106))   ### 
[static] RIGHT\_LEFT : number

  A constant used for the sortDirection value.  
Use this if your game world is wide but short and scrolls from the right to the left (i.e. Mario backwards)

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 114](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L114))   ### 
[static] SORT\_NONE : number

  A constant used for the sortDirection value.  
Use this if you don't wish to perform any pre-collision sorting at all, or will manually sort your Groups.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L98))   ### 
[static] TOP\_BOTTOM : number

  A constant used for the sortDirection value.  
Use this if your game world is narrow but tall and scrolls from the top to the bottom (i.e. Dig Dug)

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 122](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L122))   ### 
bounds : [Phaser.Rectangle](phaser.rectangle)

  The bounds inside of which the physics world exists. Defaults to match the world bounds.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L29))   ### 
checkCollision : Object

  Set the checkCollision properties to control for which bounds collision is processed.  
For example checkCollision.down = false means Bodies cannot collide with the World.bounds.bottom. An object containing allowed collision flags.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L36))   ### 
forceX : boolean

  If true World.separate will always separate on the X axis before Y. Otherwise it will check gravity totals first.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L56))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L19))   ### 
gravity : [Phaser.Point](phaser.point)

  The World gravity setting. Defaults to x: 0, y: 0, or no gravity.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L24))   ### 
isPaused : boolean

  If `true` the `Body.preUpdate` method will be skipped, halting all motion for all bodies. Note that other methods such as `collide` will still work, so be careful not to call them on paused bodies.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L72))   ### 
maxLevels : number

  Used by the QuadTree to set the maximum number of iteration levels.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L46))   ### 
maxObjects : number

  Used by the QuadTree to set the maximum number of objects per quad.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 41](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L41))   ### 
OVERLAP\_BIAS : number

  A value added to the delta values during collision checks.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L51))   ### 
quadTree : [Phaser.QuadTree](phaser.quadtree)

  The world QuadTree.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L77))   ### 
skipQuadTree : boolean

  If true the QuadTree will not be used for any collision. QuadTrees are great if objects are well spread out in your game, otherwise they are a performance hit. If you enable this you can disable on a per body basis via `Body.skipQuadTree`.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 67](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L67))   ### 
sortDirection : number

  Used when colliding a Sprite vs. a Group, or a Group vs. a Group, this defines the direction the sort is based on. Default is Phaser.Physics.Arcade.LEFT\_RIGHT.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 62](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L62))    Public Methods
--------------

  ### 
accelerateToObject(displayObject, destination, speed, xSpeedMax, ySpeedMax) → {number}

  Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.)  
You must give a maximum speed value, beyond which the display object won't go any faster.  
Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.  
Note: The display object doesn't stop moving once it reaches the destination coordinates.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | any |  |  | The display object to move. |
| `destination` | any |  |  | The display object to move towards. Can be any object but must have visible x/y properties. |
| `speed` | number |  <optional> |  60  | The speed it will accelerate in pixels per second. |
| `xSpeedMax` | number |  <optional> |  500  | The maximum x velocity the display object can reach. |
| `ySpeedMax` | number |  <optional> |  500  | The maximum y velocity the display object can reach. |

 ##### Returns

   number -   The angle (in radians) that the object should be visually set to in order to match its new trajectory.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1829](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1829))   ### 
accelerateToPointer(displayObject, pointer, speed, xSpeedMax, ySpeedMax) → {number}

  Sets the acceleration.x/y property on the display object so it will move towards the target at the given speed (in pixels per second sq.)  
You must give a maximum speed value, beyond which the display object won't go any faster.  
Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.  
Note: The display object doesn't stop moving once it reaches the destination coordinates.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | any |  |  | The display object to move. |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  <optional> |  | The pointer to move towards. Defaults to Phaser.Input.activePointer. |
| `speed` | number |  <optional> |  60  | The speed it will accelerate in pixels per second. |
| `xSpeedMax` | number |  <optional> |  500  | The maximum x velocity the display object can reach. |
| `ySpeedMax` | number |  <optional> |  500  | The maximum y velocity the display object can reach. |

 ##### Returns

   number -   The angle (in radians) that the object should be visually set to in order to match its new trajectory.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1858](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1858))   ### 
accelerateToXY(displayObject, x, y, speed, xSpeedMax, ySpeedMax) → {number}

  Sets the acceleration.x/y property on the display object so it will move towards the x/y coordinates at the given speed (in pixels per second sq.)  
You must give a maximum speed value, beyond which the display object won't go any faster.  
Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.  
Note: The display object doesn't stop moving once it reaches the destination coordinates.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | any |  |  | The display object to move. |
| `x` | number |  |  | The x coordinate to accelerate towards. |
| `y` | number |  |  | The y coordinate to accelerate towards. |
| `speed` | number |  <optional> |  60  | The speed it will accelerate in pixels per second. |
| `xSpeedMax` | number |  <optional> |  500  | The maximum x velocity the display object can reach. |
| `ySpeedMax` | number |  <optional> |  500  | The maximum y velocity the display object can reach. |

 ##### Returns

   number -   The angle (in radians) that the object should be visually set to in order to match its new trajectory.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1888](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1888))   ### 
accelerationFromRotation(rotation, speed, point) → {[Phaser.Point](phaser.point)}

  Given the rotation (in radians) and speed calculate the acceleration and return it as a Point object, or set it to the given point object.  
One way to use this is: accelerationFromRotation(rotation, 200, sprite.acceleration) which will set the values directly to the sprites acceleration and not create a new Point object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rotation` | number |  |  | The angle in radians. |
| `speed` | number |  <optional> |  60  | The speed it will move, in pixels per second sq. |
| `point` | [Phaser.Point](phaser.point) | object |  <optional> |  | The Point object in which the x and y properties will be set to the calculated acceleration. |

 ##### Returns

   [Phaser.Point](phaser.point) -   * A Point where point.x contains the acceleration x value and point.y contains the acceleration y value.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1810](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1810))   ### 
angleBetween(source, target, world) → {number}

  Find the angle in radians between two display objects (like Sprites).

 The optional `world` argument allows you to return the result based on the Game Objects `world` property,  
instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,  
or parent Game Object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `source` | any |  |  | The Display Object to test from. |
| `target` | any |  |  | The Display Object to test to. |
| `world` | boolean |  <optional> |  false  | Calculate the angle using World coordinates (true), or Object coordinates (false, the default) |

 ##### Returns

   number -   The angle in radians between the source and target display objects.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1996](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1996))   ### 
angleBetweenCenters(source, target) → {number}

  Find the angle in radians between centers of two display objects (like Sprites).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `source` | any | The Display Object to test from. |
| `target` | any | The Display Object to test to. |

 ##### Returns

   number -   The angle in radians between the source and target display objects.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 2024](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L2024))   ### 
angleToPointer(displayObject, pointer, world) → {number}

  Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account.

 The optional `world` argument allows you to return the result based on the Game Objects `world` property,  
instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,  
or parent Game Object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | any |  |  | The Display Object to test from. |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  <optional> |  | The Phaser.Pointer to test to. If none is given then Input.activePointer is used. |
| `world` | boolean |  <optional> |  false  | Calculate the angle using World coordinates (true), or Object coordinates (false, the default) |

 ##### Returns

   number -   The angle in radians between displayObject.x/y to Pointer.x/y

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 2070](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L2070))   ### 
angleToXY(displayObject, x, y, world) → {number}

  Find the angle in radians between a display object (like a Sprite) and the given x/y coordinate.

 The optional `world` argument allows you to return the result based on the Game Objects `world` property,  
instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,  
or parent Game Object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | any |  |  | The Display Object to test from. |
| `x` | number |  |  | The x coordinate to get the angle to. |
| `y` | number |  |  | The y coordinate to get the angle to. |
| `world` | boolean |  <optional> |  false  | Calculate the angle using World coordinates (true), or Object coordinates (false, the default) |

 ##### Returns

   number -   The angle in radians between displayObject.x/y to Pointer.x/y

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 2041](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L2041))   ### 
circleBodyIntersects(circle, body) → {boolean}

  Checks to see if a circular Body intersects with a Rectangular Body.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `circle` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | The Body with `isCircle` set. |
| `body` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | The Body with `isCircle` not set (i.e. uses Rectangle shape) |

 ##### Returns

   boolean -   Returns true if the bodies intersect, otherwise false.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1125))   ### 
collide(object1, object2, collideCallback, processCallback, callbackContext) → {boolean}

  Checks for collision between two game objects. You can perform Sprite vs. Sprite, Sprite vs. Group, Group vs. Group, Sprite vs. Tilemap Layer or Group vs. Tilemap Layer collisions.  
Both the first and second parameter can be arrays of objects, of differing types.  
If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter.  
The objects are also automatically separated. If you don't require separation then use ArcadePhysics.overlap instead.  
An optional processCallback can be provided. If given this function will be called when two sprites are found to be colliding. It is called before any separation takes place,  
giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped.  
The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called.  
NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups or Tilemaps within other Groups).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object1` | [Phaser.Sprite](phaser.sprite) | [Phaser.Group](phaser.group) | Phaser.Particles.Emitter | [Phaser.TilemapLayer](phaser.tilemaplayer) | array |  |  | The first object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.TilemapLayer. |
| `object2` | [Phaser.Sprite](phaser.sprite) | [Phaser.Group](phaser.group) | Phaser.Particles.Emitter | [Phaser.TilemapLayer](phaser.tilemaplayer) | array |  |  | The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.TilemapLayer. |
| `collideCallback` | function |  <optional> |  null  | An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them, unless you are colliding Group vs. Sprite, in which case Sprite will always be the first parameter. |
| `processCallback` | function |  <optional> |  null  | A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them, unless you are colliding Group vs. Sprite, in which case Sprite will always be the first parameter. |
| `callbackContext` | object |  <optional> |  | The context in which to run the callbacks. |

 ##### Returns

   boolean -   True if a collision occurred otherwise false.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 375](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L375))   ### 
computeVelocity(axis, body, velocity, acceleration, drag, max) → {number}

  A tween-like function that takes a starting velocity and some other factors and returns an altered velocity.  
Based on a function in Flixel by @ADAMATOMIC

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `axis` | number |  |  | 0 for nothing, 1 for horizontal, 2 for vertical. |
| `body` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) |  |  | The Body object to be updated. |
| `velocity` | number |  |  | Any component of velocity (e.g. 20). |
| `acceleration` | number |  |  | Rate at which the velocity is changing. |
| `drag` | number |  |  | Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set. |
| `max` | number |  <optional> |  10000  | An absolute value cap for the velocity. |

 ##### Returns

   number -   The altered Velocity value.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 257](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L257))   ### 
distanceBetween(source, target, world) → {number}

  Find the distance between two display objects (like Sprites).

 The optional `world` argument allows you to return the result based on the Game Objects `world` property,  
instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,  
or parent Game Object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `source` | any |  |  | The Display Object to test from. |
| `target` | any |  |  | The Display Object to test to. |
| `world` | boolean |  <optional> |  false  | Calculate the distance using World coordinates (true), or Object coordinates (false, the default) |

 ##### Returns

   number -   The distance between the source and target objects.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1918](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1918))   ### 
distanceToPointer(displayObject, pointer, world) → {number}

  Find the distance between a display object (like a Sprite) and a Pointer. If no Pointer is given the Input.activePointer is used.  
The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed.  
If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

 The optional `world` argument allows you to return the result based on the Game Objects `world` property,  
instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,  
or parent Game Object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | any |  |  | The Display Object to test from. |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  <optional> |  | The Phaser.Pointer to test to. If none is given then Input.activePointer is used. |
| `world` | boolean |  <optional> |  false  | Calculate the distance using World coordinates (true), or Object coordinates (false, the default) |

 ##### Returns

   number -   The distance between the object and the Pointer.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1969))   ### 
distanceToXY(displayObject, x, y, world) → {number}

  Find the distance between a display object (like a Sprite) and the given x/y coordinates.  
The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed.  
If you need to calculate from the center of a display object instead use the method distanceBetweenCenters()

 The optional `world` argument allows you to return the result based on the Game Objects `world` property,  
instead of its `x` and `y` values. This is useful of the object has been nested inside an offset Group,  
or parent Game Object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | any |  |  | The Display Object to test from. |
| `x` | number |  |  | The x coordinate to move towards. |
| `y` | number |  |  | The y coordinate to move towards. |
| `world` | boolean |  <optional> |  false  | Calculate the distance using World coordinates (true), or Object coordinates (false, the default) |

 ##### Returns

   number -   The distance between the object and the x/y coordinates.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1942](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1942))   ### 
enable(object, children)

  This will create an Arcade Physics body on the given game object or array of game objects.  
A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object` | object | array | [Phaser.Group](phaser.group) |  |  | The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. |
| `children` | boolean |  <optional> |  true  | Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. |

  Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L160))   ### 
enableBody(object)

  Creates an Arcade Physics body on the given game object.

 A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

 When you add an Arcade Physics body to an object it will automatically add the object into its parent Groups hash array.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | object | The game object to create the physics body on. A body will only be created if this object has a null `body` property. |

  Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 216](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L216))   ### 
getObjectsAtLocation(x, y, group, callback, callbackContext, callbackArg) → {Array.<PIXI.DisplayObject>}

  Given a Group and a location this will check to see which Group children overlap with the coordinates.  
Each child will be sent to the given callback for further processing.  
Note that the children are not checked for depth order, but simply if they overlap the coordinate or not.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  | The x coordinate to check. |
| `y` | number |  | The y coordinate to check. |
| `group` | [Phaser.Group](phaser.group) |  | The Group to check. |
| `callback` | function |  <optional> | A callback function that is called if the object overlaps the coordinates. The callback will be sent two parameters: the callbackArg and the Object that overlapped the location. |
| `callbackContext` | object |  <optional> | The context in which to run the callback. |
| `callbackArg` | object |  <optional> | An argument to pass to the callback. |

 ##### Returns

   Array.<PIXI.DisplayObject> -   An array of the Sprites from the Group that overlapped the coordinates.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1622](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1622))   ### 
getObjectsUnderPointer(pointer, group, callback, callbackContext) → {Array.<PIXI.DisplayObject>}

  Given a Group and a Pointer this will check to see which Group children overlap with the Pointer coordinates.  
Each child will be sent to the given callback for further processing.  
Note that the children are not checked for depth order, but simply if they overlap the Pointer or not.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  | The Pointer to check. |
| `group` | [Phaser.Group](phaser.group) |  | The Group to check. |
| `callback` | function |  <optional> | A callback function that is called if the object overlaps with the Pointer. The callback will be sent two parameters: the Pointer and the Object that overlapped with it. |
| `callbackContext` | object |  <optional> | The context in which to run the callback. |

 ##### Returns

   Array.<PIXI.DisplayObject> -   An array of the Sprites from the Group that overlapped the Pointer coordinates.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1599](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1599))   ### 
getOverlapX(body1, body2, overlapOnly) → {float}

  Calculates the horizontal overlap between two Bodies and sets their properties accordingly, including:  
`touching.left`, `touching.right` and `overlapX`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `body1` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | The first Body to separate. |
| `body2` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | The second Body to separate. |
| `overlapOnly` | boolean | Is this an overlap only check, or part of separation? |

 ##### Returns

   float -   Returns the amount of horizontal overlap between the two bodies.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1331](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1331))   ### 
getOverlapY(body1, body2, overlapOnly) → {float}

  Calculates the vertical overlap between two Bodies and sets their properties accordingly, including:  
`touching.up`, `touching.down` and `overlapY`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `body1` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | The first Body to separate. |
| `body2` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | The second Body to separate. |
| `overlapOnly` | boolean | Is this an overlap only check, or part of separation? |

 ##### Returns

   float -   Returns the amount of vertical overlap between the two bodies.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1395](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1395))   ### 
intersects(body1, body2) → {boolean}

  Check for intersection against two bodies.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `body1` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | The first Body object to check. |
| `body2` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | The second Body object to check. |

 ##### Returns

   boolean -   True if they intersect, otherwise false.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1061](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1061))   ### 
moveToObject(displayObject, destination, speed, maxTime) → {number}

  Move the given display object towards the destination object at a steady velocity.  
If you specify a maxTime then it will adjust the speed (overwriting what you set) so it arrives at the destination in that number of seconds.  
Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.  
Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.  
Note: The display object doesn't stop moving once it reaches the destination coordinates.  
Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | any |  |  | The display object to move. |
| `destination` | any |  |  | The display object to move towards. Can be any object but must have visible x/y properties. |
| `speed` | number |  <optional> |  60  | The speed it will move, in pixels per second (default is 60 pixels/sec) |
| `maxTime` | number |  <optional> |  0  | Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. |

 ##### Returns

   number -   The angle (in radians) that the object should be visually set to in order to match its new velocity.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1666](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1666))   ### 
moveToPointer(displayObject, speed, pointer, maxTime) → {number}

  Move the given display object towards the pointer at a steady velocity. If no pointer is given it will use Phaser.Input.activePointer.  
If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.  
Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.  
Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.  
Note: The display object doesn't stop moving once it reaches the destination coordinates.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | any |  |  | The display object to move. |
| `speed` | number |  <optional> |  60  | The speed it will move, in pixels per second (default is 60 pixels/sec) |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  <optional> |  | The pointer to move towards. Defaults to Phaser.Input.activePointer. |
| `maxTime` | number |  <optional> |  0  | Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. |

 ##### Returns

   number -   The angle (in radians) that the object should be visually set to in order to match its new velocity.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1701](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1701))   ### 
moveToXY(displayObject, x, y, speed, maxTime) → {number}

  Move the given display object towards the x/y coordinates at a steady velocity.  
If you specify a maxTime then it will adjust the speed (over-writing what you set) so it arrives at the destination in that number of seconds.  
Timings are approximate due to the way browser timers work. Allow for a variance of +- 50ms.  
Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course.  
Note: The display object doesn't stop moving once it reaches the destination coordinates.  
Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all)

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `displayObject` | any |  |  | The display object to move. |
| `x` | number |  |  | The x coordinate to move towards. |
| `y` | number |  |  | The y coordinate to move towards. |
| `speed` | number |  <optional> |  60  | The speed it will move, in pixels per second (default is 60 pixels/sec) |
| `maxTime` | number |  <optional> |  0  | Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. |

 ##### Returns

   number -   The angle (in radians) that the object should be visually set to in order to match its new velocity.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1736](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1736))   ### 
overlap(object1, object2, overlapCallback, processCallback, callbackContext) → {boolean}

  Checks for overlaps between two game objects. The objects can be Sprites, Groups or Emitters.  
You can perform Sprite vs. Sprite, Sprite vs. Group and Group vs. Group overlap checks.  
Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results.  
Both the first and second parameter can be arrays of objects, of differing types.  
If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter.  
NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups within Groups).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object1` | [Phaser.Sprite](phaser.sprite) | [Phaser.Group](phaser.group) | Phaser.Particles.Emitter | array |  |  | The first object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. |
| `object2` | [Phaser.Sprite](phaser.sprite) | [Phaser.Group](phaser.group) | Phaser.Particles.Emitter | array |  |  | The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. |
| `overlapCallback` | function |  <optional> |  null  | An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them, unless you are checking Group vs. Sprite, in which case Sprite will always be the first parameter. |
| `processCallback` | function |  <optional> |  null  | A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then `overlapCallback` will only be called if this callback returns `true`. |
| `callbackContext` | object |  <optional> |  | The context in which to run the callbacks. |

 ##### Returns

   boolean -   True if an overlap occurred otherwise false.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 318](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L318))   ### 
setBounds(x, y, width, height)

  Updates the size of this physics world.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Top left most corner of the world. |
| `y` | number | Top left most corner of the world. |
| `width` | number | New width of the world. Can never be smaller than the Game.width. |
| `height` | number | New height of the world. Can never be smaller than the Game.height. |

  Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 134](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L134))   ### 
setBoundsToWorld()

  Updates the size of this physics world to match the size of the game world.

   Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L149))   ### 
sort(group, sortDirection)

  This method will sort a Groups hash array.

 If the Group has `physicsSortDirection` set it will use the sort direction defined.

 Otherwise if the sortDirection parameter is undefined, or Group.physicsSortDirection is null, it will use Phaser.Physics.Arcade.sortDirection.

 By changing Group.physicsSortDirection you can customise each Group to sort in a different order.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `group` | [Phaser.Group](phaser.group) |  | The Group to sort. |
| `sortDirection` | integer |  <optional> | The sort direction used to sort this Group. |

  Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 518](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L518))   ### 
sortBottomTop(a, b) → {integer}

  A Sort function for sorting two bodies based on a BOTTOM to TOP sort direction.

 This is called automatically by World.sort

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Sprite](phaser.sprite) | The first Sprite to test. The Sprite must have an Arcade Physics Body. |
| `b` | [Phaser.Sprite](phaser.sprite) | The second Sprite to test. The Sprite must have an Arcade Physics Body. |

 ##### Returns

   integer -   A negative value if `a > b`, a positive value if `a < b` or 0 if `a === b` or the bodies are invalid.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 497](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L497))   ### 
sortLeftRight(a, b) → {integer}

  A Sort function for sorting two bodies based on a LEFT to RIGHT sort direction.

 This is called automatically by World.sort

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Sprite](phaser.sprite) | The first Sprite to test. The Sprite must have an Arcade Physics Body. |
| `b` | [Phaser.Sprite](phaser.sprite) | The second Sprite to test. The Sprite must have an Arcade Physics Body. |

 ##### Returns

   integer -   A negative value if `a > b`, a positive value if `a < b` or 0 if `a === b` or the bodies are invalid.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 434](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L434))   ### 
sortRightLeft(a, b) → {integer}

  A Sort function for sorting two bodies based on a RIGHT to LEFT sort direction.

 This is called automatically by World.sort

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Sprite](phaser.sprite) | The first Sprite to test. The Sprite must have an Arcade Physics Body. |
| `b` | [Phaser.Sprite](phaser.sprite) | The second Sprite to test. The Sprite must have an Arcade Physics Body. |

 ##### Returns

   integer -   A negative value if `a > b`, a positive value if `a < b` or 0 if `a === b` or the bodies are invalid.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 455](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L455))   ### 
sortTopBottom(a, b) → {integer}

  A Sort function for sorting two bodies based on a TOP to BOTTOM sort direction.

 This is called automatically by World.sort

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | [Phaser.Sprite](phaser.sprite) | The first Sprite to test. The Sprite must have an Arcade Physics Body. |
| `b` | [Phaser.Sprite](phaser.sprite) | The second Sprite to test. The Sprite must have an Arcade Physics Body. |

 ##### Returns

   integer -   A negative value if `a > b`, a positive value if `a < b` or 0 if `a === b` or the bodies are invalid.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 476](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L476))   ### 
updateMotion(The)

  Called automatically by a Physics body, it updates all motion related values on the Body unless `World.isPaused` is `true`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `The` | [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | Body object to be updated. |

  Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L240))   ### 
velocityFromAngle(angle, speed, point) → {[Phaser.Point](phaser.point)}

  Given the angle (in degrees) and speed calculate the velocity and return it as a Point object, or set it to the given point object.  
One way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `angle` | number |  |  | The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative) |
| `speed` | number |  <optional> |  60  | The speed it will move, in pixels per second sq. |
| `point` | [Phaser.Point](phaser.point) | object |  <optional> |  | The Point object in which the x and y properties will be set to the calculated velocity. |

 ##### Returns

   [Phaser.Point](phaser.point) -   * A Point where point.x contains the velocity x value and point.y contains the velocity y value.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1772](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1772))   ### 
velocityFromRotation(rotation, speed, point) → {[Phaser.Point](phaser.point)}

  Given the rotation (in radians) and speed calculate the velocity and return it as a Point object, or set it to the given point object.  
One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rotation` | number |  |  | The angle in radians. |
| `speed` | number |  <optional> |  60  | The speed it will move, in pixels per second sq. |
| `point` | [Phaser.Point](phaser.point) | object |  <optional> |  | The Point object in which the x and y properties will be set to the calculated velocity. |

 ##### Returns

   [Phaser.Point](phaser.point) -   * A Point where point.x contains the velocity x value and point.y contains the velocity y value.

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 1791](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L1791))   ### 
worldAngleToPointer(displayObject, pointer) → {number}

  Find the angle in radians between a display object (like a Sprite) and a Pointer,  
taking their x/y and center into account relative to the world.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `displayObject` | any |  | The DisplayObjerct to test from. |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  <optional> | The Phaser.Pointer to test to. If none is given then Input.activePointer is used. |

 ##### Returns

   number -   The angle in radians between displayObject.world.x/y to Pointer.worldX / worldY

    Source code: [physics/arcade/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js) ([Line 2099](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/World.js#L2099))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.Arcade.html>

Class: Phaser.Particle
======================

 Constructor
-----------

 ### 
new Particle(game, x, y, key, frame)

  Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `x` | number | The x coordinate (in world space) to position the Particle at. |
| `y` | number | The y coordinate (in world space) to position the Particle at. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [PIXI.Texture](pixi.texture) | This is the image or texture used by the Particle 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 Particle 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. |

  Source code: [gameobjects/Particle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js#L19))   Extends
-------

 * [Phaser.Sprite](phaser.sprite)

 Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
<internal> alphaData :array

  A reference to the alphaData array owned by the Emitter that emitted this Particle.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Particle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js#L51))   ### 
anchor :Point

  The anchor sets the origin point of the texture.  
The default is 0,0 this means the texture's origin is the top left  
Setting than anchor to 0.5,0.5 means the textures origin is centered  
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

   Inherited From * [PIXI.Sprite#anchor](pixi.sprite#anchor)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L17))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
<internal> autoAlpha : boolean

  If this Particle automatically changes alpha this is set to true by Particle.setAlphaData.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Particle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js#L45))   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
<internal> autoScale : boolean

  If this Particle automatically scales this is set to true by Particle.setScaleData.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Particle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js#L27))   ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

 Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

   Inherited From * [PIXI.Sprite#blendMode](pixi.sprite#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L82))   ### 
body : [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated  
properties and methods via it.

 By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

 To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object  
and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

 You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

 Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5,  
so the physics body is centered on the Game Object.

 If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  ##### Type

 * [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  Inherited From * [Phaser.Component.PhysicsBody#body](phaser.component.physicsbody#body)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L91))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
checkWorldBounds : boolean

  If this is set to `true` the Game Object checks if it is within the World bounds each frame. 

 When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

 If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

 It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

 When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.InWorld#checkWorldBounds](phaser.component.inworld#checkWorldBounds)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L98))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
cropRect : [Phaser.Rectangle](phaser.rectangle)

  The Rectangle used to crop the texture this Game Object uses.  
Set this property via `crop`.  
If you modify this property directly you must call `updateCrop` in order to have the change take effect.

   Inherited From * [Phaser.Component.Crop#cropRect](phaser.component.crop#cropRect)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L24))   ### 
damage

  Damages the Game Object. This removes the given amount of health from the `health` property.

 If health is taken below or is equal to zero then the `kill` method is called.

   Inherited From * [Phaser.Component.Health#damage](phaser.component.health#damage)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L46))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] deltaX : number

  Returns the delta x value. The difference between world.x now and in the previous frame.

 The value will be positive if the Game Object has moved to the right or negative if to the left.

   Inherited From * [Phaser.Component.Delta#deltaX](phaser.component.delta#deltaX)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L24))   ### 
[readonly] deltaY : number

  Returns the delta y value. The difference between world.y now and in the previous frame.

 The value will be positive if the Game Object has moved down or negative if up.

   Inherited From * [Phaser.Component.Delta#deltaY](phaser.component.delta#deltaY)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L42))   ### 
[readonly] deltaZ : number

  Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

   Inherited From * [Phaser.Component.Delta#deltaZ](phaser.component.delta#deltaZ)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L58))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Sprite is processed by the core Phaser game loops and Group loops.

   Inherited From * [PIXI.Sprite#exists](pixi.sprite#exists)
 Default Value * true
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L103))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
frame : integer

  Gets or sets the current frame index of the texture being used to render this Game Object.

 To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,  
for example: `player.frame = 4`.

 If the frame index given doesn't exist it will revert to the first frame found in the texture.

 If you are using a texture atlas then you should use the `frameName` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frame](phaser.component.loadtexture#frame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L254))   ### 
frameName : string

  Gets or sets the current frame name of the texture being used to render this Game Object.

 To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use,  
for example: `player.frameName = "idle"`.

 If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

 If you are using a sprite sheet then you should use the `frame` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frameName](phaser.component.loadtexture#frameName)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L279))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
heal

  Heal the Game Object. This adds the given amount of health to the `health` property.

   Inherited From * [Phaser.Component.Health#heal](phaser.component.health#heal)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L90))   ### 
health : number

  The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

 It can be used in combination with the `damage` method or modified directly.

   Inherited From * [Phaser.Component.Health#health](phaser.component.health#health)
 Default Value * 1
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L26))   ### 
height : number

  The height of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#height](pixi.sprite#height)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L144))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Inherited From * [Phaser.Component.InputEnabled#input](phaser.component.inputenabled#input)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Inherited From * [Phaser.Component.InputEnabled#inputEnabled](phaser.component.inputenabled#inputEnabled)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   ### 
[readonly] inWorld : boolean

  Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

   Inherited From * [Phaser.Component.InWorld#inWorld](phaser.component.inworld#inWorld)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L129))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
maxHealth : number

  The Game Objects maximum health value. This works in combination with the `heal` method to ensure  
the health value never exceeds the maximum.

   Inherited From * [Phaser.Component.Health#maxHealth](phaser.component.health#maxHealth)
 Default Value * 100
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L35))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
outOfBoundsKill : boolean

  If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

   Inherited From * [Phaser.Component.InWorld#outOfBoundsKill](phaser.component.inworld#outOfBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L106))   ### 
outOfCameraBoundsKill : boolean

  If this and the `autoCull` property are both set to `true`, then the `kill` method  
is called as soon as the Game Object leaves the camera bounds.

   Inherited From * [Phaser.Component.InWorld#outOfCameraBoundsKill](phaser.component.inworld#outOfCameraBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L115))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Inherited From * [Phaser.Sprite#physicsType](phaser.sprite#physicsType)
 Source code: [gameobjects/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js#L61))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
<internal> scaleData :array

  A reference to the scaleData array owned by the Emitter that emitted this Particle.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Particle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js#L33))   ### 
scaleMax : [Phaser.Point](phaser.point)

  The maximum scale this Game Object will scale up to. 

 It allows you to prevent a parent from scaling this Game Object higher than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMax](phaser.component.scaleminmax#scaleMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L46))   ### 
scaleMin : [Phaser.Point](phaser.point)

  The minimum scale this Game Object will scale down to.

 It allows you to prevent a parent from scaling this Game Object lower than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMin](phaser.component.scaleminmax#scaleMin)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L36))   ### 
setHealth

  Sets the health property of the Game Object to the given amount.  
Will never exceed the `maxHealth` value.

   Inherited From * [Phaser.Component.Health#setHealth](phaser.component.health#setHealth)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L70))   ### 
shader : [PIXI.AbstractFilter](pixi.abstractfilter)

  The shader that will be used to render this Sprite.  
Set to null to remove a current shader.

   Inherited From * [PIXI.Sprite#shader](pixi.sprite#shader)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L93))   ### 
smoothed : boolean

  Enable or disable texture smoothing for this Game Object.

 It only takes effect if the Game Object is using an image based texture.

 Smoothing is enabled by default.

   Inherited From * [Phaser.Component.Smoothed#smoothed](phaser.component.smoothed#smoothed)
 Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L25))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture that the sprite is using

   Inherited From * [PIXI.Sprite#texture](pixi.sprite#texture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L28))   ### 
tint : number

  The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

   Inherited From * [PIXI.Sprite#tint](pixi.sprite#tint)
 Default Value * 0xFFFFFF
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L54))   ### 
tintedTexture :Canvas

  A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

   Inherited From * [PIXI.Sprite#tintedTexture](pixi.sprite#tintedTexture)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L73))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
transformCallback : Function

  The callback that will apply any scale limiting to the worldTransform.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallback](phaser.component.scaleminmax#transformCallback)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L20))   ### 
transformCallbackContext : Object

  The context under which `transformCallback` is called.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallbackContext](phaser.component.scaleminmax#transformCallbackContext)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L26))   ### 
[readonly] type : number

  The const type of this object.

   Inherited From * [Phaser.Sprite#type](phaser.sprite#type)
 Source code: [gameobjects/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js#L55))   ### 
width : number

  The width of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#width](pixi.sprite#width)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L125))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
x : number

  The position of the Game Object on the x axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#x](phaser.component.physicsbody#x)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L98))   ### 
y : number

  The position of the Game Object on the y axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#y](phaser.component.physicsbody#y)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L124))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#bringToTop](phaser.component.bringtotop#bringToTop)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
crop(rect, copy)

  Crop allows you to crop the texture being used to display this Game Object.  
Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

 Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,  
or by modifying `cropRect` property directly and then calling `updateCrop`.

 The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object  
so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

 A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`,  
in which case the values are duplicated to a local object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) |  |  | The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. |
| `copy` | boolean |  <optional> |  false  | If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect. |

  Inherited From * [Phaser.Component.Crop#crop](phaser.component.crop#crop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L49))   ### 
destroy(destroyChildren, destroyTexture)

  Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present  
and nulls its reference to `game`, freeing it up for garbage collection.

 If this Game Object has the Events component it will also dispatch the `onDestroy` event.

 You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called as well? |
| `destroyTexture` | boolean |  <optional> |  false  | Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Component.Destroy#destroy](phaser.component.destroy#destroy)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L37))   ### 
getBounds(matrix) → {Rectangle}

  Returns the bounds of the Sprite as a rectangle.  
The bounds calculation takes the worldTransform into account.

 It is important to note that the transform is not updated when you call this method.  
So if this Sprite is the child of a Display Object which has had its transform  
updated since the last render pass, those changes will not yet have been applied  
to this Sprites worldTransform. If you need to ensure that all parent transforms  
are factored into this getBounds operation then you should call `updateTransform`  
on the root most object in this Sprites display list first.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Matrix | the transformation matrix of the sprite |

 ##### Returns

   Rectangle -   the framing rectangle

    Inherited From * [PIXI.Sprite#getBounds](pixi.sprite#getBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L199))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.Sprite#getLocalBounds](pixi.sprite#getLocalBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L315))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
loadTexture(key, frame, stopAnimation)

  Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

 If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

 You should only use `loadTexture` if you want to replace the base texture entirely.

 Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

 You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite.  
Doing this then sets the key to be the `frame` argument (the frame is set to zero). 

 This allows you to create sprites using `load.image` during development, and then change them  
to use a Texture Atlas later in development by simply searching your code for 'PENDING\_ATLAS'  
and swapping it to be the key of the atlas data.

 Note: You cannot use a RenderTexture as a texture for a TileSprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `stopAnimation` | boolean |  <optional> |  true  | If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. |

  Inherited From * [Phaser.Component.LoadTexture#loadTexture](phaser.component.loadtexture#loadTexture)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L51))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveDown](phaser.component.bringtotop#moveDown)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveUp](phaser.component.bringtotop#moveUp)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
onEmit()

  Called by the Emitter when this particle is emitted. Left empty for you to over-ride as required.

   Source code: [gameobjects/Particle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js#L102))   ### 
overlap(displayObject) → {boolean}

  Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,  
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

 This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

 Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.  
It should be fine for low-volume testing where physics isn't required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Button](phaser.button) | PIXI.DisplayObject | The display object to check against. |

 ##### Returns

   boolean -   True if the bounds of this Game Object intersects at any point with the bounds of the given display object.

    Inherited From * [Phaser.Component.Overlap#overlap](phaser.component.overlap#overlap)
 Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L29))   ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays an Animation.

 The animation should have previously been created via `animations.add`.

 If the animation is already playing calling this again won't do anything.  
If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'. |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation.

    Inherited From * [Phaser.Component.Animation#play](phaser.component.animation#play)
 Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L31))   ### 
<internal> postUpdate()

  Internal method called by the World postUpdate cycle.

   Inherited From * [Phaser.Component.Core#postUpdate](phaser.component.core#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L338))   ### 
preUpdate() → {boolean}

  Automatically called by World.preUpdate.

  ##### Returns

   boolean -   True if the Sprite was rendered, otherwise false.

    Inherited From * [Phaser.Sprite#preUpdate](phaser.sprite#preUpdate)
 Source code: [gameobjects/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js#L107))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
reset(x, y, health) → {[Phaser.Particle](phaser.particle)}

  Resets the Particle. This places the Particle at the given x/y world coordinates and then  
sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values.  
If the Particle has a physics body that too is reset.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Particle at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Particle at. |
| `health` | number |  <optional> |  1  | The health to give the Particle. |

 ##### Returns

   [Phaser.Particle](phaser.particle) -   This instance.

    Source code: [gameobjects/Particle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js) ([Line 141](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js#L141))   ### 
resetFrame()

  Resets the texture frame dimensions that the Game Object uses for rendering.

   Inherited From * [Phaser.Component.LoadTexture#resetFrame](phaser.component.loadtexture#resetFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L232))   ### 
resizeFrame(parent, width, height)

  Resizes the Frame dimensions that the Game Object uses for rendering.

 You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData  
it can be useful to adjust the dimensions directly in this way.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | object | The parent texture object that caused the resize, i.e. a Phaser.Video object. |
| `width` | integer | The new width of the texture. |
| `height` | integer | The new height of the texture. |

  Inherited From * [Phaser.Component.LoadTexture#resizeFrame](phaser.component.loadtexture#resizeFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L220))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#sendToBack](phaser.component.bringtotop#sendToBack)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   ### 
setAlphaData()

  Called by the Emitter if autoAlpha has been enabled. Passes over the alpha ease data and resets the alpha counter.

   Source code: [gameobjects/Particle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js) ([Line 111](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js#L111))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setFrame(frame)

  Sets the texture frame the Game Object uses for rendering.

 This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The Frame to be used by the texture. |

  Inherited From * [Phaser.Component.LoadTexture#setFrame](phaser.component.loadtexture#setFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L155))   ### 
setScaleData()

  Called by the Emitter if autoScale has been enabled. Passes over the scale ease data and resets the scale counter.

   Source code: [gameobjects/Particle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js) ([Line 126](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js#L126))   ### 
setScaleMinMax(minX, minY, maxX, maxY)

  Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

 For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored  
and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

 By setting these values you can carefully control how Game Objects deal with responsive scaling.

 If only one parameter is given then that value will be used for both scaleMin and scaleMax:  
`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

 If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:  
`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

 If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly,  
or pass `null` for the `maxX` and `maxY` parameters.

 Call `setScaleMinMax(null)` to clear all previously set values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `minX` | number | null | The minimum horizontal scale value this Game Object can scale down to. |
| `minY` | number | null | The minimum vertical scale value this Game Object can scale down to. |
| `maxX` | number | null | The maximum horizontal scale value this Game Object can scale up to. |
| `maxY` | number | null | The maximum vertical scale value this Game Object can scale up to. |

  Inherited From * [Phaser.Component.ScaleMinMax#setScaleMinMax](phaser.component.scaleminmax#setScaleMinMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L110))   ### 
setTexture(texture, destroy)

  Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous  
texture this Sprite was using.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) |  |  | The PIXI texture that is displayed by the sprite |
| `destroy` | Boolean |  <optional> |  false  | Call Texture.destroy on the current texture before replacing it with the new one? |

  Inherited From * [PIXI.Sprite#setTexture](pixi.sprite#setTexture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L163))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Updates the Particle scale or alpha if autoScale and autoAlpha are set.

   Source code: [gameobjects/Particle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Particle.js#L64))   ### 
updateCrop()

  If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,  
or the rectangle it references, then you need to update the crop frame by calling this method.

   Inherited From * [Phaser.Component.Crop#updateCrop](phaser.component.crop#updateCrop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L86))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Particle.html>

Class: Phaser.Physics.P2.PointProxy
===================================

 Constructor
-----------

 ### 
new PointProxy(world, destination)

  A PointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `world` | [Phaser.Physics.P2](phaser.physics.p2) | A reference to the P2 World. |
| `destination` | any | The object to bind to. |

  Source code: [physics/p2/PointProxy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PointProxy.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PointProxy.js#L15))   Public Properties
-----------------

  ### 
mx : number

  The x property of this PointProxy get and set in meters.

   Source code: [physics/p2/PointProxy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PointProxy.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PointProxy.js#L64))   ### 
my : number

  The x property of this PointProxy get and set in meters.

   Source code: [physics/p2/PointProxy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PointProxy.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PointProxy.js#L84))   ### 
x : number

  The x property of this PointProxy get and set in pixels.

   Source code: [physics/p2/PointProxy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PointProxy.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PointProxy.js#L24))   ### 
y : number

  The y property of this PointProxy get and set in pixels.

   Source code: [physics/p2/PointProxy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PointProxy.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/PointProxy.js#L44))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.PointProxy.html>

Class: Phaser.Physics.P2.Spring
===============================

 Constructor
-----------

 ### 
new Spring(world, bodyA, bodyB, restLength, stiffness, damping, worldA, worldB, localA, localB)

  Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `world` | [Phaser.Physics.P2](phaser.physics.p2) |  |  | A reference to the P2 World. |
| `bodyA` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `restLength` | number |  <optional> |  1  | Rest length of the spring. A number > 0. |
| `stiffness` | number |  <optional> |  100  | Stiffness of the spring. A number >= 0. |
| `damping` | number |  <optional> |  1  | Damping of the spring. A number >= 0. |
| `worldA` | Array |  <optional> |  | Where to hook the spring to body A in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `worldB` | Array |  <optional> |  | Where to hook the spring to body B in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `localA` | Array |  <optional> |  | Where to hook the spring to body A in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `localB` | Array |  <optional> |  | Where to hook the spring to body B in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. |

  Source code: [physics/p2/Spring.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Spring.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Spring.js#L23))   Public Properties
-----------------

  ### 
data :p2.LinearSpring

  The actual p2 spring object.

   Source code: [physics/p2/Spring.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Spring.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Spring.js#L70))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/p2/Spring.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Spring.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Spring.js#L28))   ### 
world : [Phaser.Physics.P2](phaser.physics.p2)

  Local reference to P2 World.

   Source code: [physics/p2/Spring.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Spring.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Spring.js#L33))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.Spring.html>

Class: Phaser.Physics.P2.RotationalSpring
=========================================

 Constructor
-----------

 ### 
new RotationalSpring(world, bodyA, bodyB, restAngle, stiffness, damping)

  Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `world` | [Phaser.Physics.P2](phaser.physics.p2) |  |  | A reference to the P2 World. |
| `bodyA` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `restAngle` | number |  <optional> |  | The relative angle of bodies at which the spring is at rest. If not given, it's set to the current relative angle between the bodies. |
| `stiffness` | number |  <optional> |  100  | Stiffness of the spring. A number >= 0. |
| `damping` | number |  <optional> |  1  | Damping of the spring. A number >= 0. |

  Source code: [physics/p2/RotationalSpring.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RotationalSpring.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RotationalSpring.js#L19))   Public Properties
-----------------

  ### 
data :p2.RotationalSpring

  The actual p2 spring object.

   Source code: [physics/p2/RotationalSpring.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RotationalSpring.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RotationalSpring.js#L49))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/p2/RotationalSpring.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RotationalSpring.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RotationalSpring.js#L24))   ### 
world : [Phaser.Physics.P2](phaser.physics.p2)

  Local reference to P2 World.

   Source code: [physics/p2/RotationalSpring.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RotationalSpring.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/RotationalSpring.js#L29))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.RotationalSpring.html>

Class: Phaser.DeviceButton
==========================

 Constructor
-----------

 ### 
new DeviceButton(parent, buttonCode)

  DeviceButtons belong to both `Phaser.Pointer` and `Phaser.SinglePad` (Gamepad) instances.

 For Pointers they represent the various buttons that can exist on mice and pens, such as the left button, right button,  
middle button and advanced buttons like back and forward.

 Access them via `Pointer.leftbutton`, `Pointer.rightButton` and so on.

 On Gamepads they represent all buttons on the pad: from shoulder buttons to action buttons.

 At the time of writing this there are device limitations you should be aware of:

 * On Windows, if you install a mouse driver, and its utility software allows you to customize button actions  
(e.g., IntelliPoint and SetPoint), the middle (wheel) button, the 4th button, and the 5th button might not be set,  
even when they are pressed.
* On Linux (GTK), the 4th button and the 5th button are not supported.
* On Mac OS X 10.5 there is no platform API for implementing any advanced buttons.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | [Phaser.Pointer](phaser.pointer) | [Phaser.SinglePad](phaser.singlepad) | A reference to the parent of this button. Either a Pointer or a Gamepad. |
| `buttonCode` | number | The button code this DeviceButton is responsible for. |

  Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L31))   Public Properties
-----------------

  ### 
altKey : boolean

  True if the alt key was held down when this button was last pressed or released.  
Not supported on Gamepads.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L87))   ### 
buttonCode : number

  The buttoncode of this button if a Gamepad, or the DOM button event value if a Pointer.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 114](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L114))   ### 
ctrlKey : boolean

  True if the control key was held down when this button was last pressed or released.  
Not supported on Gamepads.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L103))   ### 
[readonly] duration : number

  How long the button has been held down for in milliseconds.  
If not currently down it returns -1.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 300](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L300))   ### 
event : Object

  The DOM event that caused the change in button state.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 47](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L47))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 41](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L41))   ### 
isDown : boolean

  The "down" state of the button.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L53))   ### 
isUp : boolean

  The "up" state of the button.

   Default Value * true
 Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L59))   ### 
onDown : [Phaser.Signal](phaser.signal)

  This Signal is dispatched every time this DeviceButton is pressed down.  
It is only dispatched once (until the button is released again).  
When dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 122](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L122))   ### 
onFloat : [Phaser.Signal](phaser.signal)

  Gamepad only.  
This Signal is dispatched every time this DeviceButton changes floating value (between, but not exactly, 0 and 1).  
When dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L138))   ### 
onUp : [Phaser.Signal](phaser.signal)

  This Signal is dispatched every time this DeviceButton is released from a down state.  
It is only dispatched once (until the button is pressed again).  
When dispatched it sends 2 arguments: A reference to this DeviceButton and the value of the button.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L130))   ### 
parent : [Phaser.Pointer](phaser.pointer) | [Phaser.SinglePad](phaser.singlepad)

  A reference to the Pointer or Gamepad that owns this button.

  ##### Type

 * [Phaser.Pointer](phaser.pointer) | [Phaser.SinglePad](phaser.singlepad)

  Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L36))   ### 
repeats : number

  Gamepad only.  
If a button is held down this holds down the number of times the button has 'repeated'.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L79))   ### 
shiftKey : boolean

  True if the shift key was held down when this button was last pressed or released.  
Not supported on Gamepads.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L95))   ### 
timeDown : number

  The timestamp when the button was last pressed down.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L65))   ### 
timeUp : number

  The timestamp when the button was last released.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 71](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L71))   ### 
value : number

  Button value. Mainly useful for checking analog buttons (like shoulder triggers) on Gamepads.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L109))    Public Methods
--------------

  ### 
destroy()

  Destroys this DeviceButton, this disposes of the onDown, onUp and onFloat signals  
and clears the parent and game references.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L279))   ### 
justPressed(duration) → {boolean}

  Returns the "just pressed" state of this button.  
Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `duration` | number |  <optional> |  250  | The duration in ms below which the button is considered as being just pressed. |

 ##### Returns

   boolean -   True if the button is just pressed otherwise false.

    Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 228](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L228))   ### 
justReleased(duration) → {boolean}

  Returns the "just released" state of this button.  
Just released is considered as being true if the button was released within the duration given (default 250ms).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `duration` | number |  <optional> |  250  | The duration in ms below which the button is considered as being just released. |

 ##### Returns

   boolean -   True if the button is just released otherwise false.

    Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 244](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L244))   ### 
<internal> padFloat(value)

  Called automatically by Phaser.SinglePad.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | number | Button value |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L213))   ### 
reset()

  Resets this DeviceButton, changing it to an isUp state and resetting the duration and repeats counters.

   Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 260](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L260))   ### 
<internal> start(event, value)

  Called automatically by Phaser.Pointer and Phaser.SinglePad.  
Handles the button down state.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `event` | object |  <optional> | The DOM event that triggered the button change. |
| `value` | number |  <optional> | The button value. Only get for Gamepads. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L144))   ### 
<internal> stop(event, value)

  Called automatically by Phaser.Pointer and Phaser.SinglePad.  
Handles the button up state.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `event` | object |  <optional> | The DOM event that triggered the button change. |
| `value` | number |  <optional> | The button value. Only get for Gamepads. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/DeviceButton.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js) ([Line 179](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/DeviceButton.js#L179))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.DeviceButton.html>

Class: Phaser.Key
=================

 Constructor
-----------

 ### 
new Key(game, keycode)

  If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Current game instance. |
| `keycode` | integer | The key code this Key is responsible for. See [Phaser.KeyCode](phaser.keycode). |

  Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L15))   Public Properties
-----------------

  ### 
altKey : boolean

  The down state of the ALT key, if pressed at the same time as this key.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L51))   ### 
ctrlKey : boolean

  The down state of the CTRL key, if pressed at the same time as this key.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L57))   ### 
duration : number

  If the key is down this value holds the duration of that key press and is constantly updated.  
If the key is up it holds the duration of the previous down session. The number of milliseconds this key has been held down for.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 76](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L76))   ### 
[readonly] event : Object

  Stores the most recent DOM event.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L33))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L20))   ### 
isDown : boolean

  The "down" state of the key. This will remain `true` for as long as the keyboard thinks this key is held down.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L39))   ### 
isUp : boolean

  The "up" state of the key. This will remain `true` for as long as the keyboard thinks this key is up.

   Default Value * true
 Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L45))   ### 
keyCode : number

  The keycode of this key.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L93))   ### 
onDown : [Phaser.Signal](phaser.signal)

  This Signal is dispatched every time this Key is pressed down. It is only dispatched once (until the key is released again).

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L98))   ### 
onHoldCallback : Function

  A callback that is called while this Key is held down. Warning: Depending on refresh rate that could be 60+ times per second.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L103))   ### 
onHoldContext : Object

  The context under which the onHoldCallback will be called.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 108](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L108))   ### 
onUp : [Phaser.Signal](phaser.signal)

  This Signal is dispatched every time this Key is released. It is only dispatched once (until the key is pressed and released again).

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L113))   ### 
repeats : number

  If a key is held down this holds down the number of times the key has 'repeated'.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 88](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L88))   ### 
shiftKey : boolean

  The down state of the SHIFT key, if pressed at the same time as this key.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L63))   ### 
timeDown : number

  The timestamp when the key was last pressed down. This is based on Game.time.now.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L68))   ### 
timeUp : number

  The timestamp when the key was last released. This is based on Game.time.now.

   Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L82))    Public Methods
--------------

  ### 
downDuration(duration) → {boolean}

  Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down,  
or was pressed down longer ago than then given duration.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `duration` | number |  <optional> |  50  | The duration within which the key is considered as being just pressed. Given in ms. |

 ##### Returns

   boolean -   True if the key was pressed down within the given duration.

    Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 253](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L253))   ### 
<internal> processKeyDown(event)

  Called automatically by Phaser.Keyboard.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | KeyboardEvent | The DOM event that triggered this. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 154](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L154))   ### 
<internal> processKeyUp(event)

  Called automatically by Phaser.Keyboard.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | KeyboardEvent | The DOM event that triggered this. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L191))   ### 
reset(hard)

  Resets the state of this Key.

 This sets isDown to false, isUp to true, resets the time to be the current time, and *enables* the key.  
In addition, if it is a "hard reset", it clears clears any callbacks associated with the onDown and onUp events and removes the onHoldCallback.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `hard` | boolean |  <optional> |  true  | A soft reset won't reset any events or callbacks; a hard reset will. |

  Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 222](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L222))   ### 
<internal> update()

  Called automatically by Phaser.Keyboard.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 131](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L131))   ### 
upDuration(duration) → {boolean}

  Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down,  
or was pressed down longer ago than then given duration.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `duration` | number |  <optional> |  50  | The duration within which the key is considered as being just released. Given in ms. |

 ##### Returns

   boolean -   True if the key was released within the given duration.

    Source code: [input/Key.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js) ([Line 269](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Key.js#L269))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Key.html>

Class: Phaser.Gamepad
=====================

 Constructor
-----------

 ### 
new Gamepad(game)

  The Gamepad class handles gamepad input and dispatches gamepad events.

 Remember to call `gamepad.start()`.

 HTML5 GAMEPAD API SUPPORT IS AT AN EXPERIMENTAL STAGE!  
At moment of writing this (end of 2013) only Chrome supports parts of it out of the box. Firefox supports it  
via prefs flags (about:config, search gamepad). The browsers map the same controllers differently.  
This class has constants for Windows 7 Chrome mapping of XBOX 360 controller.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L21))   Public Properties
-----------------

  ### 
[readonly] active : boolean

  If the gamepad input is active or not - if not active it should not be updated from Input.js

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 496](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L496))   ### 
callbackContext : Object

  The context under which the callbacks are run.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L80))   ### 
enabled : boolean

  Gamepad input will only be processed if enabled.

   Default Value * true
 Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L52))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L26))   ### 
onAxisCallback : Function

  This callback is invoked every time any gamepad axis is changed.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L105))   ### 
onConnectCallback : Function

  This callback is invoked every time any gamepad is connected

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L85))   ### 
onDisconnectCallback : Function

  This callback is invoked every time any gamepad is disconnected

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L90))   ### 
onDownCallback : Function

  This callback is invoked every time any gamepad button is pressed down.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L95))   ### 
onFloatCallback : Function

  This callback is invoked every time any gamepad button is changed to a value where value > 0 and value < 1.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L110))   ### 
onUpCallback : Function

  This callback is invoked every time any gamepad button is released.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L100))   ### 
[readonly] pad1 : [Phaser.SinglePad](phaser.singlepad)

  Gamepad #1

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 538](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L538))   ### 
[readonly] pad2 : [Phaser.SinglePad](phaser.singlepad)

  Gamepad #2

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 552](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L552))   ### 
[readonly] pad3 : [Phaser.SinglePad](phaser.singlepad)

  Gamepad #3

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 566](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L566))   ### 
[readonly] pad4 : [Phaser.SinglePad](phaser.singlepad)

  Gamepad #4

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 580](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L580))   ### 
[readonly] padsConnected : number

  How many live gamepads are currently connected.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 524](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L524))   ### 
[readonly] supported : boolean

  Whether or not gamepads are supported in current browser.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 510](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L510))    Public Methods
--------------

  ### 
addCallbacks(context, callbacks)

  Add callbacks to the main Gamepad handler to handle connect/disconnect/button down/button up/axis change/float value buttons.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `context` | object | The context under which the callbacks are run. |
| `callbacks` | object | Object that takes six different callback methods:onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback |

  Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L139))   ### 
destroy()

  Destroys this object and the associated event listeners.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 476](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L476))   ### 
isDown(buttonCode) → {boolean}

  Returns true if the button is currently pressed down, on ANY gamepad.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `buttonCode` | number | The buttonCode of the button to check for. |

 ##### Returns

   boolean -   True if a button is currently down.

    Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 457](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L457))   ### 
justPressed(buttonCode, duration) → {boolean}

  Returns the "just released" state of a button from ANY gamepad connected. Just released is considered as being true if the button was released within the duration given (default 250ms).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `buttonCode` | number |  |  | The buttonCode of the button to check for. |
| `duration` | number |  <optional> |  250  | The duration below which the button is considered as being just released. |

 ##### Returns

   boolean -   True if the button is just released otherwise false.

    Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 436](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L436))   ### 
justPressed(buttonCode, duration) → {boolean}

  Returns the "just pressed" state of a button from ANY gamepad connected. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `buttonCode` | number |  |  | The buttonCode of the button to check for. |
| `duration` | number |  <optional> |  250  | The duration below which the button is considered as being just pressed. |

 ##### Returns

   boolean -   True if the button is just pressed otherwise false.

    Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 415](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L415))   ### 
reset()

  Reset all buttons/axes of all gamepads

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 400](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L400))   ### 
setDeadZones()

  Sets the deadZone variable for all four gamepads

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 373](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L373))   ### 
start()

  Starts the Gamepad event handling.  
This MUST be called manually before Phaser will start polling the Gamepad API.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 162](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L162))   ### 
stop()

  Stops the Gamepad event handling.

   Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L386))   ### 
<internal> update()

  Main gamepad update loop. Should not be called manually.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Gamepad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js) ([Line 231](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Gamepad.js#L231))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Gamepad.html>

Class: Phaser.Physics.P2.Body
=============================

 Constructor
-----------

 ### 
new Body(game, sprite, x, y, mass)

  The Physics Body is typically linked to a single Sprite and defines properties that determine how the physics body is simulated.  
These properties affect how the body reacts to forces, what forces it generates on itself (to simulate friction), and how it reacts to collisions in the scene.  
In most cases, the properties are used to simulate physical effects. Each body also has its own property values that determine exactly how it reacts to forces and collisions in the scene.  
By default a single Rectangle shape is added to the Body that matches the dimensions of the parent Sprite. See addShape, removeShape, clearShapes to add extra shapes around the Body.  
Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127.  
Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | Game reference to the currently running game. |
| `sprite` | [Phaser.Sprite](phaser.sprite) |  <optional> |  | The Sprite object this physics body belongs to. |
| `x` | number |  <optional> |  0  | The x coordinate of this Body. |
| `y` | number |  <optional> |  0  | The y coordinate of this Body. |
| `mass` | number |  <optional> |  1  | The default mass of this Body (0 = static). |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L23))   Public Properties
-----------------

  ### 
<static> DYNAMIC : number

  Dynamic body. Dynamic bodies body can move and respond to collisions and forces.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1498](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1498))   ### 
<static> KINEMATIC : number

  Kinematic body. Kinematic bodies only moves according to its .velocity, and does not respond to collisions or force.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1514](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1514))   ### 
<static> STATIC : number

  Static body. Static bodies do not move, and they do not respond to forces or collision.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1506](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1506))   ### 
allowSleep : boolean

  -

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1603](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1603))   ### 
angle : number

  The angle of the Body in degrees from its original orientation. Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.  
Values outside this range are added to or subtracted from 360 to obtain a value within the range. For example, the statement Body.angle = 450 is the same as Body.angle = 90.  
If you wish to work in radians instead of degrees use the property Body.rotation instead. Working in radians is faster as it doesn't have to convert values. The angle of this Body in degrees.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1626](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1626))   ### 
angularDamping : number

  Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second. The angular damping acting acting on the body.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1650](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1650))   ### 
angularForce : number

  The angular force acting on the body.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1671](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1671))   ### 
angularVelocity : number

  The angular velocity of the body.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1691](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1691))   ### 
collidesWith :array

  Array of CollisionGroups that this Bodies shapes collide with.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L112))   ### 
collideWorldBounds : boolean

  A Body can be set to collide against the World bounds automatically if this is set to true. Otherwise it will leave the World.  
Note that this only applies if your World has bounds! The response to the collision should be managed via CollisionMaterials.  
Also note that when you set this it will only effect Body shapes that already exist. If you then add further shapes to your Body  
after setting this it will *not* proactively set them to collide with the bounds. Should the Body collide with the World bounds?

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1949](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1949))   ### 
damping : number

  Damping is specified as a value between 0 and 1, which is the proportion of velocity lost per second. The linear damping acting on the body in the velocity direction.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1711](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1711))   ### 
<internal> data : [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html)

  The p2 Body data.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L59))   ### 
debug : boolean

  Enable or disable debug drawing of this body

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1920](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1920))   ### 
debugBody : [Phaser.Physics.P2.BodyDebug](phaser.physics.p2.bodydebug)

  Reference to the debug body.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 122](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L122))   ### 
dirty : boolean

  Internally used by Sprite.x/y

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 127](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L127))   ### 
dynamic : boolean

  Returns true if the Body is dynamic. Setting Body.dynamic to 'false' will make it static.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1545](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1545))   ### 
fixedRotation : boolean

  -

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1732](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1732))   ### 
force : [Phaser.Physics.P2.InversePointProxy](phaser.physics.p2.inversepointproxy)

  The force applied to the body.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 71](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L71))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L33))   ### 
gravity : [Phaser.Point](phaser.point)

  A locally applied gravity force to the Body. Applied directly before the world step. NOTE: Not currently implemented.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 76](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L76))   ### 
[readonly] id : number

  The Body ID. Each Body that has been added to the World has a unique ID.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1905](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1905))   ### 
inertia : number

  The inertia of the body around the Z axis..

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1755](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1755))   ### 
kinematic : boolean

  Returns true if the Body is kinematic. Setting Body.kinematic to 'false' will make it static.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1574](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1574))   ### 
mass : number

  The mass of the body.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1775](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1775))   ### 
motionState : number

  The type of motion this body has. Should be one of: Body.STATIC (the body does not move), Body.DYNAMIC (body can move and respond to collisions) and Body.KINEMATIC (only moves according to its .velocity).

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1799](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1799))   ### 
offset : [Phaser.Point](phaser.point)

  The offset of the Physics Body from the Sprite x/y position.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L53))   ### 
onBeginContact : [Phaser.Signal](phaser.signal)

  Dispatched when a first contact is created between shapes in two bodies.  
This event is fired during the step, so collision has already taken place.

 The event will be sent 5 arguments in this order:

 The Phaser.Physics.P2.Body it is in contact with. *This might be null* if the Body was created directly in the p2 world.  
The p2.Body this Body is in contact with.  
The Shape from this body that caused the contact.  
The Shape from the contact body.  
The Contact Equation data array.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L92))   ### 
onEndContact : [Phaser.Signal](phaser.signal)

  Dispatched when contact ends between shapes in two bodies.  
This event is fired during the step, so collision has already taken place.

 The event will be sent 4 arguments in this order:

 The Phaser.Physics.P2.Body it is in contact with. *This might be null* if the Body was created directly in the p2 world.  
The p2.Body this Body has ended contact with.  
The Shape from this body that caused the original contact.  
The Shape from the contact body.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L107))   ### 
removeNextStep : boolean

  To avoid deleting this body during a physics step, and causing all kinds of problems, set removeNextStep to true to have it removed in the next preUpdate.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 117](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L117))   ### 
rotation : number

  The angle of the Body in radians.  
If you wish to work in degrees instead of radians use the Body.angle property instead. Working in radians is faster as it doesn't have to convert values. The angle of this Body in radians.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1822](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1822))   ### 
sleepSpeedLimit : number

  .

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1845](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1845))   ### 
sprite : [Phaser.Sprite](phaser.sprite)

  Reference to the parent Sprite.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L43))   ### 
static : boolean

  Returns true if the Body is static. Setting Body.static to 'false' will make it dynamic.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1516](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1516))   ### 
type : number

  The type of physics system this body belongs to.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L48))   ### 
velocity : [Phaser.Physics.P2.InversePointProxy](phaser.physics.p2.inversepointproxy)

  The velocity of the body. Set velocity.x to a negative value to move to the left, position to the right. velocity.y negative values move up, positive move down.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L66))   ### 
world : [Phaser.Physics.P2](phaser.physics.p2)

  Local reference to the P2 World.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L38))   ### 
x : number

  The x coordinate of this Body.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1865](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1865))   ### 
y : number

  The y coordinate of this Body.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1885](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1885))    Public Methods
--------------

  ### 
addCapsule(length, radius, offsetX, offsetY, rotation) → {p2.Capsule}

  Adds a Capsule shape to this Body.  
You can control the offset from the center of the body and the rotation.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `length` | number |  |  | The distance between the end points in pixels. |
| `radius` | number |  |  | Radius of the capsule in pixels. |
| `offsetX` | number |  <optional> |  0  | Local horizontal offset of the shape relative to the body center of mass. |
| `offsetY` | number |  <optional> |  0  | Local vertical offset of the shape relative to the body center of mass. |
| `rotation` | number |  <optional> |  0  | Local rotation of the shape relative to the body center of mass, specified in radians. |

 ##### Returns

   p2.Capsule -   The Capsule shape that was added to the Body.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1108](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1108))   ### 
addCircle(radius, offsetX, offsetY, rotation) → {p2.Circle}

  Adds a Circle shape to this Body. You can control the offset from the center of the body and the rotation.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `radius` | number |  |  | The radius of this circle (in pixels) |
| `offsetX` | number |  <optional> |  0  | Local horizontal offset of the shape relative to the body center of mass. |
| `offsetY` | number |  <optional> |  0  | Local vertical offset of the shape relative to the body center of mass. |
| `rotation` | number |  <optional> |  0  | Local rotation of the shape relative to the body center of mass, specified in radians. |

 ##### Returns

   p2.Circle -   The Circle shape that was added to the Body.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1017](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1017))   ### 
addFixture(fixtureData) → {array}

  Add a polygon fixture. This is used during #loadPolygon.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `fixtureData` | string | The data for the fixture. It contains: isSensor, filter (collision) and the actual polygon shapes. |

 ##### Returns

   array -   An array containing the generated shapes for the given polygon.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1350](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1350))   ### 
addLine(length, offsetX, offsetY, rotation) → {p2.Line}

  Adds a Line shape to this Body.  
The line shape is along the x direction, and stretches from [-length/2, 0] to [length/2,0].  
You can control the offset from the center of the body and the rotation.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `length` | number |  |  | The length of this line (in pixels) |
| `offsetX` | number |  <optional> |  0  | Local horizontal offset of the shape relative to the body center of mass. |
| `offsetY` | number |  <optional> |  0  | Local vertical offset of the shape relative to the body center of mass. |
| `rotation` | number |  <optional> |  0  | Local rotation of the shape relative to the body center of mass, specified in radians. |

 ##### Returns

   p2.Line -   The Line shape that was added to the Body.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1088](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1088))   ### 
addParticle(offsetX, offsetY, rotation) → {p2.Particle}

  Adds a Particle shape to this Body. You can control the offset from the center of the body and the rotation.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `offsetX` | number |  <optional> |  0  | Local horizontal offset of the shape relative to the body center of mass. |
| `offsetY` | number |  <optional> |  0  | Local vertical offset of the shape relative to the body center of mass. |
| `rotation` | number |  <optional> |  0  | Local rotation of the shape relative to the body center of mass, specified in radians. |

 ##### Returns

   p2.Particle -   The Particle shape that was added to the Body.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1071](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1071))   ### 
addPhaserPolygon(key, object) → {Array}

  Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body.  
The shape data format is based on the output of the  
[custom phaser exporter](https://github.com/photonstorm/phaser/tree/master/resources/PhysicsEditor%2520Exporter) for  
[PhysicsEditor](https://www.codeandweb.com/physicseditor)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the Physics Data file as stored in Game.Cache. |
| `object` | string | The key of the object within the Physics data file that you wish to load the shape data from. |

 ##### Returns

   Array -   A list of created fixtures to be used with Phaser.Physics.P2.FixtureList

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1310](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1310))   ### 
addPlane(offsetX, offsetY, rotation) → {p2.Plane}

  Adds a Plane shape to this Body. The plane is facing in the Y direction. You can control the offset from the center of the body and the rotation.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `offsetX` | number |  <optional> |  0  | Local horizontal offset of the shape relative to the body center of mass. |
| `offsetY` | number |  <optional> |  0  | Local vertical offset of the shape relative to the body center of mass. |
| `rotation` | number |  <optional> |  0  | Local rotation of the shape relative to the body center of mass, specified in radians. |

 ##### Returns

   p2.Plane -   The Plane shape that was added to the Body.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1054](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1054))   ### 
addPolygon(options, points) → {boolean}

  Reads a polygon shape path, and assembles convex shapes from that and puts them at proper offset points. The shape must be simple and without holes.  
This function expects the x.y values to be given in pixels. If you want to provide them at p2 world scales then call Body.data.fromPolygon directly.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `options` | object | An object containing the build options: Properties

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `optimalDecomp` | boolean |  <optional> |  false  | Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. |
| `skipSimpleCheck` | boolean |  <optional> |  false  | Set to true if you already know that the path is not intersecting itself. |
| `removeCollinearPoints` | boolean | number |  <optional> |  false  | Set to a number (angle threshold value) to remove collinear points, or false to keep all points. |

 |
| `points` | Array.<number> | number | An array of 2d vectors that form the convex or concave polygon. Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. |

 ##### Returns

   boolean -   True on success, else false.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1128](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1128))   ### 
addRectangle(width, height, offsetX, offsetY, rotation) → {p2.Box}

  Adds a Rectangle shape to this Body. You can control the offset from the center of the body and the rotation.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | number |  |  | The width of the rectangle in pixels. |
| `height` | number |  |  | The height of the rectangle in pixels. |
| `offsetX` | number |  <optional> |  0  | Local horizontal offset of the shape relative to the body center of mass. |
| `offsetY` | number |  <optional> |  0  | Local vertical offset of the shape relative to the body center of mass. |
| `rotation` | number |  <optional> |  0  | Local rotation of the shape relative to the body center of mass, specified in radians. |

 ##### Returns

   p2.Box -   The shape that was added to the Body.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1035](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1035))   ### 
addShape(shape, offsetX, offsetY, rotation) → {p2.Shape}

  Add a shape to the body. You can pass a local transform when adding a shape, so that the shape gets an offset and an angle relative to the body center of mass.  
Will automatically update the mass properties and bounding radius.  
If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `shape` | p2.Shape |  |  | The shape to add to the body. |
| `offsetX` | number |  <optional> |  0  | Local horizontal offset of the shape relative to the body center of mass. |
| `offsetY` | number |  <optional> |  0  | Local vertical offset of the shape relative to the body center of mass. |
| `rotation` | number |  <optional> |  0  | Local rotation of the shape relative to the body center of mass, specified in radians. |

 ##### Returns

   p2.Shape -   The shape that was added to the body.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 992](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L992))   ### 
addToWorld()

  Adds this physics body to the world.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 904](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L904))   ### 
adjustCenterOfMass()

  Moves the shape offsets so their center of mass becomes the body center of mass.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 490](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L490))   ### 
applyDamping(dt)

  Apply damping, see http://code.google.com/p/bullet/issues/detail?id=74 for details.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `dt` | number | Current time step. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 516](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L516))   ### 
applyForce(force, worldX, worldY)

  Apply force to a world point.

 This could for example be a point on the RigidBody surface. Applying force  
this way will add to Body.force and Body.angularForce.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `force` | Float32Array | Array | The force vector to add. |
| `worldX` | number | The world x point to apply the force on. |
| `worldY` | number | The world y point to apply the force on. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 561](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L561))   ### 
applyImpulse(impulse, worldX, worldY)

  Apply impulse to a point relative to the body.  
This could for example be a point on the Body surface. An impulse is a force added to a body during a short  
period of time (impulse = force \* time). Impulses will be added to Body.velocity and Body.angularVelocity.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `impulse` | Float32Array | Array | The impulse vector to add, oriented in world space. |
| `worldX` | number | A point relative to the body in world space. If not given, it is set to zero and all of the impulse will be exerted on the center of mass. |
| `worldY` | number | A point relative to the body in world space. If not given, it is set to zero and all of the impulse will be exerted on the center of mass. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 528](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L528))   ### 
applyImpulseLocal(impulse, localX, localY)

  Apply impulse to a point local to the body.

 This could for example be a point on the Body surface. An impulse is a force added to a body during a short  
period of time (impulse = force \* time). Impulses will be added to Body.velocity and Body.angularVelocity.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `impulse` | Float32Array | Array | The impulse vector to add, oriented in local space. |
| `localX` | number | A local point on the body. |
| `localY` | number | A local point on the body. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 544](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L544))   ### 
clearCollision(clearGroup, clearMask, shape)

  Clears the collision data from the shapes in this Body. Optionally clears Group and/or Mask.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `clearGroup` | boolean |  <optional> |  true  | Clear the collisionGroup value from the shape/s? |
| `clearMask` | boolean |  <optional> |  true  | Clear the collisionMask value from the shape/s? |
| `shape` | p2.Shape |  <optional> |  | An optional Shape. If not provided the collision data will be cleared from all Shapes in this Body. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 323](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L323))   ### 
clearShapes()

  Removes all Shapes from this Body.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 974](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L974))   ### 
collides(group, callback, callbackContext, shape)

  Adds the given CollisionGroup, or array of CollisionGroups, to the list of groups that this body will collide with and updates the collision masks.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `group` | Phaser.Physics.CollisionGroup | array |  | The Collision Group or Array of Collision Groups that this Bodies shapes will collide with. |
| `callback` | function |  <optional> | Optional callback that will be triggered when this Body impacts with the given Group. |
| `callbackContext` | object |  <optional> | The context under which the callback will be called. |
| `shape` | p2.Shape |  <optional> | An optional Shape. If not provided the collision mask will be added to all Shapes in this Body. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 435](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L435))   ### 
createBodyCallback(object, callback, callbackContext)

  Sets a callback to be fired any time a shape in this Body impacts with a shape in the given Body. The impact test is performed against body.id values.  
The callback will be sent 4 parameters: This body, the body that impacted, the Shape in this body and the shape in the impacting body.  
Note that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening.  
It also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | [Phaser.Sprite](phaser.sprite) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) | The object to send impact events for. |
| `callback` | function | The callback to fire on impact. Set to null to clear a previously set callback. |
| `callbackContext` | object | The context under which the callback will fire. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 180](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L180))   ### 
createGroupCallback(group, callback, callbackContext)

  Sets a callback to be fired any time this Body impacts with the given Group. The impact test is performed against shape.collisionGroup values.  
The callback will be sent 4 parameters: This body, the body that impacted, the Shape in this body and the shape in the impacting body.  
This callback will only fire if this Body has been assigned a collision group.  
Note that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening.  
It also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `group` | Phaser.Physics.CollisionGroup | The Group to send impact events for. |
| `callback` | function | The callback to fire on impact. Set to null to clear a previously set callback. |
| `callbackContext` | object | The context under which the callback will fire. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L220))   ### 
destroy()

  Destroys this Body and all references it holds to other objects.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 943](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L943))   ### 
getCollisionMask() → {number}

  Gets the collision bitmask from the groups this body collides with.

  ##### Returns

   number -   The bitmask.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 247](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L247))   ### 
getVelocityAtPoint(result, relativePoint) → {Array}

  Gets the velocity of a point in the body.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `result` | Array | A vector to store the result in. |
| `relativePoint` | Array | A world oriented vector, indicating the position of the point to get the velocity from. |

 ##### Returns

   Array -   The result vector.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 502](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L502))   ### 
loadPolygon(key, object) → {boolean}

  Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body.

 As well as reading the data from the Cache you can also pass `null` as the first argument and a  
physics data object as the second. When doing this you must ensure the structure of the object is correct in advance.

 For more details see the format of the Lime / Corona Physics Editor export.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the Physics Data file as stored in Game.Cache. Alternatively set to `null` and pass the data as the 2nd argument. |
| `object` | string | object | The key of the object within the Physics data file that you wish to load the shape data from, or if key is null pass the actual physics data object itself as this parameter. |

 ##### Returns

   boolean -   True on success, else false.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1422](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1422))   ### 
moveBackward(speed)

  Moves the Body backwards based on its current angle and the given speed.  
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should move backwards. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 691](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L691))   ### 
moveDown(speed)

  If this Body is dynamic then this will move it down by setting its y velocity to the given speed.  
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should move down, in pixels per second. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 815](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L815))   ### 
moveForward(speed)

  Moves the Body forwards based on its current angle and the given speed.  
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should move forwards. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 674](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L674))   ### 
moveLeft(speed)

  If this Body is dynamic then this will move it to the left by setting its x velocity to the given speed.  
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should move to the left, in pixels per second. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 776](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L776))   ### 
moveRight(speed)

  If this Body is dynamic then this will move it to the right by setting its x velocity to the given speed.  
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should move to the right, in pixels per second. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 789](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L789))   ### 
moveUp(speed)

  If this Body is dynamic then this will move it up by setting its y velocity to the given speed.  
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should move up, in pixels per second. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 802](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L802))   ### 
<internal> postUpdate()

  Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 846](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L846))   ### 
<internal> preUpdate()

  Internal method. This is called directly before the sprites are sent to the renderer and after the update function has finished.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 828](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L828))   ### 
removeCollisionGroup(group, clearCallback, shape)

  Removes the given CollisionGroup, or array of CollisionGroups, from the list of groups that this body will collide with and updates the collision masks.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `group` | Phaser.Physics.CollisionGroup | array |  |  | The Collision Group or Array of Collision Groups that this Bodies shapes should not collide with anymore. |
| `clearCallback` | boolean |  <optional> |  true  | Clear the callback that will be triggered when this Body impacts with the given Group? |
| `shape` | p2.Shape |  <optional> |  | An optional Shape. If not provided the updated collision mask will be added to all Shapes in this Body. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 371](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L371))   ### 
removeFromWorld()

  Removes this physics body from the world.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 929](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L929))   ### 
removeShape(shape) → {boolean}

  Remove a shape from the body. Will automatically update the mass properties and bounding radius.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `shape` | p2.Circle | p2.Rectangle | p2.Plane | p2.Line | p2.Particle | The shape to remove from the body. |

 ##### Returns

   boolean -   True if the shape was found and removed, else false.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1194](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1194))   ### 
reset(x, y, resetDamping, resetMass)

  Resets the Body force, velocity (linear and angular) and rotation. Optionally resets damping and mass.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The new x position of the Body. |
| `y` | number |  |  | The new x position of the Body. |
| `resetDamping` | boolean |  <optional> |  false  | Resets the linear and angular damping. |
| `resetMass` | boolean |  <optional> |  false  | Sets the Body mass back to 1. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 871](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L871))   ### 
reverse(speed)

  Applies a force to the Body that causes it to 'thrust' backwards (in reverse), based on its current angle and the given speed.  
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should reverse. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 759](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L759))   ### 
rotateLeft(speed)

  This will rotate the Body by the given speed to the left (counter-clockwise).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should rotate. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 650](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L650))   ### 
rotateRight(speed)

  This will rotate the Body by the given speed to the left (clockwise).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should rotate. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 662](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L662))   ### 
setCircle(radius, offsetX, offsetY, rotation)

  Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body.  
If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `radius` | number |  |  | The radius of this circle (in pixels) |
| `offsetX` | number |  <optional> |  0  | Local horizontal offset of the shape relative to the body center of mass. |
| `offsetY` | number |  <optional> |  0  | Local vertical offset of the shape relative to the body center of mass. |
| `rotation` | number |  <optional> |  0  | Local rotation of the shape relative to the body center of mass, specified in radians. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1210](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1210))   ### 
setCollisionGroup(group, shape)

  Sets the given CollisionGroup to be the collision group for all shapes in this Body, unless a shape is specified.  
This also resets the collisionMask.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `group` | Phaser.Physics.CollisionGroup |  | The Collision Group that this Bodies shapes will use. |
| `shape` | p2.Shape |  <optional> | An optional Shape. If not provided the collision group will be added to all Shapes in this Body. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 295](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L295))   ### 
setMaterial(material, shape)

  Adds the given Material to all Shapes that belong to this Body.  
If you only wish to apply it to a specific Shape in this Body then provide that as the 2nd parameter.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `material` | [Phaser.Physics.P2.Material](phaser.physics.p2.material) |  | The Material that will be applied. |
| `shape` | p2.Shape |  <optional> | An optional Shape. If not provided the Material will be added to all Shapes in this Body. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1272](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1272))   ### 
setRectangle(width, height, offsetX, offsetY, rotation) → {p2.Rectangle}

  Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body.  
If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite.  
If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | number |  <optional> |  16  | The width of the rectangle in pixels. |
| `height` | number |  <optional> |  16  | The height of the rectangle in pixels. |
| `offsetX` | number |  <optional> |  0  | Local horizontal offset of the shape relative to the body center of mass. |
| `offsetY` | number |  <optional> |  0  | Local vertical offset of the shape relative to the body center of mass. |
| `rotation` | number |  <optional> |  0  | Local rotation of the shape relative to the body center of mass, specified in radians. |

 ##### Returns

   p2.Rectangle -   The Rectangle shape that was added to the Body.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1228](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1228))   ### 
setRectangleFromSprite(sprite) → {p2.Rectangle}

  Clears any previously set shapes.  
Then creates a Rectangle shape sized to match the dimensions and orientation of the Sprite given.  
If no Sprite is given it defaults to using the parent of this Body.  
If this Body had a previously set Collision Group you will need to re-apply it to the new Shape this creates.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) |  <optional> | The Sprite on which the Rectangle will get its dimensions. |

 ##### Returns

   p2.Rectangle -   The Rectangle shape that was added to the Body.

    Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1252](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1252))   ### 
setZeroDamping()

  Sets the Body damping and angularDamping to zero.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 612](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L612))   ### 
setZeroForce()

  Sets the force on the body to zero.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 578](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L578))   ### 
setZeroRotation()

  If this Body is dynamic then this will zero its angular velocity.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 589](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L589))   ### 
setZeroVelocity()

  If this Body is dynamic then this will zero its velocity on both axis.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L600))   ### 
shapeChanged()

  Updates the debug draw if any body shapes change.

   Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 1296](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L1296))   ### 
thrust(speed)

  Applies a force to the Body that causes it to 'thrust' forwards, based on its current angle and the given speed.  
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should thrust. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 708](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L708))   ### 
thrustLeft(speed)

  Applies a force to the Body that causes it to 'thrust' to the left, based on its current angle and the given speed.  
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should move to the left. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 725](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L725))   ### 
thrustRight(speed)

  Applies a force to the Body that causes it to 'thrust' to the right, based on its current angle and the given speed.  
The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `speed` | number | The speed at which it should move to the right. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 742](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L742))   ### 
toLocalFrame(out, worldPoint)

  Transform a world point to local body frame.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `out` | Float32Array | Array | The vector to store the result in. |
| `worldPoint` | Float32Array | Array | The input world vector. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 624](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L624))   ### 
toWorldFrame(out, localPoint)

  Transform a local point to world frame.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `out` | Array | The vector to store the result in. |
| `localPoint` | Array | The input local vector. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 637](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L637))   ### 
updateCollisionMask(shape)

  Updates the collisionMask.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `shape` | p2.Shape |  <optional> | An optional Shape. If not provided the collision group will be added to all Shapes in this Body. |

  Source code: [physics/p2/Body.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js) ([Line 271](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/Body.js#L271))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.Body.html>

Class: Phaser.Keyboard
======================

 Constructor
-----------

 ### 
new Keyboard(game)

  The Keyboard class monitors keyboard input and dispatches keyboard events.

 *Note*: many keyboards are unable to process certain combinations of keys due to hardware limitations known as ghosting.  
See http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ for more details.

 Also please be aware that certain browser extensions can disable or override Phaser keyboard handling.  
For example the Chrome extension vimium is known to disable Phaser from using the D key. And there are others.  
So please check your extensions before opening Phaser issues.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L21))   Public Properties
-----------------

  ### 
callbackContext : Object

  The context under which the callbacks are run.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L48))   ### 
enabled : boolean

  Keyboard input will only be processed if enabled.

   Default Value * true
 Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L33))   ### 
event : Object

  The most recent DOM event from keydown or keyup. This is updated every time a new key is pressed or released.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L38))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L26))   ### 
[readonly] lastChar : string

  Returns the string value of the most recently pressed key.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 553](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L553))   ### 
[readonly] lastKey : [Phaser.Key](phaser.key)

  Returns the most recently pressed Key. This is a Phaser.Key object and it changes every time a key is pressed.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 576](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L576))   ### 
onDownCallback : Function

  This callback is invoked every time a key is pressed down, including key repeats when a key is held down.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L53))   ### 
onPressCallback : Function

  This callback is invoked every time a DOM onkeypress event is raised, which is only for printable keys.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L58))   ### 
onUpCallback : Function

  This callback is invoked every time a key is released.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L63))   ### 
pressEvent : Object

  The most recent DOM event from keypress.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L43))    Public Methods
--------------

  ### 
addCallbacks(context, onDown, onUp, onPress)

  Add callbacks to the Keyboard handler so that each time a key is pressed down or released the callbacks are activated.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `context` | object |  |  | The context under which the callbacks are run. |
| `onDown` | function |  <optional> |  null  | This callback is invoked every time a key is pressed down. |
| `onUp` | function |  <optional> |  null  | This callback is invoked every time a key is released. |
| `onPress` | function |  <optional> |  null  | This callback is invoked every time the onkeypress event is raised. |

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 114](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L114))   ### 
addKey(keycode) → {[Phaser.Key](phaser.key)}

  If you need more fine-grained control over a Key you can create a new Phaser.Key object via this method.  
The Key object can then be polled, have events attached to it, etc.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `keycode` | integer | The [keycode](phaser.keycode) of the key. |

 ##### Returns

   [Phaser.Key](phaser.key) -   The Key object which you can store locally and reference directly.

    Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L144))   ### 
addKeyCapture(keycode)

  By default when a key is pressed Phaser will not stop the event from propagating up to the browser.  
There are some keys this can be annoying for, like the arrow keys or space bar, which make the browser window scroll.

 The `addKeyCapture` method enables consuming keyboard event for specific keys so it doesn't bubble up to the the browser  
and cause the default browser behavior.

 Pass in either a single keycode or an array/hash of keycodes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `keycode` | integer | Array.<integer> | object | Either a single [keycode](phaser.keycode) or an array/hash of keycodes such as `[65, 67, 68]`. |

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 294](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L294))   ### 
addKeys(keys) → {object}

  A practical way to create an object containing user selected hotkeys.

 For example,

 
```
addKeys( { 'up': Phaser.KeyCode.W, 'down': Phaser.KeyCode.S, 'left': Phaser.KeyCode.A, 'right': Phaser.KeyCode.D } );
```

would return an object containing properties (`up`, `down`, `left` and `right`) referring to [Phaser.Key](phaser.key) object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `keys` | object | A key mapping object, i.e. `{ 'up': Phaser.KeyCode.W, 'down': Phaser.KeyCode.S }` or `{ 'up': 52, 'down': 53 }`. |

 ##### Returns

   object -   An object containing the properties mapped to [Phaser.Key](phaser.key) values.

    Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L165))   ### 
clearCaptures()

  Clear all set key captures.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 333](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L333))   ### 
createCursorKeys() → {object}

  Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right.

  ##### Returns

   object -   An object containing properties: `up`, `down`, `left` and `right` of [Phaser.Key](phaser.key) objects.

    Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L208))   ### 
destroy()

  Stops the Keyboard event listeners from running (keydown and keyup). They are removed from the window.  
Also clears all key captures and currently created Key objects.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 277](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L277))   ### 
downDuration(keycode, duration) → {boolean}

  Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down,  
or was pressed down longer ago than then given duration.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `keycode` | integer |  |  | The [keycode](phaser.keycode) of the key to check: i.e. Phaser.KeyCode.UP or Phaser.KeyCode.SPACEBAR. |
| `duration` | number |  <optional> |  50  | The duration within which the key is considered as being just pressed. Given in ms. |

 ##### Returns

   boolean -   True if the key was pressed down within the given duration, false if not or null if the Key wasn't found.

    Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 487](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L487))   ### 
isDown(keycode) → {boolean}

  Returns true of the key is currently pressed down. Note that it can only detect key presses on the web browser.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `keycode` | integer | The [keycode](phaser.keycode) of the key to check: i.e. Phaser.KeyCode.UP or Phaser.KeyCode.SPACEBAR. |

 ##### Returns

   boolean -   True if the key is currently down, false if not or null if the Key wasn't found.

    Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 531](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L531))   ### 
<internal> processKeyDown(event)

  Process the keydown event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | KeyboardEvent |  |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 363](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L363))   ### 
<internal> processKeyPress(event)

  Process the keypress event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | KeyboardEvent |  |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 403](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L403))   ### 
<internal> processKeyUp(event)

  Process the keyup event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | KeyboardEvent |  |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 426](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L426))   ### 
removeKey(keycode)

  Removes a Key object from the Keyboard manager.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `keycode` | integer | The [keycode](phaser.keycode) of the key to remove. |

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L191))   ### 
removeKeyCapture(keycode)

  Removes an existing key capture.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `keycode` | integer | The [keycode](phaser.keycode) to remove capturing of. |

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L321))   ### 
reset(hard)

  Resets all Keys.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `hard` | boolean |  <optional> |  true  | A soft reset won't reset any events or callbacks that are bound to the Keys. A hard reset will. |

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 463](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L463))   ### 
<internal> start()

  Starts the Keyboard event listeners running (keydown and keyup). They are attached to the window.  
This is called automatically by Phaser.Input and should not normally be invoked directly.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L220))   ### 
stop()

  Stops the Keyboard event listeners from running (keydown, keyup and keypress). They are removed from the window.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 260](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L260))   ### 
update()

  Updates all currently defined keys.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 344](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L344))   ### 
upDuration(keycode, duration) → {boolean}

  Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down,  
or was pressed down longer ago than then given duration.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `keycode` | [Phaser.KeyCode](phaser.keycode) | integer |  |  | The keycode of the key to check, i.e. Phaser.KeyCode.UP or Phaser.KeyCode.SPACEBAR. |
| `duration` | number |  <optional> |  50  | The duration within which the key is considered as being just released. Given in ms. |

 ##### Returns

   boolean -   True if the key was released within the given duration, false if not or null if the Key wasn't found.

    Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 509](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L509))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Keyboard.html>

Class: Phaser.Mouse
===================

 Constructor
-----------

 ### 
new Mouse(game)

  The Mouse class is responsible for handling all aspects of mouse interaction with the browser.

 It captures and processes mouse events that happen on the game canvas object.  
It also adds a single `mouseup` listener to `window` which is used to capture the mouse being released  
when not over the game.

 You should not normally access this class directly, but instead use a Phaser.Pointer object  
which normalises all game input for you, including accurate button handling.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L21))   Public Properties
-----------------

  ### 
[static] BACK\_BUTTON : number

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 190](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L190))   ### 
[static] FORWARD\_BUTTON : number

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 196](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L196))   ### 
[static] LEFT\_BUTTON : number

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 172](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L172))   ### 
[static] MIDDLE\_BUTTON : number

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 178](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L178))   ### 
[static] NO\_BUTTON : number

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 166](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L166))   ### 
[static] RIGHT\_BUTTON : number

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 184](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L184))   ### 
[static] WHEEL\_DOWN : number

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L208))   ### 
[static] WHEEL\_UP : number

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 202](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L202))   ### 
button : number

  This property was removed in Phaser 2.4 and should no longer be used.  
Instead please see the Pointer button properties such as `Pointer.leftButton`, `Pointer.rightButton` and so on.  
Or Pointer.button holds the DOM event button value if you require that.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 76](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L76))   ### 
callbackContext : Object

  The context under which callbacks are called.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L37))   ### 
capture : boolean

  If true the DOM mouse events will have event.preventDefault applied to them, if false they will propagate fully.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 67](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L67))   ### 
enabled : boolean

  Mouse input will only be processed if enabled.

   Default Value * true
 Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L89))   ### 
event :MouseEvent | null

  The browser mouse DOM event. Will be null if no mouse event has ever been received.  
Access this property only inside a Mouse event handler and do not keep references to it.

  ##### Type

 * MouseEvent | null

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L115))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L26))   ### 
<internal> input : [Phaser.Input](phaser.input)

  A reference to the Phaser Input Manager.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L32))   ### 
locked : boolean

  If the mouse has been Pointer Locked successfully this will be set to true.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L95))   ### 
mouseDownCallback : Function

  A callback that can be fired when the mouse is pressed down.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L42))   ### 
mouseOutCallback : Function

  A callback that can be fired when the mouse is no longer over the game canvas.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L52))   ### 
mouseOverCallback : Function

  A callback that can be fired when the mouse enters the game canvas (usually after a mouseout).

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L57))   ### 
mouseUpCallback : Function

  A callback that can be fired when the mouse is released from a pressed down state.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 47](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L47))   ### 
mouseWheelCallback : Function

  A callback that can be fired when the mousewheel is used.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 62](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L62))   ### 
pointerLock : [Phaser.Signal](phaser.signal)

  This event is dispatched when the browser enters or leaves pointer lock state.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L107))   ### 
stopOnGameOut : boolean

  If true Pointer.stop will be called if the mouse leaves the game canvas.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 101](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L101))   ### 
wheelDelta : number

  The direction of the *last* mousewheel usage 1 for up -1 for down.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L82))    Public Methods
--------------

  ### 
onMouseDown(event)

  The internal method that handles the mouse down event from the browser.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | The native event from the browser. This gets stored in Mouse.event. |

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 296](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L296))   ### 
onMouseMove(event)

  The internal method that handles the mouse move event from the browser.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | The native event from the browser. This gets stored in Mouse.event. |

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 326](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L326))   ### 
onMouseOut(event)

  The internal method that handles the mouse out event from the browser.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | The native event from the browser. This gets stored in Mouse.event. |

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 444](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L444))   ### 
onMouseOutGlobal(event)

  The internal method that handles the mouse out event from the window.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | The native event from the browser. This gets stored in Mouse.event. |

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 408](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L408))   ### 
onMouseOver(event)

  The internal method that handles the mouse over event from the browser.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | The native event from the browser. This gets stored in Mouse.event. |

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 480](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L480))   ### 
onMouseUp(event)

  The internal method that handles the mouse up event from the browser.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | The native event from the browser. This gets stored in Mouse.event. |

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 356](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L356))   ### 
onMouseUpGlobal(event)

  The internal method that handles the mouse up event from the window.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | The native event from the browser. This gets stored in Mouse.event. |

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L386))   ### 
onMouseWheel(event)

  The internal method that handles the mouse wheel event from the browser.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | The native event from the browser. |

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 504](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L504))   ### 
pointerLockChange(event)

  Internal pointerLockChange handler.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | [Event](event) | The native event from the browser. This gets stored in Mouse.event. |

  Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 562](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L562))   ### 
releasePointerLock()

  Internal release pointer lock handler.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 587](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L587))   ### 
requestPointerLock()

  If the browser supports it you can request that the pointer be locked to the browser window.  
This is classically known as 'FPS controls', where the pointer can't leave the browser until the user presses an exit key.  
If the browser successfully enters a locked state the event Phaser.Mouse.pointerLock will be dispatched and the first parameter will be 'true'.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 533](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L533))   ### 
start()

  Starts the event listeners running.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 212](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L212))   ### 
stop()

  Stop the event listeners.

   Source code: [input/Mouse.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js) ([Line 603](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Mouse.js#L603))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Mouse.html>

Class: Phaser.TweenManager
==========================

 Constructor
-----------

 ### 
new TweenManager(game)

  Phaser.Game has a single instance of the TweenManager through which all Tween objects are created and updated.  
Tweens are hooked into the game clock and pause system, adjusting based on the game state.

 TweenManager is based heavily on tween.js by http://soledadpenades.com.  
The difference being that tweens belong to a games instance of TweenManager, rather than to a global TWEEN object.  
It also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors.  
Please see https://github.com/sole/tween.js for a full list of contributors.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L20))   Public Properties
-----------------

  ### 
frameBased : boolean

  Are all newly created Tweens frame or time based? A frame based tween will use the physics elapsed timer when updating. This means  
it will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should  
be given in frames.

 If the Tween uses a time based update (which is the default) then the duration is given in milliseconds.  
In this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween  
has actually been through. For very short tweens you may wish to experiment with a frame based update instead.

   Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L38))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L25))    Public Methods
--------------

  ### 
add(tween) → {[Phaser.Tween](phaser.tween)}

  Add a new tween into the TweenManager.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `tween` | [Phaser.Tween](phaser.tween) | The tween object you want to add. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   The tween object you added to the manager.

    Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 189](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L189))   ### 
create(object) → {[Phaser.Tween](phaser.tween)}

  Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | object | Object the tween will be run on. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   The newly created tween object.

    Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L203))   ### 
getAll() → {Array.<[Phaser.Tween](phaser.tween)>}

  Get all the tween objects in an array.

  ##### Returns

   Array.<[Phaser.Tween](phaser.tween)> -   Array with all tween objects.

    Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 114](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L114))   ### 
isTweening(object) → {boolean}

  Checks to see if a particular Sprite is currently being tweened.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | object | The object to check for tweens against. |

 ##### Returns

   boolean -   Returns true if the object is currently being tweened, false if not.

    Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 285](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L285))   ### 
pauseAll()

  Pauses all currently running tweens.

   Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 330](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L330))   ### 
remove(tween)

  Remove a tween from this manager.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `tween` | [Phaser.Tween](phaser.tween) | The tween object you want to remove. |

  Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 216](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L216))   ### 
removeAll()

  Remove all tweens running and in the queue. Doesn't call any of the tween onComplete events.

   Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L125))   ### 
removeFrom(obj, children)

  Remove all tweens from a specific object, array of objects or Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `obj` | object | Array.<object> | [Phaser.Group](phaser.group) |  |  | The object you want to remove the tweens from. |
| `children` | boolean |  <optional> |  true  | If passing a group, setting this to true will remove the tweens from all of its children instead of the group itself. |

  Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 140](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L140))   ### 
resumeAll()

  Resumes all currently paused tweens.

   Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 344](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L344))   ### 
update() → {boolean}

  Update all the tween objects you added to this manager.

  ##### Returns

   boolean -   Return false if there's no tween to update, otherwise return true.

    Source code: [tween/TweenManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js) ([Line 242](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenManager.js#L242))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.TweenManager.html>

Class: Phaser.Physics.P2
========================

 Constructor
-----------

 ### 
new P2(game, config)

  This is your main access to the P2 Physics World.  
From here you can create materials, listen for events and add bodies into the physics simulation.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  | Reference to the current game instance. |
| `config` | object |  <optional> | Physics configuration object passed in from the game constructor. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L20))   Classes
-------

   [Body](phaser.physics.p2.body)   [BodyDebug](phaser.physics.p2.bodydebug)   [CollisionGroup](phaser.physics.p2.collisiongroup)   [ContactMaterial](phaser.physics.p2.contactmaterial)   [DistanceConstraint](phaser.physics.p2.distanceconstraint)   [FixtureList](phaser.physics.p2.fixturelist)   [GearConstraint](phaser.physics.p2.gearconstraint)   [InversePointProxy](phaser.physics.p2.inversepointproxy)   [LockConstraint](phaser.physics.p2.lockconstraint)   [Material](phaser.physics.p2.material)   [PointProxy](phaser.physics.p2.pointproxy)   [PrismaticConstraint](phaser.physics.p2.prismaticconstraint)   [RevoluteConstraint](phaser.physics.p2.revoluteconstraint)   [RotationalSpring](phaser.physics.p2.rotationalspring)   [Spring](phaser.physics.p2.spring)   Public Properties
-----------------

  ### 
applyDamping : boolean

  Enable to automatically apply body damping each step.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1919](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1919))   ### 
applyGravity : boolean

  Enable to automatically apply gravity each step.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1939](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1939))   ### 
applySpringForces : boolean

  Enable to automatically apply spring forces each step.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1899](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1899))   ### 
boundsCollidesWith :array

  An array of the bodies the world bounds collides with.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L232))   ### 
boundsCollisionGroup : [Phaser.Physics.P2.CollisionGroup](phaser.physics.p2.collisiongroup)

  A default collision group.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 222](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L222))   ### 
callbackContext : Object

  The context under which the callbacks are fired.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L170))   ### 
collisionGroups :array

  An array containing the collision groups that have been defined in the World.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 212](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L212))   ### 
<internal> config : Object

  The p2 World configuration object.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L48))   ### 
contactMaterial :p2.ContactMaterial

  The default Contact Material being used by the World.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1879](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1879))   ### 
emitImpactEvent : boolean

  Set to true if you want to the world to emit the "impact" event. Turning this off could improve performance.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1994](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1994))   ### 
everythingCollisionGroup : [Phaser.Physics.P2.CollisionGroup](phaser.physics.p2.collisiongroup)

  A default collision group.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 227](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L227))   ### 
frameRate : number

  The frame rate the world will be stepped at. Defaults to 1 / 60, but you can change here. Also see useElapsedTime property.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L60))   ### 
friction : number

  Friction between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1839](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1839))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L25))   ### 
gravity : [Phaser.Physics.P2.InversePointProxy](phaser.physics.p2.inversepointproxy)

  The gravity applied to all bodies each step.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L83))   ### 
<internal> materials :array.<[Phaser.Physics.P2.Material](phaser.physics.p2.material)>

  A local array of all created Materials.

  ##### Type

 * array.<[Phaser.Physics.P2.Material](phaser.physics.p2.material)>

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L78))   ### 
nothingCollisionGroup : [Phaser.Physics.P2.CollisionGroup](phaser.physics.p2.collisiongroup)

  A default collision group.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L217))   ### 
onBeginContact : [Phaser.Signal](phaser.signal)

  This Signal is dispatched when a first contact is created between two bodies. This happens *before* the step has been done.

 It sends 5 arguments: `bodyA`, `bodyB`, `shapeA`, `shapeB` and `contactEquations`.

 It is possible that in certain situations the `bodyA` or `bodyB` values are `null`. You should check for this  
in your own code to avoid processing potentially null physics bodies.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 182](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L182))   ### 
onBodyAdded : [Phaser.Signal](phaser.signal)

  This signal is dispatched when a new Body is added to the World.

 It sends 1 argument: `body` which is the `Phaser.Physics.P2.Body` that was added to the world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 97](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L97))   ### 
onBodyRemoved : [Phaser.Signal](phaser.signal)

  This signal is dispatched when a Body is removed to the World.

 It sends 1 argument: `body` which is the `Phaser.Physics.P2.Body` that was removed from the world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L106))   ### 
onConstraintAdded : [Phaser.Signal](phaser.signal)

  This signal is dispatched when a Constraint is added to the World.

 It sends 1 argument: `constraint` which is the `Phaser.Physics.P2.Constraint` that was added to the world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 133](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L133))   ### 
onConstraintRemoved : [Phaser.Signal](phaser.signal)

  This signal is dispatched when a Constraint is removed from the World.

 It sends 1 argument: `constraint` which is the `Phaser.Physics.P2.Constraint` that was removed from the world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L142))   ### 
onContactMaterialAdded : [Phaser.Signal](phaser.signal)

  This signal is dispatched when a Contact Material is added to the World.

 It sends 1 argument: `material` which is the `Phaser.Physics.P2.ContactMaterial` that was added to the world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 151](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L151))   ### 
onContactMaterialRemoved : [Phaser.Signal](phaser.signal)

  This signal is dispatched when a Contact Material is removed from the World.

 It sends 1 argument: `material` which is the `Phaser.Physics.P2.ContactMaterial` that was removed from the world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L160))   ### 
onEndContact : [Phaser.Signal](phaser.signal)

  This Signal is dispatched when final contact occurs between two bodies. This happens *before* the step has been done.

 It sends 4 arguments: `bodyA`, `bodyB`, `shapeA` and `shapeB`.

 It is possible that in certain situations the `bodyA` or `bodyB` values are `null`. You should check for this  
in your own code to avoid processing potentially null physics bodies.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 194](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L194))   ### 
onSpringAdded : [Phaser.Signal](phaser.signal)

  This signal is dispatched when a Spring is added to the World.

 It sends 1 argument: `spring` which is either a `Phaser.Physics.P2.Spring`, `p2.LinearSpring` or `p2.RotationalSpring` that was added to the world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L115))   ### 
onSpringRemoved : [Phaser.Signal](phaser.signal)

  This signal is dispatched when a Spring is removed from the World.

 It sends 1 argument: `spring` which is either a `Phaser.Physics.P2.Spring`, `p2.LinearSpring` or `p2.RotationalSpring` that was removed from the world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L124))   ### 
paused : boolean

  The paused state of the P2 World.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L72))   ### 
postBroadphaseCallback : Function

  A postBroadphase callback.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L165))   ### 
restitution : number

  Default coefficient of restitution between colliding bodies. This value is used if no matching ContactMaterial is found for a Material pair.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1859](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1859))   ### 
sleepMode : number

  How to deactivate bodies during simulation. Possible modes are: World.NO\_SLEEPING, World.BODY\_SLEEPING and World.ISLAND\_SLEEPING.  
If sleeping is enabled, you might need to wake up the bodies if they fall asleep when they shouldn't. If you want to enable sleeping in the world, but want to disable it for a particular body, see Body.allowSleep.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 2014](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L2014))   ### 
solveConstraints : boolean

  Enable/disable constraint solving in each step.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1959](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1959))   ### 
[readonly] time : boolean

  The World time.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1979](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1979))   ### 
[readonly] total : number

  The total number of bodies in the world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 2036](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L2036))   ### 
useElapsedTime : boolean

  If true the frameRate value will be ignored and instead p2 will step with the value of Game.Time.physicsElapsed, which is a delta time value.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L66))   ### 
walls : Object

  An object containing the 4 wall bodies that bound the physics world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 88](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L88))   ### 
<internal> world :p2.World

  The p2 World in which the simulation is run.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L54))    Public Methods
--------------

  ### 
addBody(body) → {boolean}

  Add a body to the world.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `body` | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | The Body to add to the World. |

 ##### Returns

   boolean -   True if the Body was added successfully, otherwise false.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 887](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L887))   ### 
addConstraint(constraint) → {Phaser.Physics.P2.Constraint}

  Adds a Constraint to the world.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `constraint` | Phaser.Physics.P2.Constraint | The Constraint to add to the World. |

 ##### Returns

   Phaser.Physics.P2.Constraint -   The Constraint that was added.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1119))   ### 
addContactMaterial(material) → {[Phaser.Physics.P2.ContactMaterial](phaser.physics.p2.contactmaterial)}

  Adds a Contact Material to the world.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `material` | [Phaser.Physics.P2.ContactMaterial](phaser.physics.p2.contactmaterial) | The Contact Material to be added to the World. |

 ##### Returns

   [Phaser.Physics.P2.ContactMaterial](phaser.physics.p2.contactmaterial) -   The Contact Material that was added.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1153))   ### 
addSpring(spring) → {[Phaser.Physics.P2.Spring](phaser.physics.p2.spring)}

  Adds a Spring to the world.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `spring` | [Phaser.Physics.P2.Spring](phaser.physics.p2.spring) | p2.LinearSpring | p2.RotationalSpring | The Spring to add to the World. |

 ##### Returns

   [Phaser.Physics.P2.Spring](phaser.physics.p2.spring) -   The Spring that was added.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 931](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L931))   ### 
beginContactHandler(event)

  Handles a p2 begin contact event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | object | The event data. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 502](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L502))   ### 
clear()

  Clears all bodies from the simulation, resets callbacks and resets the collision bitmask.

 The P2 world is also cleared:

 * Removes all solver equations
* Removes all constraints
* Removes all bodies
* Removes all springs
* Removes all contact materials

 This is called automatically when you switch state.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 800](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L800))   ### 
clearTilemapLayerBodies(map, layer)

  Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `map` | [Phaser.Tilemap](phaser.tilemap) |  | The Tilemap to get the map data from. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> | The layer to operate on. If not given will default to map.currentLayer. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1666](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1666))   ### 
convertCollisionObjects(map, layer, addToWorld) → {array}

  Converts all of the polylines objects inside a Tiled ObjectGroup into physics bodies that are added to the world.  
Note that the polylines must be created in such a way that they can withstand polygon decomposition.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `map` | [Phaser.Tilemap](phaser.tilemap) |  |  | The Tilemap to get the map data from. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> |  | The layer to operate on. If not given will default to map.currentLayer. |
| `addToWorld` | boolean |  <optional> |  true  | If true it will automatically add each body to the world. |

 ##### Returns

   array -   An array of the Phaser.Physics.Body objects that have been created.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1625](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1625))   ### 
convertTilemap(map, layer, addToWorld, optimize) → {array}

  Goes through all tiles in the given Tilemap and TilemapLayer and converts those set to collide into physics bodies.  
Only call this *after* you have specified all of the tiles you wish to collide with calls like Tilemap.setCollisionBetween, etc.  
Every time you call this method it will destroy any previously created bodies and remove them from the world.  
Therefore understand it's a very expensive operation and not to be done in a core game update loop.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `map` | [Phaser.Tilemap](phaser.tilemap) |  |  | The Tilemap to get the map data from. |
| `layer` | number | string | [Phaser.TilemapLayer](phaser.tilemaplayer) |  <optional> |  | The layer to operate on. If not given will default to map.currentLayer. |
| `addToWorld` | boolean |  <optional> |  true  | If true it will automatically add each body to the world, otherwise it's up to you to do so. |
| `optimize` | boolean |  <optional> |  true  | If true adjacent colliding tiles will be combined into a single body to save processing. However it means you cannot perform specific Tile to Body collision responses. |

 ##### Returns

   array -   An array of the Phaser.Physics.P2.Body objects that were created.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1688](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1688))   ### 
createBody(x, y, mass, addToWorld, options, points) → {[Phaser.Physics.P2.Body](phaser.physics.p2.body)}

  Creates a new Body and adds it to the World.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate of Body. |
| `y` | number |  |  | The y coordinate of Body. |
| `mass` | number |  |  | The mass of the Body. A mass of 0 means a 'static' Body is created. |
| `addToWorld` | boolean |  <optional> |  false  | Automatically add this Body to the world? (usually false as it won't have any shapes on construction). |
| `options` | object |  |  | An object containing the build options: Properties

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `optimalDecomp` | boolean |  <optional> |  false  | Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. |
| `skipSimpleCheck` | boolean |  <optional> |  false  | Set to true if you already know that the path is not intersecting itself. |
| `removeCollinearPoints` | boolean | number |  <optional> |  false  | Set to a number (angle threshold value) to remove collinear points, or false to keep all points. |

 |
| `points` | Array.<number> | number |  |  | An array of 2d vectors that form the convex or concave polygon. Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. |

 ##### Returns

   [Phaser.Physics.P2.Body](phaser.physics.p2.body) -   The body

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1542](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1542))   ### 
createCollisionGroup(object)

  Creates a new Collision Group and optionally applies it to the given object.  
Collision Groups are handled using bitmasks, therefore you have a fixed limit you can create before you need to re-use older groups.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | [Phaser.Group](phaser.group) | [Phaser.Sprite](phaser.sprite) |  <optional> | An optional Sprite or Group to apply the Collision Group to. If a Group is given it will be applied to all top-level children. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1411](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1411))   ### 
createContactMaterial(materialA, materialB, options) → {[Phaser.Physics.P2.ContactMaterial](phaser.physics.p2.contactmaterial)}

  Creates a Contact Material from the two given Materials. You can then edit the properties of the Contact Material directly.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `materialA` | [Phaser.Physics.P2.Material](phaser.physics.p2.material) |  <optional> | The first Material to create the ContactMaterial from. If undefined it will create a new Material object first. |
| `materialB` | [Phaser.Physics.P2.Material](phaser.physics.p2.material) |  <optional> | The second Material to create the ContactMaterial from. If undefined it will create a new Material object first. |
| `options` | object |  <optional> | Material options object. |

 ##### Returns

   [Phaser.Physics.P2.ContactMaterial](phaser.physics.p2.contactmaterial) -   The Contact Material that was created.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1246))   ### 
createDistanceConstraint(bodyA, bodyB, distance, localAnchorA, localAnchorB, maxForce) → {[Phaser.Physics.P2.DistanceConstraint](phaser.physics.p2.distanceconstraint)}

  Creates a constraint that tries to keep the distance between two bodies constant.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `bodyA` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  | First connected body. |
| `bodyB` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  | Second connected body. |
| `distance` | number |  | The distance to keep between the bodies. |
| `localAnchorA` | Array |  <optional> | The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0]. |
| `localAnchorB` | Array |  <optional> | The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0]. |
| `maxForce` | number |  <optional> | The maximum force that should be applied to constrain the bodies. |

 ##### Returns

   [Phaser.Physics.P2.DistanceConstraint](phaser.physics.p2.distanceconstraint) -   The constraint

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 979](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L979))   ### 
createGearConstraint(bodyA, bodyB, angle, ratio) → {[Phaser.Physics.P2.GearConstraint](phaser.physics.p2.gearconstraint)}

  Creates a constraint that tries to keep the distance between two bodies constant.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `bodyA` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `angle` | number |  <optional> |  0  | The relative angle |
| `ratio` | number |  <optional> |  1  | The gear ratio. |

 ##### Returns

   [Phaser.Physics.P2.GearConstraint](phaser.physics.p2.gearconstraint) -   The constraint

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1007](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1007))   ### 
createLockConstraint(bodyA, bodyB, offset, angle, maxForce) → {[Phaser.Physics.P2.LockConstraint](phaser.physics.p2.lockconstraint)}

  Locks the relative position between two bodies.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `bodyA` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `offset` | Array |  <optional> |  | The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `angle` | number |  <optional> |  0  | The angle of bodyB in bodyA's frame. |
| `maxForce` | number |  <optional> |  | The maximum force that should be applied to constrain the bodies. |

 ##### Returns

   [Phaser.Physics.P2.LockConstraint](phaser.physics.p2.lockconstraint) -   The constraint

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1062](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1062))   ### 
createMaterial(name, body) → {[Phaser.Physics.P2.Material](phaser.physics.p2.material)}

  Creates a Material. Materials are applied to Shapes owned by a Body and can be set with Body.setMaterial().  
Materials are a way to control what happens when Shapes collide. Combine unique Materials together to create Contact Materials.  
Contact Materials have properties such as friction and restitution that allow for fine-grained collision control between different Materials.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `name` | string |  <optional> | Optional name of the Material. Each Material has a unique ID but string names are handy for debugging. |
| `body` | [Phaser.Physics.P2.Body](phaser.physics.p2.body) |  <optional> | Optional Body. If given it will assign the newly created Material to the Body shapes. |

 ##### Returns

   [Phaser.Physics.P2.Material](phaser.physics.p2.material) -   The Material that was created. This is also stored in Phaser.Physics.P2.materials.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1219](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1219))   ### 
createParticle(x, y, mass, addToWorld, options, points)

  Creates a new Particle and adds it to the World.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate of Body. |
| `y` | number |  |  | The y coordinate of Body. |
| `mass` | number |  |  | The mass of the Body. A mass of 0 means a 'static' Body is created. |
| `addToWorld` | boolean |  <optional> |  false  | Automatically add this Body to the world? (usually false as it won't have any shapes on construction). |
| `options` | object |  |  | An object containing the build options: Properties

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `optimalDecomp` | boolean |  <optional> |  false  | Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. |
| `skipSimpleCheck` | boolean |  <optional> |  false  | Set to true if you already know that the path is not intersecting itself. |
| `removeCollinearPoints` | boolean | number |  <optional> |  false  | Set to a number (angle threshold value) to remove collinear points, or false to keep all points. |

 |
| `points` | Array.<number> | number |  |  | An array of 2d vectors that form the convex or concave polygon. Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1584](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1584))   ### 
createPrismaticConstraint(bodyA, bodyB, lockRotation, anchorA, anchorB, axis, maxForce) → {[Phaser.Physics.P2.PrismaticConstraint](phaser.physics.p2.prismaticconstraint)}

  Constraint that only allows bodies to move along a line, relative to each other.  
See http://www.iforce2d.net/b2dtut/joints-prismatic

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `bodyA` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `lockRotation` | boolean |  <optional> |  true  | If set to false, bodyB will be free to rotate around its anchor point. |
| `anchorA` | Array |  <optional> |  | Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `anchorB` | Array |  <optional> |  | Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `axis` | Array |  <optional> |  | An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `maxForce` | number |  <optional> |  | The maximum force that should be applied to constrain the bodies. |

 ##### Returns

   [Phaser.Physics.P2.PrismaticConstraint](phaser.physics.p2.prismaticconstraint) -   The constraint

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1089](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1089))   ### 
createRevoluteConstraint(bodyA, pivotA, bodyB, pivotB, maxForce, worldPivot) → {[Phaser.Physics.P2.RevoluteConstraint](phaser.physics.p2.revoluteconstraint)}

  Connects two bodies at given offset points, letting them rotate relative to each other around this point.  
The pivot points are given in world (pixel) coordinates.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `bodyA` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `pivotA` | Array |  |  | The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `bodyB` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `pivotB` | Array |  |  | The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. |
| `maxForce` | number |  <optional> |  0  | The maximum force that should be applied to constrain the bodies. |
| `worldPivot` | Float32Array |  <optional> |  null  | A pivot point given in world coordinates. If specified, localPivotA and localPivotB are automatically computed from this value. |

 ##### Returns

   [Phaser.Physics.P2.RevoluteConstraint](phaser.physics.p2.revoluteconstraint) -   The constraint

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1033](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1033))   ### 
createRotationalSpring(bodyA, bodyB, restAngle, stiffness, damping) → {[Phaser.Physics.P2.RotationalSpring](phaser.physics.p2.rotationalspring)}

  Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `bodyA` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `restAngle` | number |  <optional> |  | The relative angle of bodies at which the spring is at rest. If not given, it's set to the current relative angle between the bodies. |
| `stiffness` | number |  <optional> |  100  | Stiffness of the spring. A number >= 0. |
| `damping` | number |  <optional> |  1  | Damping of the spring. A number >= 0. |

 ##### Returns

   [Phaser.Physics.P2.RotationalSpring](phaser.physics.p2.rotationalspring) -   The spring

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1515](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1515))   ### 
createSpring(bodyA, bodyB, restLength, stiffness, damping, worldA, worldB, localA, localB) → {[Phaser.Physics.P2.Spring](phaser.physics.p2.spring)}

  Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `bodyA` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | First connected body. |
| `bodyB` | [Phaser.Sprite](phaser.sprite) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) |  |  | Second connected body. |
| `restLength` | number |  <optional> |  1  | Rest length of the spring. A number > 0. |
| `stiffness` | number |  <optional> |  100  | Stiffness of the spring. A number >= 0. |
| `damping` | number |  <optional> |  1  | Damping of the spring. A number >= 0. |
| `worldA` | Array |  <optional> |  | Where to hook the spring to body A in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. |
| `worldB` | Array |  <optional> |  | Where to hook the spring to body B in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. |
| `localA` | Array |  <optional> |  | Where to hook the spring to body A in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. |
| `localB` | Array |  <optional> |  | Where to hook the spring to body B in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. |

 ##### Returns

   [Phaser.Physics.P2.Spring](phaser.physics.p2.spring) -   The spring

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1484](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1484))   ### 
destroy()

  Clears all bodies from the simulation and unlinks World from Game. Should only be called on game shutdown. Call `clear` on a State change.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 874](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L874))   ### 
enable(object, debug, children)

  This will create a P2 Physics body on the given game object or array of game objects.  
A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed.  
Note: When the game object is enabled for P2 physics it has its anchor x/y set to 0.5 so it becomes centered.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object` | object | array | [Phaser.Group](phaser.group) |  |  | The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. |
| `debug` | boolean |  <optional> |  false  | Create a debug object to go with this body? |
| `children` | boolean |  <optional> |  true  | Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 313](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L313))   ### 
enableBody(object, debug)

  Creates a P2 Physics body on the given game object.  
A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | object | The game object to create the physics body on. A body will only be created if this object has a null `body` property. |
| `debug` | boolean | Create a debug object to go with this body? |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 372](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L372))   ### 
endContactHandler(event)

  Handles a p2 end contact event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | object | The event data. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 527](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L527))   ### 
getBodies() → {array.<[Phaser.Physics.P2.Body](phaser.physics.p2.body)>}

  Populates and returns an array with references to of all current Bodies in the world.

  ##### Returns

   array.<[Phaser.Physics.P2.Body](phaser.physics.p2.body)> -   An array containing all current Bodies in the world.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1266](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1266))   ### 
getBody(object) → {[p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html)}

  Checks the given object to see if it has a p2.Body and if so returns it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | object | The object to check for a p2.Body on. |

 ##### Returns

   [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html) -   The p2.Body, or null if not found.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1286](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1286))   ### 
getConstraints() → {array.<Phaser.Physics.P2.Constraint>}

  Populates and returns an array of all current Constraints in the world.  
You will get an array of p2 constraints back. This can be of mixed types, for example the array may contain  
PrismaticConstraints, RevoluteConstraints or any other valid p2 constraint type.

  ##### Returns

   array.<Phaser.Physics.P2.Constraint> -   An array containing all current Constraints in the world.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1335](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1335))   ### 
getContactMaterial(materialA, materialB) → {[Phaser.Physics.P2.ContactMaterial](phaser.physics.p2.contactmaterial) | boolean}

  Gets a Contact Material based on the two given Materials.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `materialA` | [Phaser.Physics.P2.Material](phaser.physics.p2.material) | The first Material to search for. |
| `materialB` | [Phaser.Physics.P2.Material](phaser.physics.p2.material) | The second Material to search for. |

 ##### Returns

   [Phaser.Physics.P2.ContactMaterial](phaser.physics.p2.contactmaterial) | boolean -   The Contact Material or false if none was found matching the Materials given.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1187](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1187))   ### 
getSprings() → {array.<[Phaser.Physics.P2.Spring](phaser.physics.p2.spring)>}

  Populates and returns an array of all current Springs in the world.

  ##### Returns

   array.<[Phaser.Physics.P2.Spring](phaser.physics.p2.spring)> -   An array containing all current Springs in the world.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1315))   ### 
hitTest(worldPoint, bodies, precision, filterStatic) → {Array}

  Test if a world point overlaps bodies. You will get an array of actual P2 bodies back. You can find out which Sprite a Body belongs to  
(if any) by checking the Body.parent.sprite property. Body.parent is a Phaser.Physics.P2.Body property.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `worldPoint` | [Phaser.Point](phaser.point) |  |  | Point to use for intersection tests. The points values must be in world (pixel) coordinates. |
| `bodies` | Array.<([Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Sprite](phaser.sprite) | [p2.Body](http://phaser.io/docs/2.6.2/p2.Body.html))> |  <optional> |  | A list of objects to check for intersection. If not given it will check Phaser.Physics.P2.world.bodies (i.e. all world bodies) |
| `precision` | number |  <optional> |  5  | Used for matching against particles and lines. Adds some margin to these infinitesimal objects. |
| `filterStatic` | boolean |  <optional> |  false  | If true all Static objects will be removed from the results array. |

 ##### Returns

   Array -   Array of bodies that overlap the point.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1357](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1357))   ### 
mpx(v) → {number}

  Convert p2 physics value (meters) to pixel scale.  
By default Phaser uses a scale of 20px per meter.  
If you need to modify this you can over-ride these functions via the Physics Configuration object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `v` | number | The value to convert. |

 ##### Returns

   number -   The scaled value.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1777](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1777))   ### 
mpxi(v) → {number}

  Convert p2 physics value (meters) to pixel scale and inverses it.  
By default Phaser uses a scale of 20px per meter.  
If you need to modify this you can over-ride these functions via the Physics Configuration object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `v` | number | The value to convert. |

 ##### Returns

   number -   The scaled value.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1807](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1807))   ### 
pause()

  Pauses the P2 World independent of the game pause state.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 733](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L733))   ### 
preUpdate()

  Called at the start of the core update loop. Purges flagged bodies from the world.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 295](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L295))   ### 
pxm(v) → {number}

  Convert pixel value to p2 physics scale (meters).  
By default Phaser uses a scale of 20px per meter.  
If you need to modify this you can over-ride these functions via the Physics Configuration object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `v` | number | The value to convert. |

 ##### Returns

   number -   The scaled value.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1792](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1792))   ### 
pxmi(v) → {number}

  Convert pixel value to p2 physics scale (meters) and inverses it.  
By default Phaser uses a scale of 20px per meter.  
If you need to modify this you can over-ride these functions via the Physics Configuration object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `v` | number | The value to convert. |

 ##### Returns

   number -   The scaled value.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1822](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1822))   ### 
removeBody(body) → {[Phaser.Physics.P2.Body](phaser.physics.p2.body)}

  Removes a body from the world. This will silently fail if the body wasn't part of the world to begin with.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `body` | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | The Body to remove from the World. |

 ##### Returns

   [Phaser.Physics.P2.Body](phaser.physics.p2.body) -   The Body that was removed.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 911](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L911))   ### 
removeBodyNextStep(body)

  This will add a P2 Physics body into the removal list for the next step.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `body` | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | The body to remove at the start of the next step. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 283](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L283))   ### 
removeConstraint(constraint) → {Phaser.Physics.P2.Constraint}

  Removes a Constraint from the world.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `constraint` | Phaser.Physics.P2.Constraint | The Constraint to be removed from the World. |

 ##### Returns

   Phaser.Physics.P2.Constraint -   The Constraint that was removed.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1136](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1136))   ### 
removeContactMaterial(material) → {[Phaser.Physics.P2.ContactMaterial](phaser.physics.p2.contactmaterial)}

  Removes a Contact Material from the world.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `material` | [Phaser.Physics.P2.ContactMaterial](phaser.physics.p2.contactmaterial) | The Contact Material to be removed from the World. |

 ##### Returns

   [Phaser.Physics.P2.ContactMaterial](phaser.physics.p2.contactmaterial) -   The Contact Material that was removed.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1170))   ### 
removeSpring(spring) → {[Phaser.Physics.P2.Spring](phaser.physics.p2.spring)}

  Removes a Spring from the world.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `spring` | [Phaser.Physics.P2.Spring](phaser.physics.p2.spring) | The Spring to remove from the World. |

 ##### Returns

   [Phaser.Physics.P2.Spring](phaser.physics.p2.spring) -   The Spring that was removed.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 955](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L955))   ### 
reset()

  Called by Phaser.Physics when a State swap occurs.  
Starts the begin and end Contact listeners again.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 779](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L779))   ### 
resume()

  Resumes a paused P2 World.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 744](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L744))   ### 
setBounds(x, y, width, height, left, right, top, bottom, setCollisionGroup)

  Sets the bounds of the Physics world to match the given world pixel dimensions.  
You can optionally set which 'walls' to create: left, right, top or bottom.  
If none of the walls are given it will default to use the walls settings it had previously.  
I.e. if you previously told it to not have the left or right walls, and you then adjust the world size  
the newly created bounds will also not have the left and right walls.  
Explicitly state them in the parameters to override this.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate of the top-left corner of the bounds. |
| `y` | number |  |  | The y coordinate of the top-left corner of the bounds. |
| `width` | number |  |  | The width of the bounds. |
| `height` | number |  |  | The height of the bounds. |
| `left` | boolean |  <optional> |  true  | If true will create the left bounds wall. |
| `right` | boolean |  <optional> |  true  | If true will create the right bounds wall. |
| `top` | boolean |  <optional> |  true  | If true will create the top bounds wall. |
| `bottom` | boolean |  <optional> |  true  | If true will create the bottom bounds wall. |
| `setCollisionGroup` | boolean |  <optional> |  true  | If true the Bounds will be set to use its own Collision Group. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 646](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L646))   ### 
setImpactEvents(state)

  Impact event handling is disabled by default. Enable it before any impact events will be dispatched.  
In a busy world hundreds of impact events can be generated every step, so only enable this if you cannot do what you need via beginContact or collision masks.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `state` | boolean | Set to true to enable impact events, or false to disable. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 393](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L393))   ### 
setMaterial(material, bodies)

  Sets the given Material against all Shapes owned by all the Bodies in the given array.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `material` | [Phaser.Physics.P2.Material](phaser.physics.p2.material) | The Material to be applied to the given Bodies. |
| `bodies` | array.<[Phaser.Physics.P2.Body](phaser.physics.p2.body)> | An Array of Body objects that the given Material will be set on. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1201](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1201))   ### 
setPostBroadphaseCallback(callback, context)

  Sets a callback to be fired after the Broadphase has collected collision pairs in the world.  
Just because a pair exists it doesn't mean they *will* collide, just that they potentially could do.  
If your calback returns `false` the pair will be removed from the narrowphase. This will stop them testing for collision this step.  
Returning `true` from the callback will ensure they are checked in the narrowphase.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `callback` | function | The callback that will receive the postBroadphase event data. It must return a boolean. Set to null to disable an existing callback. |
| `context` | object | The context under which the callback will be fired. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 413](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L413))   ### 
toJSON() → {object}

  Converts the current world into a JSON object.

  ##### Returns

   object -   A JSON representation of the world.

    Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 1399](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L1399))   ### 
update()

  Internal P2 update loop.

   Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 755](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L755))   ### 
updateBoundsCollisionGroup(setCollisionGroup)

  By default the World will be set to collide everything with everything. The bounds of the world is a Body with 4 shapes, one for each face.  
If you start to use your own collision groups then your objects will no longer collide with the bounds.  
To fix this you need to adjust the bounds to use its own collision group first BEFORE changing your Sprites collision group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `setCollisionGroup` | boolean |  <optional> |  true  | If true the Bounds will be set to use its own Collision Group. |

  Source code: [physics/p2/World.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js) ([Line 608](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/World.js#L608))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.html>

Class: Phaser.KeyCode
=====================

 Constructor
-----------

 ### 
new KeyCode()

  A key code represents a physical key on a keyboard.

 The KeyCode class contains commonly supported keyboard key codes which can be used  
as keycode`-parameters in several [Phaser.Keyboard](phaser.keyboard) and [Phaser.Key](phaser.key) methods.

 *Note*: These values should only be used indirectly, eg. as `Phaser.KeyCode.KEY`.  
Future versions may replace the actual values, such that they remain compatible with `keycode`-parameters.  
The current implementation maps to the [KeyboardEvent.keyCode](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode) property.

 *Note*: Use `Phaser.KeyCode.KEY` instead of `Phaser.Keyboard.KEY` to refer to a key code;  
the latter approach is supported for compatibility.

   Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 609](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L609))   Public Properties
-----------------

  ### 
<static> A

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L611))   ### 
<static> ALT

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 779](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L779))   ### 
<static> B

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 613](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L613))   ### 
<static> BACKSPACE

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 767](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L767))   ### 
<static> BACKWARD\_SLASH

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 761](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L761))   ### 
<static> C

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 615](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L615))   ### 
<static> CAPS\_LOCK

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 781](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L781))   ### 
<static> CLEAR

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 771](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L771))   ### 
<static> CLOSED\_BRACKET

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 763](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L763))   ### 
<static> COLON

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 745](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L745))   ### 
<static> COMMA

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 749](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L749))   ### 
<static> CONTROL

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 777](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L777))   ### 
<static> D

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 617](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L617))   ### 
<static> DELETE

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 809](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L809))   ### 
<static> DOWN

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 801](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L801))   ### 
<static> E

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 619](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L619))   ### 
<static> EIGHT

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 679](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L679))   ### 
<static> END

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 791](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L791))   ### 
<static> ENTER

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 773](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L773))   ### 
<static> EQUALS

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 747](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L747))   ### 
<static> ESC

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 783](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L783))   ### 
<static> F

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 621](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L621))   ### 
<static> F1

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 715](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L715))   ### 
<static> F2

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L717))   ### 
<static> F3

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 719](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L719))   ### 
<static> F4

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 721](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L721))   ### 
<static> F5

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 723](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L723))   ### 
<static> F6

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 725](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L725))   ### 
<static> F7

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 727](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L727))   ### 
<static> F8

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 729](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L729))   ### 
<static> F9

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 731](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L731))   ### 
<static> F10

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 733](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L733))   ### 
<static> F11

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 735](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L735))   ### 
<static> F12

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 737](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L737))   ### 
<static> F13

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 739](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L739))   ### 
<static> F14

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 741](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L741))   ### 
<static> F15

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 743](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L743))   ### 
<static> FIVE

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 673](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L673))   ### 
<static> FOUR

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 671](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L671))   ### 
<static> G

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 623](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L623))   ### 
<static> H

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 625](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L625))   ### 
<static> HELP

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 811](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L811))   ### 
<static> HOME

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 793](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L793))   ### 
<static> I

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 627](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L627))   ### 
<static> INSERT

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 807](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L807))   ### 
<static> J

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 629](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L629))   ### 
<static> K

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 631](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L631))   ### 
<static> L

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 633](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L633))   ### 
<static> LEFT

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 795](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L795))   ### 
<static> M

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 635](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L635))   ### 
<static> MINUS

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 805](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L805))   ### 
<static> N

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 637](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L637))   ### 
<static> NINE

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 681](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L681))   ### 
<static> NUM\_LOCK

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 813](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L813))   ### 
<static> NUMPAD\_0

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 683](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L683))   ### 
<static> NUMPAD\_1

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 685](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L685))   ### 
<static> NUMPAD\_2

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 687](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L687))   ### 
<static> NUMPAD\_3

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 689](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L689))   ### 
<static> NUMPAD\_4

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 691](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L691))   ### 
<static> NUMPAD\_5

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 693](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L693))   ### 
<static> NUMPAD\_6

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 695](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L695))   ### 
<static> NUMPAD\_7

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 697](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L697))   ### 
<static> NUMPAD\_8

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 699](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L699))   ### 
<static> NUMPAD\_9

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 701](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L701))   ### 
<static> NUMPAD\_ADD

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 705](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L705))   ### 
<static> NUMPAD\_DECIMAL

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 711](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L711))   ### 
<static> NUMPAD\_DIVIDE

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 713](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L713))   ### 
<static> NUMPAD\_ENTER

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 707](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L707))   ### 
<static> NUMPAD\_MULTIPLY

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 703](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L703))   ### 
<static> NUMPAD\_SUBTRACT

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 709](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L709))   ### 
<static> O

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 639](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L639))   ### 
<static> ONE

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 665](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L665))   ### 
<static> OPEN\_BRACKET

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 759](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L759))   ### 
<static> P

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 641](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L641))   ### 
<static> PAGE\_DOWN

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 789](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L789))   ### 
<static> PAGE\_UP

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 787](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L787))   ### 
<static> PERIOD

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 753](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L753))   ### 
<static> PLUS

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 803](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L803))   ### 
<static> Q

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 643](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L643))   ### 
<static> QUESTION\_MARK

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 755](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L755))   ### 
<static> QUOTES

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 765](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L765))   ### 
<static> R

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 645](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L645))   ### 
<static> RIGHT

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 799](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L799))   ### 
<static> S

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 647](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L647))   ### 
<static> SEVEN

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 677](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L677))   ### 
<static> SHIFT

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 775](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L775))   ### 
<static> SIX

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 675](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L675))   ### 
<static> SPACEBAR

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 785](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L785))   ### 
<static> T

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 649](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L649))   ### 
<static> TAB

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 769](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L769))   ### 
<static> THREE

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 669](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L669))   ### 
<static> TILDE

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 757](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L757))   ### 
<static> TWO

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 667](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L667))   ### 
<static> U

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 651](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L651))   ### 
<static> UNDERSCORE

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 751](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L751))   ### 
<static> UP

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 797](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L797))   ### 
<static> V

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 653](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L653))   ### 
<static> W

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 655](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L655))   ### 
<static> X

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 657](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L657))   ### 
<static> Y

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 659](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L659))   ### 
<static> Z

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 661](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L661))   ### 
<static> ZERO

  Source code: [input/Keyboard.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js) ([Line 663](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Keyboard.js#L663))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.KeyCode.html>

Class: Phaser.MSPointer
=======================

 Constructor
-----------

 ### 
new MSPointer(game)

  The MSPointer class handles Microsoft touch interactions with the game and the resulting Pointer objects.

 It will work only in Internet Explorer 10+ and Windows Store or Windows Phone 8 apps using JavaScript.  
http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx

 You should not normally access this class directly, but instead use a Phaser.Pointer object which  
normalises all game input for you including accurate button handling.

 Please note that at the current time of writing Phaser does not yet support chorded button interactions:  
http://www.w3.org/TR/pointerevents/#chorded-button-interactions

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L23))   Public Properties
-----------------

  ### 
button : number

  This property was removed in Phaser 2.4 and should no longer be used.  
Instead please see the Pointer button properties such as `Pointer.leftButton`, `Pointer.rightButton` and so on.  
Or Pointer.button holds the DOM event button value if you require that.

   Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 67](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L67))   ### 
callbackContext : Object

  The context under which callbacks are called (defaults to game).

   Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L39))   ### 
capture : boolean

  If true the Pointer events will have event.preventDefault applied to them, if false they will propagate fully.

   Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L59))   ### 
enabled : boolean

  MSPointer input will only be processed if enabled.

   Default Value * true
 Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L82))   ### 
event :MSPointerEvent | null

  The browser MSPointer DOM event. Will be null if no event has ever been received.  
Access this property only inside a Pointer event handler and do not keep references to it.

  ##### Type

 * MSPointerEvent | null

  Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L75))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L28))   ### 
<internal> input : [Phaser.Input](phaser.input)

  A reference to the Phaser Input Manager.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L34))   ### 
pointerDownCallback : Function

  A callback that can be fired on a MSPointerDown event.

   Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L44))   ### 
pointerMoveCallback : Function

  A callback that can be fired on a MSPointerMove event.

   Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L49))   ### 
pointerUpCallback : Function

  A callback that can be fired on a MSPointerUp event.

   Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L54))    Public Methods
--------------

  ### 
onPointerDown(event)

  The function that handles the PointerDown event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | PointerEvent | The native DOM event. |

  Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L193))   ### 
onPointerMove(event)

  The function that handles the PointerMove event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | PointerEvent | The native DOM event. |

  Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 231](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L231))   ### 
onPointerOut(event)

  The internal method that handles the pointer out event from the browser.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | PointerEvent | The native event from the browser. This gets stored in MSPointer.event. |

  Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 329](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L329))   ### 
onPointerOut(event)

  The internal method that handles the pointer out event from the browser.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | PointerEvent | The native event from the browser. This gets stored in MSPointer.event. |

  Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 384](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L384))   ### 
onPointerUp(event)

  The function that handles the PointerUp event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | PointerEvent | The native DOM event. |

  Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 268](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L268))   ### 
onPointerUpGlobal(event)

  The internal method that handles the mouse up event from the window.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | PointerEvent | The native event from the browser. This gets stored in MSPointer.event. |

  Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 305](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L305))   ### 
start()

  Starts the event listeners running.

   Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L124))   ### 
stop()

  Stop the event listeners.

   Source code: [input/MSPointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js) ([Line 420](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/MSPointer.js#L420))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.MSPointer.html>

Class: Phaser.Touch
===================

 Constructor
-----------

 ### 
new Touch(game)

  Phaser.Touch handles touch events with your game. Note: Android 2.x only supports 1 touch event at once, no multi-touch.

 You should not normally access this class directly, but instead use a Phaser.Pointer object which normalises all game input for you.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 16](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L16))   Public Properties
-----------------

  ### 
callbackContext : Object

  The context under which callbacks are called.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L42))   ### 
enabled : boolean

  Touch events will only be processed if enabled.

   Default Value * true
 Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L28))   ### 
event :TouchEvent

  The browser touch DOM event. Will be set to null if no touch event has ever been received.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L84))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L21))   ### 
preventDefault : boolean

  If true the TouchEvent will have prevent.default called on it.

   Default Value * true
 Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L78))   ### 
touchCancelCallback : Function

  A callback that can be fired on a touchCancel event.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L72))   ### 
touchEndCallback : Function

  A callback that can be fired on a touchEnd event.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L57))   ### 
touchEnterCallback : Function

  A callback that can be fired on a touchEnter event.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 62](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L62))   ### 
touchLeaveCallback : Function

  A callback that can be fired on a touchLeave event.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 67](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L67))   ### 
<internal> touchLockCallbacks :array

  An array of callbacks that will be fired every time a native touch start or touch end event is received from the browser.  
This is used internally to handle audio and video unlocking on mobile devices.  
To add a callback to this array please use `Touch.addTouchLockCallback`.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L37))   ### 
touchMoveCallback : Function

  A callback that can be fired on a touchMove event.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L52))   ### 
touchStartCallback : Function

  A callback that can be fired on a touchStart event.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 47](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L47))    Public Methods
--------------

  ### 
addTouchLockCallback(callback, context, onEnd)

  Adds a callback that is fired when a browser touchstart or touchend event is received.

 This is used internally to handle audio and video unlocking on mobile devices.

 If the callback returns 'true' then the callback is automatically deleted once invoked.

 The callback is added to the Phaser.Touch.touchLockCallbacks array and should be removed with Phaser.Touch.removeTouchLockCallback.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The callback that will be called when a touchstart event is received. |
| `context` | object |  |  | The context in which the callback will be called. |
| `onEnd` | boolean |  <optional> |  false  | Will the callback fire on a touchstart (default) or touchend event? |

  Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 200](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L200))   ### 
consumeTouchMove()

  Consumes all touchmove events on the document (only enable this if you know you need it!).

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L186))   ### 
onTouchCancel(event)

  Touch cancel - touches that were disrupted (perhaps by moving into a plugin or browser chrome).  
Occurs for example on iOS when you put down 4 fingers and the app selector UI appears.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event. |

  Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L293))   ### 
onTouchEnd(event)

  The handler for the touchend events.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event. |

  Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 402](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L402))   ### 
onTouchEnter(event)

  For touch enter and leave its a list of the touch points that have entered or left the target.  
Doesn't appear to be supported by most browsers on a canvas element yet.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event. |

  Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 327](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L327))   ### 
onTouchLeave(event)

  For touch enter and leave its a list of the touch points that have entered or left the target.  
Doesn't appear to be supported by most browsers on a canvas element yet.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event. |

  Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 354](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L354))   ### 
onTouchMove(event)

  The handler for the touchmove events.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event. |

  Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 376](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L376))   ### 
onTouchStart(event)

  The internal method that handles the touchstart event from the browser.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | TouchEvent | The native event from the browser. This gets stored in Touch.event. |

  Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 247](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L247))   ### 
removeTouchLockCallback(callback, context) → {boolean}

  Removes the callback at the defined index from the Phaser.Touch.touchLockCallbacks array

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `callback` | function | The callback to be removed. |
| `context` | object | The context in which the callback exists. |

 ##### Returns

   boolean -   True if the callback was deleted, otherwise false.

    Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 222](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L222))   ### 
start()

  Starts the event listeners running.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L132))   ### 
stop()

  Stop the event listeners.

   Source code: [input/Touch.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js) ([Line 443](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Touch.js#L443))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Touch.html>

Class: Phaser.SinglePad
=======================

 Constructor
-----------

 ### 
new SinglePad(game, padParent)

  A single Phaser Gamepad

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Current game instance. |
| `padParent` | object | The parent Phaser.Gamepad object (all gamepads reside under this) |

  Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 16](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L16))   Public Properties
-----------------

  ### 
callbackContext : Object

  The context under which the callbacks are run.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L38))   ### 
[readonly] connected : boolean

  Whether or not this particular gamepad is connected or not.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L33))   ### 
deadZone : number

  Dead zone for axis feedback - within this value you won't trigger updates.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L73))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L21))   ### 
[readonly] index : number

  The gamepad index as per browsers data

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L27))   ### 
onAxisCallback : Function

  This callback is invoked every time an axis is changed.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L63))   ### 
onConnectCallback : Function

  This callback is invoked every time this gamepad is connected

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L43))   ### 
onDisconnectCallback : Function

  This callback is invoked every time this gamepad is disconnected

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L48))   ### 
onDownCallback : Function

  This callback is invoked every time a button is pressed down.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L53))   ### 
onFloatCallback : Function

  This callback is invoked every time a button is changed to a value where value > 0 and value < 1.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L68))   ### 
onUpCallback : Function

  This callback is invoked every time a gamepad button is released.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L58))    Public Methods
--------------

  ### 
addCallbacks(context, callbacks)

  Add callbacks to this Gamepad to handle connect / disconnect / button down / button up / axis change / float value buttons.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `context` | object | The context under which the callbacks are run. |
| `callbacks` | object | Object that takes six different callbak methods:onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback |

  Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 121](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L121))   ### 
axis(axisCode) → {number}

  Returns value of requested axis.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `axisCode` | number | The index of the axis to check |

 ##### Returns

   number -   Axis value if available otherwise false

    Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 432](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L432))   ### 
buttonValue(buttonCode) → {number}

  Returns the value of a gamepad button. Intended mainly for cases when you have floating button values, for example  
analog trigger buttons on the XBOX 360 controller.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `buttonCode` | number | The buttonCode of the button to check. |

 ##### Returns

   number -   Button value if available otherwise null. Be careful as this can incorrectly evaluate to 0.

    Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 520](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L520))   ### 
connect(rawPad)

  Gamepad connect function, should be called by Phaser.Gamepad.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `rawPad` | object | The raw gamepad object |

  Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 216](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L216))   ### 
destroy()

  Destroys this object and associated callback references.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 298](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L298))   ### 
disconnect()

  Gamepad disconnect function, should be called by Phaser.Gamepad.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 260](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L260))   ### 
getButton(buttonCode) → {[Phaser.DeviceButton](phaser.devicebutton)}

  Gets a DeviceButton object from this controller to be stored and referenced locally.  
The DeviceButton object can then be polled, have events attached to it, etc.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `buttonCode` | number | The buttonCode of the button, i.e. Phaser.Gamepad.BUTTON\_0, Phaser.Gamepad.XBOX360\_A, etc. |

 ##### Returns

   [Phaser.DeviceButton](phaser.devicebutton) -   The DeviceButton object which you can store locally and reference directly.

    Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L144))   ### 
isDown(buttonCode) → {boolean}

  Returns true if the button is pressed down.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `buttonCode` | number | The buttonCode of the button to check. |

 ##### Returns

   boolean -   True if the button is pressed down.

    Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 450](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L450))   ### 
isUp(buttonCode) → {boolean}

  Returns true if the button is not currently pressed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `buttonCode` | number | The buttonCode of the button to check. |

 ##### Returns

   boolean -   True if the button is not currently pressed down.

    Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 468](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L468))   ### 
justPressed(buttonCode, duration) → {boolean}

  Returns the "just pressed" state of a button from this gamepad. Just pressed is considered true if the button was pressed down within the duration given (default 250ms).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `buttonCode` | number |  |  | The buttonCode of the button to check for. |
| `duration` | number |  <optional> |  250  | The duration below which the button is considered as being just pressed. |

 ##### Returns

   boolean -   True if the button is just pressed otherwise false.

    Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 503](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L503))   ### 
justReleased(buttonCode, duration) → {boolean}

  Returns the "just released" state of a button from this gamepad. Just released is considered as being true if the button was released within the duration given (default 250ms).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `buttonCode` | number |  |  | The buttonCode of the button to check for. |
| `duration` | number |  <optional> |  250  | The duration below which the button is considered as being just released. |

 ##### Returns

   boolean -   True if the button is just released otherwise false.

    Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 486](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L486))   ### 
pollStatus()

  Main update function called by Phaser.Gamepad.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L165))   ### 
processAxisChange(axisState)

  Handles changes in axis.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `axisState` | object | State of the relevant axis |

  Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 327](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L327))   ### 
processButtonDown(buttonCode, value)

  Handles button down press.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `buttonCode` | number | Which buttonCode of this button |
| `value` | object | Button value |

  Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 354](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L354))   ### 
processButtonFloat(buttonCode, value)

  Handles buttons with floating values (like analog buttons that acts almost like an axis but still registers like a button)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `buttonCode` | number | Which buttonCode of this button |
| `value` | object | Button value (will range somewhere between 0 and 1, but not specifically 0 or 1. |

  Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 406](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L406))   ### 
processButtonUp(buttonCode, value)

  Handles button release.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `buttonCode` | number | Which buttonCode of this button |
| `value` | object | Button value |

  Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 380](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L380))   ### 
reset()

  Reset all buttons/axes of this gamepad.

   Source code: [input/SinglePad.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js) ([Line 539](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/SinglePad.js#L539))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.SinglePad.html>

Class: Phaser.Input
===================

 Constructor
-----------

 ### 
new Input(game)

  Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer.  
The Input manager is updated automatically by the core game loop.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Current game instance. |

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L15))   Public Properties
-----------------

  ### 
[static] MAX\_POINTERS : integer

  The maximum number of pointers that can be added. This excludes the mouse pointer.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 377](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L377))   ### 
[static] MOUSE\_OVERRIDES\_TOUCH : number

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 358](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L358))   ### 
[static] MOUSE\_TOUCH\_COMBINE : number

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 370](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L370))   ### 
[static] TOUCH\_OVERRIDES\_MOUSE : number

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 364](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L364))   ### 
activePointer : [Phaser.Pointer](phaser.pointer)

  The most recently active Pointer object.

 When you've limited max pointers to 1 this will accurately be either the first finger touched or mouse.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L223))   ### 
circle : [Phaser.Circle](phaser.circle)

  A Circle object centered on the x/y screen coordinates of the Input.  
Default size of 44px (Apples recommended "finger tip" size) but can be changed to anything.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L91))   ### 
doubleTapRate : number

  The number of milliseconds between taps of the same Pointer for it to be considered a double tap / click.

   Default Value * 300
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 114](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L114))   ### 
enabled : boolean

  When enabled, input (eg. Keyboard, Mouse, Touch) will be processed - as long as the individual sources are enabled themselves.

 When not enabled, *all* input sources are ignored. To disable just one type of input; for example, the Mouse, use `input.mouse.enabled = false`.

   Default Value * true
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 67](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L67))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L20))   ### 
gamepad : [Phaser.Gamepad](phaser.gamepad)

  The Gamepad Input manager.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 274](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L274))   ### 
hitCanvas :HTMLCanvasElement

  The canvas to which single pixels are drawn in order to perform pixel-perfect hit detection.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L26))   ### 
hitContext :CanvasRenderingContext2D

  The context of the pixel perfect hit canvas.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L32))   ### 
holdRate : number

  The number of milliseconds that the Pointer has to be pressed down for it to fire a onHold event.

   Default Value * 2000
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 120](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L120))   ### 
interactiveItems : [Phaser.ArraySet](phaser.arrayset)

  A list of interactive objects. The InputHandler components add and remove themselves from this list.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 320](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L320))   ### 
justPressedRate : number

  The number of milliseconds below which the Pointer is considered justPressed.

   Default Value * 200
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 126](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L126))   ### 
justReleasedRate : number

  The number of milliseconds below which the Pointer is considered justReleased .

   Default Value * 200
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L132))   ### 
keyboard : [Phaser.Keyboard](phaser.keyboard)

  The Keyboard Input manager.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 247](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L247))   ### 
maxPointers : integer

  The maximum number of Pointers allowed to be active at any one time. A value of -1 is only limited by the total number of pointers. For lots of games it's useful to set this to 1.

   Default Value * -1 (Limited by total pointers.)
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L102))   ### 
minPriorityID : number

  You can tell all Pointers to ignore any Game Object with a `priorityID` lower than this value.  
This is useful when stacking UI layers. Set to zero to disable.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 314](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L314))   ### 
mouse : [Phaser.Mouse](phaser.mouse)

  The Mouse Input manager.

 You should not usually access this manager directly, but instead use Input.mousePointer or Input.activePointer  
which normalizes all the input values for you, regardless of browser.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L240))   ### 
mousePointer :Pointer

  The mouse has its own unique Phaser.Pointer object which you can use if making a desktop specific game.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 230](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L230))   ### 
<internal> moveCallbacks :array

  An array of callbacks that will be fired every time the activePointer receives a move event from the DOM.  
To add a callback to this array please use `Input.addMoveCallback`.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L40))   ### 
mspointer : [Phaser.MSPointer](phaser.mspointer)

  The MSPointer Input manager.

 You should not usually access this manager directly, but instead use Input.activePointer  
which normalizes all the input values for you, regardless of browser.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 267](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L267))   ### 
multiInputOverride : number

  Controls the expected behavior when using a mouse and touch together on a multi-input device.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L73))   ### 
onDown : [Phaser.Signal](phaser.signal)

  A Signal that is dispatched each time a pointer is pressed down.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 288](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L288))   ### 
onHold : [Phaser.Signal](phaser.signal)

  A Signal that is dispatched each time a pointer is held down.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 306](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L306))   ### 
onTap : [Phaser.Signal](phaser.signal)

  A Signal that is dispatched each time a pointer is tapped.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 300](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L300))   ### 
onUp : [Phaser.Signal](phaser.signal)

  A Signal that is dispatched each time a pointer is released.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 294](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L294))   ### 
pointer1 : [Phaser.Pointer](phaser.pointer)

  A Pointer object.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L160))   ### 
pointer2 : [Phaser.Pointer](phaser.pointer)

  A Pointer object.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L165))   ### 
pointer3 : [Phaser.Pointer](phaser.pointer)

  A Pointer object.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L170))   ### 
pointer4 : [Phaser.Pointer](phaser.pointer)

  A Pointer object.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 175](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L175))   ### 
pointer5 : [Phaser.Pointer](phaser.pointer)

  A Pointer object.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 180](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L180))   ### 
pointer6 : [Phaser.Pointer](phaser.pointer)

  A Pointer object.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L185))   ### 
pointer7 : [Phaser.Pointer](phaser.pointer)

  A Pointer object.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 190](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L190))   ### 
pointer8 : [Phaser.Pointer](phaser.pointer)

  A Pointer object.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 195](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L195))   ### 
pointer9 : [Phaser.Pointer](phaser.pointer)

  A Pointer object.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 200](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L200))   ### 
pointer10 : [Phaser.Pointer](phaser.pointer)

  A Pointer object.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 205](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L205))   ### 
[readonly] pointers : Array.<[Phaser.Pointer](phaser.pointer)>

  An array of non-mouse pointers that have been added to the game.  
The properties `pointer1..N` are aliases for `pointers[0..N-1]`.

  ##### Type

 * Array.<[Phaser.Pointer](phaser.pointer)>

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 214](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L214))   ### 
[readonly] pollLocked : boolean

  True if the Input is currently poll rate locked.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 1065](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L1065))   ### 
pollRate : number

  How often should the input pointers be checked for updates? A value of 0 means every single frame (60fps); a value of 1 means every other frame (30fps) and so on.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L58))   ### 
position : [Phaser.Point](phaser.point)

  A point object representing the current position of the Pointer.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L79))   ### 
recordLimit : number

  The total number of entries that can be recorded into the Pointer objects tracking history.  
If the Pointer is tracking one event every 100ms; then a trackLimit of 100 would store the last 10 seconds worth of history.

   Default Value * 100
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L155))   ### 
recordPointerHistory : boolean

  Sets if the Pointer objects should record a history of x/y coordinates they have passed through.  
The history is cleared each time the Pointer is pressed down.  
The history is updated at the rate specified in Input.pollRate

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 141](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L141))   ### 
recordRate : number

  The rate in milliseconds at which the Pointer objects should update their tracking history.

   Default Value * 100
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 147](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L147))   ### 
resetLocked : boolean

  If the Input Manager has been reset locked then all calls made to InputManager.reset,  
such as from a State change, are ignored.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 282](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L282))   ### 
scale : [Phaser.Point](phaser.point)

  The scale by which all input coordinates are multiplied; calculated by the ScaleManager. In an un-scaled game the values will be x = 1 and y = 1.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 96](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L96))   ### 
speed : [Phaser.Point](phaser.point)

  A point object representing the speed of the Pointer. Only really useful in single Pointer games; otherwise see the Pointer objects directly.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L84))   ### 
tapRate : number

  The number of milliseconds that the Pointer has to be pressed down and then released to be considered a tap or click.

   Default Value * 200
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 108](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L108))   ### 
[readonly] totalActivePointers : integers

  The total number of active Pointers, not counting the mouse pointer.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 1093](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L1093))   ### 
[readonly] totalInactivePointers : number

  The total number of inactive Pointers.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 1079](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L1079))   ### 
touch : [Phaser.Touch](phaser.touch)

  The Touch Input manager.

 You should not usually access this manager directly, but instead use Input.activePointer  
which normalizes all the input values for you, regardless of browser.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 257](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L257))   ### 
[readonly] worldX : number

  The world X coordinate of the most recently active pointer.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 1107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L1107))   ### 
[readonly] worldY : number

  The world Y coordinate of the most recently active pointer.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 1121](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L1121))   ### 
x : number

  The X coordinate of the most recently active pointer.  
This value takes game scaling into account automatically. See Pointer.screenX/clientX for source values.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 1029](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L1029))   ### 
y : number

  The Y coordinate of the most recently active pointer.  
This value takes game scaling into account automatically. See Pointer.screenY/clientY for source values.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 1047](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L1047))    Public Methods
--------------

  ### 
addMoveCallback(callback, context)

  Adds a callback that is fired every time the activePointer receives a DOM move event such as a mousemove or touchmove.

 The callback will be sent 4 parameters:

 A reference to the Phaser.Pointer object that moved,  
The x position of the pointer,  
The y position,  
A boolean indicating if the movement was the result of a 'click' event (such as a mouse click or touch down).

 It will be called every time the activePointer moves, which in a multi-touch game can be a lot of times, so this is best  
to only use if you've limited input to a single pointer (i.e. mouse or touch).

 The callback is added to the Phaser.Input.moveCallbacks array and should be removed with Phaser.Input.deleteMoveCallback.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `callback` | function | The callback that will be called each time the activePointer receives a DOM move event. |
| `context` | object | The context in which the callback will be called. |

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 502](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L502))   ### 
addPointer() → {[Phaser.Pointer](phaser.pointer) | null}

  Add a new Pointer object to the Input Manager.  
By default Input creates 3 pointer objects: `mousePointer` (not include in part of general pointer pool), `pointer1` and `pointer2`.  
This method adds an additional pointer, up to a maximum of Phaser.Input.MAX\_POINTERS (default of 10).

  ##### Returns

   [Phaser.Pointer](phaser.pointer) | null -   The new Pointer object that was created; null if a new pointer could not be added.

    Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 549](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L549))   ### 
<internal> boot()

  Starts the Input Manager running.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 381](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L381))   ### 
deleteMoveCallback(callback, context)

  Removes the callback from the Phaser.Input.moveCallbacks array.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `callback` | function | The callback to be removed. |
| `context` | object | The context in which the callback exists. |

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 527](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L527))   ### 
destroy()

  Stops all of the Input Managers from running.

   Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 444](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L444))   ### 
getLocalPosition(displayObject, pointer) → {[Phaser.Point](phaser.point)}

  This will return the local coordinates of the specified displayObject based on the given Pointer.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | The DisplayObject to get the local coordinates for. |
| `pointer` | [Phaser.Pointer](phaser.pointer) | The Pointer to use in the check against the displayObject. |

 ##### Returns

   [Phaser.Point](phaser.point) -   A point containing the coordinates of the Pointer position relative to the DisplayObject.

    Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 902](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L902))   ### 
getPointer(isActive) → {[Phaser.Pointer](phaser.pointer)}

  Get the first Pointer with the given active state.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `isActive` | boolean |  <optional> |  false  | The state the Pointer should be in - active or inactive? |

 ##### Returns

   [Phaser.Pointer](phaser.pointer) -   A Pointer object or null if no Pointer object matches the requested state.

    Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 824](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L824))   ### 
getPointerFromId(pointerId) → {[Phaser.Pointer](phaser.pointer)}

  Get the Pointer object whos `pointerId` property matches the given value.

 The pointerId property is not set until the Pointer has been used at least once, as its populated by the DOM event.  
Also it can change every time you press the pointer down if the browser recycles it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `pointerId` | number | The `pointerId` (not 'id') value to search for. |

 ##### Returns

   [Phaser.Pointer](phaser.pointer) -   A Pointer object or null if no Pointer object matches the requested identifier.

    Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 876](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L876))   ### 
getPointerFromIdentifier(identifier) → {[Phaser.Pointer](phaser.pointer)}

  Get the Pointer object whos `identifier` property matches the given identifier value.

 The identifier property is not set until the Pointer has been used at least once, as its populated by the DOM event.  
Also it can change every time you press the pointer down, and is not fixed once set.  
Note: Not all browsers set the identifier property and it's not part of the W3C spec, so you may need getPointerFromId instead.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `identifier` | number | The Pointer.identifier value to search for. |

 ##### Returns

   [Phaser.Pointer](phaser.pointer) -   A Pointer object or null if no Pointer object matches the requested identifier.

    Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 849](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L849))   ### 
hitTest(displayObject, pointer, localPoint)

  Tests if the pointer hits the given object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [DisplayObject](global#DisplayObject) | The displayObject to test for a hit. |
| `pointer` | [Phaser.Pointer](phaser.pointer) | The pointer to use for the test. |
| `localPoint` | [Phaser.Point](phaser.point) | The local translated point. |

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 924](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L924))   ### 
reset(hard)

  Reset all of the Pointers and Input states.

 The optional `hard` parameter will reset any events or callbacks that may be bound.  
Input.reset is called automatically during a State change or if a game loses focus / visibility.  
To control control the reset manually set Phaser.InputManager.resetLocked to `true`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `hard` | boolean |  <optional> |  false  | A soft reset won't reset any events or callbacks that are bound. A hard reset will. |

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 614](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L614))   ### 
resetSpeed(x, y)

  Resets the speed and old position properties.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Sets the oldPosition.x value. |
| `y` | number | Sets the oldPosition.y value. |

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 673](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L673))   ### 
setInteractiveCandidateHandler(callback, context)

  Adds a callback that is fired every time `Pointer.processInteractiveObjects` is called.  
The purpose of `processInteractiveObjects` is to work out which Game Object the Pointer is going to  
interact with. It works by polling all of the valid game objects, and then slowly discounting those  
that don't meet the criteria (i.e. they aren't under the Pointer, are disabled, invisible, etc).

 Eventually a short-list of 'candidates' is created. These are all of the Game Objects which are valid  
for input and overlap with the Pointer. If you need fine-grained control over which of the items is  
selected then you can use this callback to do so.

 The callback will be sent 3 parameters:

 1) A reference to the Phaser.Pointer object that is processing the Items.  
2) An array containing all potential interactive candidates. This is an array of `InputHandler` objects, not Sprites.  
3) The current 'favorite' candidate, based on its priorityID and position in the display list.

 Your callback MUST return one of the candidates sent to it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `callback` | function | The callback that will be called each time `Pointer.processInteractiveObjects` is called. Set to `null` to disable. |
| `context` | object | The context in which the callback will be called. |

  Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 473](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L473))   ### 
<internal> startPointer(event) → {[Phaser.Pointer](phaser.pointer)}

  Find the first free Pointer object and start it, passing in the event data.  
This is called automatically by Phaser.Touch and Phaser.MSPointer.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | any | The event data from the Touch event. |

 ##### Returns

   [Phaser.Pointer](phaser.pointer) -   The Pointer object that was started or null if no Pointer object is available.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 687](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L687))   ### 
<internal> stopPointer(event) → {[Phaser.Pointer](phaser.pointer)}

  Stops the matching Pointer object, passing in the event data.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | any | The event data from the Touch event. |

 ##### Returns

   [Phaser.Pointer](phaser.pointer) -   The Pointer object that was stopped or null if no Pointer object is available.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 762](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L762))   ### 
<internal> update()

  Updates the Input Manager. Called by the core Game loop.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 575](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L575))   ### 
<internal> updatePointer(event) → {[Phaser.Pointer](phaser.pointer)}

  Updates the matching Pointer object, passing in the event data.  
This is called automatically and should not normally need to be invoked.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | any | The event data from the Touch event. |

 ##### Returns

   [Phaser.Pointer](phaser.pointer) -   The Pointer object that was updated; null if no pointer was updated.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Input.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js) ([Line 727](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Input.js#L727))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Input.html>

Class: Phaser.Pointer
=====================

 Constructor
-----------

 ### 
new Pointer(game, id, pointerMode)

  A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen.

  ##### Parameters

 

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  | A reference to the currently running game. |
| `id` | number |  | The ID of the Pointer object within the game. Each game can have up to 10 active pointers. |
| `pointerMode` | [Phaser.PointerMode](phaser.pointermode) |  (CURSOR | CONTACT)  | The operational mode of this pointer, eg. CURSOR or TOUCH. |

  Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 16](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L16))   Public Properties
-----------------

  ### 
[static] BACK\_BUTTON : number

  The X1 button. This is typically the mouse Back button, but is often reconfigured.  
On Linux (GTK) this is unsupported. On Windows if advanced pointer software (such as IntelliPoint) is installed this doesn't register.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 397](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L397))   ### 
[static] ERASER\_BUTTON : number

  The Eraser pen button on PointerEvent supported devices only.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 412](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L412))   ### 
[static] FORWARD\_BUTTON : number

  The X2 button. This is typically the mouse Forward button, but is often reconfigured.  
On Linux (GTK) this is unsupported. On Windows if advanced pointer software (such as IntelliPoint) is installed this doesn't register.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 405](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L405))   ### 
[static] LEFT\_BUTTON : number

  The Left Mouse button, or in PointerEvent devices a Touch contact or Pen contact.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 375](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L375))   ### 
[static] MIDDLE\_BUTTON : number

  The Middle Mouse button.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 389](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L389))   ### 
[static] NO\_BUTTON : number

  No buttons at all.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 368](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L368))   ### 
[static] RIGHT\_BUTTON : number

  The Right Mouse button, or in PointerEvent devices a Pen contact with a barrel button.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 382](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L382))   ### 
active : boolean

  An active pointer is one that is currently pressed down on the display. A Mouse is always active.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 316](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L316))   ### 
backButton : [Phaser.DeviceButton](phaser.devicebutton)

  If this Pointer is a Mouse or Pen / Stylus then you can access its X1 (back) button directly through this property.

 The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained  
button control.

 Please see the DeviceButton docs for details on browser button limitations.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 120](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L120))   ### 
button :any

  The button property of the most recent DOM event when this Pointer is started.  
You should not rely on this value for accurate button detection, instead use the Pointer properties  
`leftButton`, `rightButton`, `middleButton` and so on.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L70))   ### 
circle : [Phaser.Circle](phaser.circle)

  A Phaser.Circle that is centered on the x/y coordinates of this pointer, useful for hit detection.  
The Circle size is 44px (Apples recommended "finger tip" size).

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 344](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L344))   ### 
clientX : number

  The horizontal coordinate of the Pointer within the application's client area at which the event occurred (as opposed to the coordinates within the page).

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 181](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L181))   ### 
clientY : number

  The vertical coordinate of the Pointer within the application's client area at which the event occurred (as opposed to the coordinates within the page).

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L186))   ### 
dirty : boolean

  A dirty pointer needs to re-poll any interactive objects it may have been over, regardless if it has moved or not.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 322](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L322))   ### 
[readonly] duration : number

  How long the Pointer has been depressed on the touchscreen or *any* of the mouse buttons have been held down.  
If not currently down it returns -1.  
If you need to test a specific mouse or pen button then access the buttons directly, i.e. `Pointer.rightButton.duration`.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1192](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1192))   ### 
eraserButton : [Phaser.DeviceButton](phaser.devicebutton)

  If this Pointer is a Pen / Stylus then you can access its eraser button directly through this property.

 The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained  
button control.

 Please see the DeviceButton docs for details on browser button limitations.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L146))   ### 
exists : boolean

  A Pointer object that exists is allowed to be checked for physics collisions and overlaps.

   Default Value * true
 Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L38))   ### 
forwardButton : [Phaser.DeviceButton](phaser.devicebutton)

  If this Pointer is a Mouse or Pen / Stylus then you can access its X2 (forward) button directly through this property.

 The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained  
button control.

 Please see the DeviceButton docs for details on browser button limitations.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 133](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L133))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L21))   ### 
id : number

  The ID of the Pointer object within the game. Each game can have up to 10 active pointers.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L26))   ### 
identifier : number

  The identifier property of the Pointer as set by the DOM event when this Pointer is started.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L44))   ### 
interactiveCandidates :array

  This array is erased and re-populated every time this Pointer is updated. It contains references to all  
of the Game Objects that were considered as being valid for processing by this Pointer, this frame. To be  
valid they must have suitable a `priorityID`, be Input enabled, visible and actually have the Pointer over  
them. You can check the contents of this array in events such as `onInputDown`, but beware it is reset  
every frame.

   Default Value * []
 Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 310](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L310))   ### 
isDown : boolean

  If the Pointer is touching the touchscreen, or *any* mouse or pen button is held down, isDown is set to true.  
If you need to check a specific mouse or pen button then use the button properties, i.e. Pointer.rightButton.isDown.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 255](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L255))   ### 
isMouse : boolean

  If the Pointer is a mouse or pen / stylus this is true, otherwise false.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 247](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L247))   ### 
isUp : boolean

  If the Pointer is not touching the touchscreen, or *all* mouse or pen buttons are up, isUp is set to true.  
If you need to check a specific mouse or pen button then use the button properties, i.e. Pointer.rightButton.isUp.

   Default Value * true
 Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 263](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L263))   ### 
leftButton : [Phaser.DeviceButton](phaser.devicebutton)

  If this Pointer is a Mouse or Pen / Stylus then you can access its left button directly through this property.

 The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained  
button control.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 81](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L81))   ### 
middleButton : [Phaser.DeviceButton](phaser.devicebutton)

  If this Pointer is a Mouse or Pen / Stylus then you can access its middle button directly through this property.

 The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained  
button control.

 Please see the DeviceButton docs for details on browser button limitations.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L94))   ### 
movementX : number

  The horizontal processed relative movement of the Pointer in pixels since last event.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 224](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L224))   ### 
movementY : number

  The vertical processed relative movement of the Pointer in pixels since last event.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 230](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L230))   ### 
msSinceLastClick : number

  The number of milliseconds since the last click or touch event.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L293))   ### 
pageX : number

  The horizontal coordinate of the Pointer relative to whole document.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L191))   ### 
pageY : number

  The vertical coordinate of the Pointer relative to whole document.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 196](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L196))   ### 
pointerId : number

  The pointerId property of the Pointer as set by the DOM event when this Pointer is started. The browser can and will recycle this value.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L50))   ### 
pointerMode : [Phaser.PointerMode](phaser.pointermode)

  The operational mode of this pointer.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L55))   ### 
position : [Phaser.Point](phaser.point)

  A Phaser.Point object containing the current x/y values of the pointer on the display.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 327](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L327))   ### 
positionDown : [Phaser.Point](phaser.point)

  A Phaser.Point object containing the x/y values of the pointer when it was last in a down state on the display.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 332](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L332))   ### 
positionUp : [Phaser.Point](phaser.point)

  A Phaser.Point object containing the x/y values of the pointer when it was last released.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 337](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L337))   ### 
previousTapTime : number

  A timestamp representing when the Pointer was last tapped or clicked.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 281](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L281))   ### 
rawMovementX : number

  The horizontal raw relative movement of the Pointer in pixels since last event.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 212](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L212))   ### 
rawMovementY : number

  The vertical raw relative movement of the Pointer in pixels since last event.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L218))   ### 
rightButton : [Phaser.DeviceButton](phaser.devicebutton)

  If this Pointer is a Mouse or Pen / Stylus then you can access its right button directly through this property.

 The DeviceButton has its own properties such as `isDown`, `duration` and methods like `justReleased` for more fine-grained  
button control.

 Please see the DeviceButton docs for details on browser button limitations.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L107))   ### 
screenX : number

  The horizontal coordinate of the Pointer relative to the screen.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 201](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L201))   ### 
screenY : number

  The vertical coordinate of the Pointer relative to the screen.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 206](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L206))   ### 
target :any

  The target property of the Pointer as set by the DOM event when this Pointer is started.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L61))   ### 
targetObject :any

  The Game Object this Pointer is currently over / touching / dragging.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 299](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L299))   ### 
timeDown : number

  A timestamp representing when the Pointer first touched the touchscreen.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 269](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L269))   ### 
timeUp : number

  A timestamp representing when the Pointer left the touchscreen.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 275](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L275))   ### 
totalTouches : number

  The total number of times this Pointer has been touched to the touchscreen.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 287](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L287))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L32))   ### 
withinGame : boolean

  true if the Pointer is over the game canvas, otherwise false.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 176](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L176))   ### 
[readonly] worldX : number

  Gets the X value of this Pointer in world coordinates based on the world camera.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1216](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1216))   ### 
[readonly] worldY : number

  Gets the Y value of this Pointer in world coordinates based on the world camera.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1232))   ### 
x : number

  The horizontal coordinate of the Pointer. This value is automatically scaled based on the game scale.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 236](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L236))   ### 
y : number

  The vertical coordinate of the Pointer. This value is automatically scaled based on the game scale.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 242](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L242))    Public Methods
--------------

  ### 
<internal> addClickTrampoline(name, callback, callbackContext, callbackArgs)

  Add a click trampoline to this pointer.

 A click trampoline is a callback that is run on the DOM 'click' event; this is primarily  
needed with certain browsers (ie. IE11) which restrict some actions like requestFullscreen  
to the DOM 'click' event and rejects it for 'pointer*' and 'mouse*' events.

 This is used internally by the ScaleManager; click trampoline usage is uncommon.  
Click trampolines can only be added to pointers that are currently down.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name of the trampoline; must be unique among active trampolines in this pointer. |
| `callback` | function | Callback to run/trampoline. |
| `callbackContext` | object | Context of the callback. |
| `callbackArgs` | Array.<object> | null | Additional callback args, if any. Supplied as an array. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1073](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1073))   ### 
justPressed(duration) → {boolean}

  The Pointer is considered justPressed if the time it was pressed onto the touchscreen or clicked is less than justPressedRate.  
Note that calling justPressed doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid.  
If you wish to check if the Pointer was pressed down just once then see the Sprite.events.onInputDown event.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `duration` | number |  <optional> | The time to check against. If none given it will use InputManager.justPressedRate. |

 ##### Returns

   boolean -   true if the Pointer was pressed down within the duration given.

    Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1041](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1041))   ### 
justReleased(duration) → {boolean}

  The Pointer is considered justReleased if the time it left the touchscreen is less than justReleasedRate.  
Note that calling justReleased doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid.  
If you wish to check if the Pointer was released just once then see the Sprite.events.onInputUp event.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `duration` | number |  <optional> | The time to check against. If none given it will use InputManager.justReleasedRate. |

 ##### Returns

   boolean -   true if the Pointer was released within the duration given.

    Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1057](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1057))   ### 
leave(event)

  Called when the Pointer leaves the target area.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | PointerEvent | TouchEvent | The event passed up from the input handler. |

  Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 945](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L945))   ### 
move(event, fromClick)

  Called when the Pointer is moved.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `event` | MouseEvent | PointerEvent | TouchEvent |  |  | The event passed up from the input handler. |
| `fromClick` | boolean |  <optional> |  false  | Was this called from the click event? |

  Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 709](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L709))   ### 
<internal> processInteractiveObjects(fromClick) → {boolean}

  Process all interactive objects to find out which ones were updated in the recent Pointer move.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `fromClick` | boolean |  <optional> |  false  | Was this called from the click event? |

 ##### Returns

   boolean -   True if this method processes an object (i.e. a Sprite becomes the Pointers currentTarget), otherwise false.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 806](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L806))   ### 
reset()

  Resets the Pointer properties. Called by InputManager.reset when you perform a State change.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1147](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1147))   ### 
<internal> resetButtons()

  Resets the states of all the button booleans.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 416](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L416))   ### 
resetMovement()

  Resets the movementX and movementY properties. Use in your update handler after retrieving the values.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1177))   ### 
start(event)

  Called when the Pointer is pressed onto the touchscreen.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | any | The DOM event from the browser. |

  Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 587](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L587))   ### 
stop(event)

  Called when the Pointer leaves the touchscreen.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | PointerEvent | TouchEvent | The event passed up from the input handler. |

  Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 958](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L958))   ### 
swapTarget(newTarget, silent)

  This will change the `Pointer.targetObject` object to be the one provided.

 This allows you to have fine-grained control over which object the Pointer is targeting.

 Note that even if you set a new Target here, it is still able to be replaced by any other valid  
target during the next Pointer update.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `newTarget` | [Phaser.InputHandler](phaser.inputhandler) |  |  | The new target for this Pointer. Note this is an `InputHandler`, so don't pass a Sprite, instead pass `sprite.input` to it. |
| `silent` | boolean |  <optional> |  false  | If true the new target AND the old one will NOT dispatch their `onInputOver` or `onInputOut` events. |

  Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 886](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L886))   ### 
update()

  Called by the Input Manager.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 657](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L657))   ### 
<internal> updateButtons(event)

  Called when the event.buttons property changes from zero.  
Contains a button bitmask.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `event` | MouseEvent | The DOM event. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 527](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L527))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Pointer.html>

Class: Phaser.Easing
====================

 Constructor
-----------

 ### 
new Easing()

  A collection of easing methods defining ease-in and ease-out curves.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L14))   Classes
-------

   [Back](phaser.easing.back)   [Bounce](phaser.easing.bounce)   [Circular](phaser.easing.circular)   [Cubic](phaser.easing.cubic)   [Elastic](phaser.easing.elastic)   [Exponential](phaser.easing.exponential)   [Linear](phaser.easing.linear)   [Quadratic](phaser.easing.quadratic)   [Quartic](phaser.easing.quartic)   [Quintic](phaser.easing.quintic)   [Sinusoidal](phaser.easing.sinusoidal)  

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.html>

Class: Phaser.AudioSprite
=========================

 Constructor
-----------

 ### 
new AudioSprite(game, key)

  Audio Sprites are a combination of audio files and a JSON configuration.  
The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Reference to the current game instance. |
| `key` | string | Asset key for the sound. |

  Source code: [sound/AudioSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js#L17))   Public Properties
-----------------

  ### 
autoplay : boolean

  Is a sound set to autoplay or not?

   Source code: [sound/AudioSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js#L48))   ### 
autoplayKey : string

  If a sound is set to auto play, this holds the marker key of it.

   Source code: [sound/AudioSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js) ([Line 41](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js#L41))   ### 
config : Object

  JSON audio atlas object.

   Source code: [sound/AudioSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js#L35))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [sound/AudioSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js#L23))   ### 
key : string

  Asset key for the Audio Sprite.

   Source code: [sound/AudioSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js#L29))   ### 
sounds : Object

  An object containing the Phaser.Sound objects for the Audio Sprite.

   Source code: [sound/AudioSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js#L54))    Public Methods
--------------

  ### 
get(marker) → {[Phaser.Sound](phaser.sound)}

  Get a sound with the given name.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `marker` | string | The name of sound to get. |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   The sound instance.

    Source code: [sound/AudioSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js#L115))   ### 
play(marker, volume) → {[Phaser.Sound](phaser.sound)}

  Play a sound with the given name.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `marker` | string |  <optional> |  | The name of sound to play |
| `volume` | number |  <optional> |  1  | Volume of the sound you want to play. If none is given it will use the volume given to the Sound when it was created (which defaults to 1 if none was specified). |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   This sound instance.

    Source code: [sound/AudioSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js#L77))   ### 
stop(marker)

  Stop a sound with the given name.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `marker` | string |  <optional> |  ''  | The name of sound to stop. If none is given it will stop all sounds in the audio sprite. |

  Source code: [sound/AudioSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/AudioSprite.js#L93))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.AudioSprite.html>

Class: Phaser.TweenData
=======================

 Constructor
-----------

 ### 
new TweenData(parent)

  A Phaser.Tween contains at least one TweenData object. It contains all of the tween data values, such as the  
starting and ending values, the ease function, interpolation and duration. The Tween acts as a timeline manager for  
TweenData objects and can contain multiple TweenData objects.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | [Phaser.Tween](phaser.tween) | The Tween that owns this TweenData object. |

  Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 16](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L16))   Public Properties
-----------------

  ### 
[static] COMPLETE : number

  Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 179](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L179))   ### 
[static] LOOPED : number

  Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 173](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L173))   ### 
[static] PENDING : number

  Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L161))   ### 
[static] RUNNING : number

  Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L167))   ### 
delay : number

  The amount to delay by until the Tween starts (in ms). Only applies to the start, use repeatDelay to handle repeats.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L113))   ### 
dt : number

  Current time value.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 118](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L118))   ### 
duration : number

  The duration of the tween in ms.

   Default Value * 1000
 Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L56))   ### 
easingFunction : Function

  The easing function used for the Tween.

   Default Value * Phaser.Easing.Default
 Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L129))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L26))   ### 
inReverse : boolean

  When a Tween is yoyoing this value holds if it's currently playing forwards (false) or in reverse (true).

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L107))   ### 
interpolate : boolean

  True if the Tween will use interpolation (i.e. is an Array to Array tween)

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L90))   ### 
interpolationContext : Object

  The interpolation function context used for the Tween.

   Default Value * Phaser.Math
 Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 141](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L141))   ### 
interpolationFunction : Function

  The interpolation function used for the Tween.

   Default Value * Phaser.Math.linearInterpolation
 Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L135))   ### 
isFrom : boolean

  Is this a from tween or a to tween?

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L153))   ### 
isRunning : boolean

  If the tween is running this is set to `true`. Unless Phaser.Tween a TweenData that is waiting for a delay to expire is *not* considered as running.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 147](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L147))   ### 
parent : [Phaser.Tween](phaser.tween)

  The Tween which owns this TweenData.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L21))   ### 
[readonly] percent : number

  A value between 0 and 1 that represents how far through the duration this tween is.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 62](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L62))   ### 
repeatCounter : number

  If the Tween is set to repeat this contains the current repeat count.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L73))   ### 
repeatDelay : number

  The amount of time in ms between repeats of this tween.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L78))   ### 
[readonly] repeatTotal : number

  The total number of times this Tween will repeat.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L84))   ### 
startTime : number

  The time the Tween started or null if it hasn't yet started.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 123](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L123))   ### 
[readonly] value : number

  The current calculated value.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L68))   ### 
yoyo : boolean

  True if the Tween is set to yoyo, otherwise false.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 96](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L96))   ### 
yoyoDelay : number

  The amount of time in ms between yoyos of this tween.

   Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 101](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L101))    Public Methods
--------------

  ### 
from(properties, duration, ease, delay, repeat, yoyo) → {[Phaser.TweenData](phaser.tweendata)}

  Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value.  
For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `properties` | object |  |  | The properties you want to tween, such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. |
| `duration` | number |  <optional> |  1000  | Duration of this tween in ms. |
| `ease` | function |  <optional> |  null  | Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden at will. |
| `delay` | number |  <optional> |  0  | Delay before this tween will start, defaults to 0 (no delay). Value given is in ms. |
| `repeat` | number |  <optional> |  0  | Should the tween automatically restart once complete? If you want it to run forever set as -1. This ignores any chained tweens. |
| `yoyo` | boolean |  <optional> |  false  | A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. |

 ##### Returns

   [Phaser.TweenData](phaser.tweendata) -   This Tween object.

    Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L211))   ### 
generateData(frameRate) → {array}

  This will generate an array populated with the tweened object values from start to end.  
It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from.  
Just one play through of the tween data is returned, including yoyo if set.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `frameRate` | number |  <optional> |  60  | The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates. |

 ##### Returns

   array -   An array of tweened values.

    Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 411](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L411))   ### 
start() → {[Phaser.TweenData](phaser.tweendata)}

  Starts the Tween running.

  ##### Returns

   [Phaser.TweenData](phaser.tweendata) -   This Tween object.

    Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 239](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L239))   ### 
to(properties, duration, ease, delay, repeat, yoyo) → {[Phaser.TweenData](phaser.tweendata)}

  Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given.  
For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `properties` | object |  |  | The properties you want to tween, such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. |
| `duration` | number |  <optional> |  1000  | Duration of this tween in ms. |
| `ease` | function |  <optional> |  null  | Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden at will. |
| `delay` | number |  <optional> |  0  | Delay before this tween will start, defaults to 0 (no delay). Value given is in ms. |
| `repeat` | number |  <optional> |  0  | Should the tween automatically restart once complete? If you want it to run forever set as -1. This ignores any chained tweens. |
| `yoyo` | boolean |  <optional> |  false  | A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. |

 ##### Returns

   [Phaser.TweenData](phaser.tweendata) -   This Tween object.

    Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 183](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L183))   ### 
<internal> update(time) → {number}

  Updates this Tween. This is called automatically by Phaser.Tween.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `time` | number | A timestamp passed in by the Tween parent. |

 ##### Returns

   number -   The current status of this Tween. One of the Phaser.TweenData constants: PENDING, RUNNING, LOOPED or COMPLETE.

    Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [tween/TweenData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js) ([Line 340](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/TweenData.js#L340))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.TweenData.html>

Class: Phaser.RequestAnimationFrame
===================================

 Constructor
-----------

 ### 
new RequestAnimationFrame(game, forceSetTimeOut)

  Abstracts away the use of RAF or setTimeOut for the core game update loop.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `forceSetTimeOut` | boolean |  <optional> |  false  | Tell Phaser to use setTimeOut even if raf is available. |

  Source code: [utils/RequestAnimationFrame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js#L15))   Public Properties
-----------------

  ### 
forceSetTimeOut : boolean

  Tell Phaser to use setTimeOut even if raf is available.

   Source code: [utils/RequestAnimationFrame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js#L33))   ### 
game : [Phaser.Game](phaser.game)

  The currently running game.

   Source code: [utils/RequestAnimationFrame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js#L22))   ### 
isRunning : boolean

  true if RequestAnimationFrame is running, otherwise false.

   Source code: [utils/RequestAnimationFrame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js#L28))    Public Methods
--------------

  ### 
isRAF() → {boolean}

  Is the browser using requestAnimationFrame?

  ##### Returns

   boolean -    Source code: [utils/RequestAnimationFrame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js) ([Line 162](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js#L162))   ### 
isSetTimeOut() → {boolean}

  Is the browser using setTimeout?

  ##### Returns

   boolean -    Source code: [utils/RequestAnimationFrame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js#L153))   ### 
start()

  Starts the requestAnimationFrame running or setTimeout if unavailable in browser

   Source code: [utils/RequestAnimationFrame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js#L70))   ### 
stop()

  Stops the requestAnimationFrame from running.

   Source code: [utils/RequestAnimationFrame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js) ([Line 134](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js#L134))   ### 
updateRAF()

  The update method for the requestAnimationFrame

   Source code: [utils/RequestAnimationFrame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js#L103))   ### 
updateSetTimeout()

  The update method for the setTimeout.

   Source code: [utils/RequestAnimationFrame.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/RequestAnimationFrame.js#L119))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.RequestAnimationFrame.html>

Class: Phaser.SoundManager
==========================

 Constructor
-----------

 ### 
new SoundManager(game)

  The Sound Manager is responsible for playing back audio via either the Legacy HTML Audio tag or via Web Audio if the browser supports it.  
Note: On Firefox 25+ on Linux if you have media.gstreamer disabled in about:config then it cannot play back mp3 or m4a files.  
The audio file type and the encoding of those files are extremely important. Not all browsers can play all audio formats.  
There is a good guide to what's supported here: http://hpr.dogphilosophy.net/test/

 If you are reloading a Phaser Game on a page that never properly refreshes (such as in an AngularJS project) then you will quickly run out  
of AudioContext nodes. If this is the case create a global var called PhaserGlobal on the window object before creating the game. The active  
AudioContext will then be saved to window.PhaserGlobal.audioContext when the Phaser game is destroyed, and re-used when it starts again.

 Mobile warning: There are some mobile devices (certain iPad 2 and iPad Mini revisions) that cannot play 48000 Hz audio.  
When they try to play the audio becomes extremely distorted and buzzes, eventually crashing the sound system.  
The solution is to use a lower encoding rate such as 44100 Hz. Sometimes the audio context will  
be created with a sampleRate of 48000. If this happens and audio distorts you should re-create the context.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Reference to the current game instance. |

  Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L26))   Public Properties
-----------------

  ### 
channels : number

  The number of audio channels to use in playback.

   Default Value * 32
 Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 96](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L96))   ### 
connectToMaster : boolean

  Used in conjunction with Sound.externalNode this allows you to stop a Sound node being connected to the SoundManager master gain node.

   Default Value * true
 Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 84](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L84))   ### 
context :AudioContext

  The AudioContext being used for playback.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L60))   ### 
game : [Phaser.Game](phaser.game)

  Local reference to game.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L31))   ### 
mute : boolean

  Gets or sets the muted state of the SoundManager. This effects all sounds in the game.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 765](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L765))   ### 
muteOnPause : boolean

  Set to true to have all sound muted when the Phaser game pauses (such as on loss of focus),  
or set to false to keep audio playing, regardless of the game pause state. You may need to  
do this should you wish to control audio muting via external DOM buttons or similar.

   Default Value * true
 Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L105))   ### 
noAudio : boolean

  True if audio been disabled via the PhaserGlobal (useful if you need to use a 3rd party audio library) or the device doesn't support any audio.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L78))   ### 
onMute : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the SoundManager is globally muted, either directly via game code or as a result of the game pausing.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L48))   ### 
onSoundDecode : [Phaser.Signal](phaser.signal)

  The event dispatched when a sound decodes (typically only for mp3 files)

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L36))   ### 
onUnMute : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the SoundManager is globally un-muted, either directly via game code or as a result of the game resuming from a pause.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L54))   ### 
onVolumeChange : [Phaser.Signal](phaser.signal)

  This signal is dispatched whenever the global volume changes. The new volume is passed as the only parameter to your callback.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L42))   ### 
touchLocked : boolean

  true if the audio system is currently locked awaiting a touch event.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L90))   ### 
[readonly] usingAudioTag : boolean

  True the SoundManager and device are both using the Audio tag instead of Web Audio.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L72))   ### 
[readonly] usingWebAudio : boolean

  True the SoundManager and device are both using Web Audio.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L66))   ### 
volume : number

  Gets or sets the global volume of the SoundManager, a value between 0 and 1. The value given is clamped to the range 0 to 1.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 805](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L805))    Public Methods
--------------

  ### 
add(key, volume, loop, connect) → {[Phaser.Sound](phaser.sound)}

  Adds a new Sound into the SoundManager.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Asset key for the sound. |
| `volume` | number |  <optional> |  1  | Default value for the volume. |
| `loop` | boolean |  <optional> |  false  | Whether or not the sound will loop. |
| `connect` | boolean |  <optional> |  true  | Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   The new sound instance.

    Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 540](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L540))   ### 
addSprite(key) → {[Phaser.AudioSprite](phaser.audiosprite)}

  Adds a new AudioSprite into the SoundManager.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | Asset key for the sound. |

 ##### Returns

   [Phaser.AudioSprite](phaser.audiosprite) -   The new AudioSprite instance.

    Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 564](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L564))   ### 
<internal> boot()

  Initialises the sound manager.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 169](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L169))   ### 
decode(key, sound)

  Decode a sound by its asset key.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `key` | string |  | Assets key of the sound to be decoded. |
| `sound` | [Phaser.Sound](phaser.sound) |  <optional> | Its buffer will be set to decoded data. |

  Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 406](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L406))   ### 
destroy()

  Stops all the sounds in the game, then destroys them and finally clears up any callbacks.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 722](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L722))   ### 
pauseAll()

  Pauses all the sounds in the game.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 362](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L362))   ### 
play(key, volume, loop) → {[Phaser.Sound](phaser.sound)}

  Adds a new Sound into the SoundManager and starts it playing.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | Asset key for the sound. |
| `volume` | number |  <optional> |  1  | Default value for the volume. |
| `loop` | boolean |  <optional> |  false  | Whether or not the sound will loop. |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   The new sound instance.

    Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 631](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L631))   ### 
remove(sound) → {boolean}

  Removes a Sound from the SoundManager. The removed Sound is destroyed before removal.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `sound` | [Phaser.Sound](phaser.sound) | The sound object to remove. |

 ##### Returns

   boolean -   True if the sound was removed successfully, otherwise false.

    Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 579](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L579))   ### 
removeByKey(key) → {number}

  Removes all Sounds from the SoundManager that have an asset key matching the given value.  
The removed Sounds are destroyed before removal.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key to match when removing sound objects. |

 ##### Returns

   number -   The number of matching sound objects that were removed.

    Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 604](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L604))   ### 
resumeAll()

  Resumes every sound in the game.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 384](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L384))   ### 
setDecodedCallback(files, callback, callbackContext)

  This method allows you to give the SoundManager a list of Sound files, or keys, and a callback.  
Once all of the Sound files have finished decoding the callback will be invoked.  
The amount of time spent decoding depends on the codec used and file size.  
If all of the files given have already decoded the callback is triggered immediately.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `files` | string | array | An array containing either Phaser.Sound objects or their key strings as found in the Phaser.Cache. |
| `callback` | function | The callback which will be invoked once all files have finished decoding. |
| `callbackContext` | Object | The context in which the callback will run. |

  Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 443](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L443))   ### 
setTouchLock()

  Sets the Input Manager touch callback to be SoundManager.unlock.  
Required for iOS audio device unlocking. Mostly just used internally.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 270](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L270))   ### 
stopAll()

  Stops all the sounds in the game.

   Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 340](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L340))   ### 
unlock() → {boolean}

  Enables the audio, usually after the first touch.

  ##### Returns

   boolean -   True if the callback should be removed, otherwise false.

    Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 296](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L296))   ### 
<internal> update()

  Updates every sound in the game, checks for audio unlock on mobile and monitors the decoding watch list.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [sound/SoundManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js) ([Line 493](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/SoundManager.js#L493))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.SoundManager.html>

Class: Phaser.Canvas
====================

 Constructor
-----------

 ### 
new Canvas()

  The Canvas class handles everything related to creating the `canvas` DOM tag that Phaser will use,  
including styles, offset and aspect ratio.

   Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L14))   Public Methods
--------------

  ### 
<static> addToDOM(canvas, parent, overflowHidden) → {HTMLCanvasElement}

  Adds the given canvas element to the DOM. The canvas will be added as a child of the given parent.  
If no parent is given it will be added as a child of the document.body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `canvas` | HTMLCanvasElement |  |  | The canvas to be added to the DOM. |
| `parent` | string | HTMLElement |  |  | The DOM element to add the canvas to. |
| `overflowHidden` | boolean |  <optional> |  true  | If set to true it will add the overflow='hidden' style to the parent DOM element. |

 ##### Returns

   HTMLCanvasElement -   Returns the source canvas.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L109))   ### 
<static> create(parent, width, height, id, skipPool) → {HTMLCanvasElement}

  Creates a `canvas` DOM element. The element is not automatically added to the document.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | object |  |  | The object that will own the canvas that is created. |
| `width` | number |  <optional> |  256  | The width of the canvas element. |
| `height` | number |  <optional> |  256  | The height of the canvas element.. |
| `id` | string |  <optional> |  (none)  | If specified, and not the empty string, this will be set as the ID of the canvas element. Otherwise no ID will be set. |
| `skipPool` | boolean |  <optional> |  false  | If `true` the canvas will not be placed in the CanvasPool global. |

 ##### Returns

   HTMLCanvasElement -   The newly created canvas element.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 16](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L16))   ### 
<static> getSmoothingEnabled(context) → {boolean}

  Returns `true` if the given context has image smoothing enabled, otherwise returns `false`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `context` | CanvasRenderingContext2D | The context to check for smoothing on. |

 ##### Returns

   boolean -   True if the given context has image smoothing enabled, otherwise false.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 242](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L242))   ### 
<static> getSmoothingPrefix(context) → {string | null}

  Gets the Smoothing Enabled vendor prefix being used on the given context, or null if not set.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `context` | CanvasRenderingContext2D | The context to enable or disable the image smoothing on. |

 ##### Returns

   string | null -   Returns the smoothingEnabled vendor prefix, or null if not set on the context.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L217))   ### 
<static> removeFromDOM(canvas)

  Removes the given canvas element from the DOM.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `canvas` | HTMLCanvasElement | The canvas to be removed from the DOM. |

  Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L156))   ### 
<static> setBackgroundColor(canvas, color) → {HTMLCanvasElement}

  Sets the background color behind the canvas. This changes the canvas style property.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `canvas` | HTMLCanvasElement |  |  | The canvas to set the background color on. |
| `color` | string |  <optional> |  'rgb(0,0,0)'  | The color to set. Can be in the format 'rgb(r,g,b)', or '#RRGGBB' or any valid CSS color. |

 ##### Returns

   HTMLCanvasElement -   Returns the source canvas.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 47](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L47))   ### 
<static> setImageRenderingBicubic(canvas) → {HTMLCanvasElement}

  Sets the CSS image-rendering property on the given canvas to be 'bicubic' (aka 'auto').  
Note that if this doesn't given the desired result then see the CanvasUtils.setSmoothingEnabled method.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `canvas` | HTMLCanvasElement | The canvas to set image-rendering bicubic on. |

 ##### Returns

   HTMLCanvasElement -   Returns the source canvas.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 283](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L283))   ### 
<static> setImageRenderingCrisp(canvas) → {HTMLCanvasElement}

  Sets the CSS image-rendering property on the given canvas to be 'crisp' (aka 'optimize contrast' on webkit).  
Note that if this doesn't given the desired result then see the setSmoothingEnabled.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `canvas` | HTMLCanvasElement | The canvas to set image-rendering crisp on. |

 ##### Returns

   HTMLCanvasElement -   Returns the source canvas.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 260](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L260))   ### 
<static> setSmoothingEnabled(context, value) → {CanvasRenderingContext2D}

  Sets the Image Smoothing property on the given context. Set to false to disable image smoothing.  
By default browsers have image smoothing enabled, which isn't always what you visually want, especially  
when using pixel art in a game. Note that this sets the property on the context itself, so that any image  
drawn to the context will be affected. This sets the property across all current browsers but support is  
patchy on earlier browsers, especially on mobile.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `context` | CanvasRenderingContext2D | The context to enable or disable the image smoothing on. |
| `value` | boolean | If set to true it will enable image smoothing, false will disable it. |

 ##### Returns

   CanvasRenderingContext2D -   Returns the source context.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 192](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L192))   ### 
<static> setTouchAction(canvas, value) → {HTMLCanvasElement}

  Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `canvas` | HTMLCanvasElement |  | The canvas to set the touch action on. |
| `value` | string |  <optional> | The touch action to set. Defaults to 'none'. |

 ##### Returns

   HTMLCanvasElement -   The source canvas.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L65))   ### 
<static> setTransform(context, translateX, translateY, scaleX, scaleY, skewX, skewY) → {CanvasRenderingContext2D}

  Sets the transform of the given canvas to the matrix values provided.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `context` | CanvasRenderingContext2D | The context to set the transform on. |
| `translateX` | number | The value to translate horizontally by. |
| `translateY` | number | The value to translate vertically by. |
| `scaleX` | number | The value to scale horizontally by. |
| `scaleY` | number | The value to scale vertically by. |
| `skewX` | number | The value to skew horizontaly by. |
| `skewY` | number | The value to skew vertically by. |

 ##### Returns

   CanvasRenderingContext2D -   Returns the source context.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L171))   ### 
<static> setUserSelect(canvas, value) → {HTMLCanvasElement}

  Sets the user-select property on the canvas style. Can be used to disable default browser selection actions.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `canvas` | HTMLCanvasElement |  | The canvas to set the touch action on. |
| `value` | string |  <optional> | The touch action to set. Defaults to 'none'. |

 ##### Returns

   HTMLCanvasElement -   The source canvas.

    Source code: [utils/Canvas.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Canvas.js#L85))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Canvas.html>

Class: Phaser.DOM
=================

 Constructor
-----------

 ### 
new DOM()

  DOM utility class.

 Provides a useful Window and Element functions as well as cross-browser compatibility buffer.

 Some code originally derived from [verge](https://github.com/ryanve/verge).  
Some parts were inspired by the research of Ryan Van Etten, released under MIT License 2013.

   Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 18](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L18))   Public Properties
-----------------

  ### 
<static, readonly> documentBounds : [Phaser.Rectangle](phaser.rectangle)

  The size of the document / Layout viewport.

 This incorrectly reports the dimensions in IE.

 The properties change dynamically.

   ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | Document width in pixels. |
| `height` | number | Document height in pixels. |

  Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 274](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L274))   ### 
<static, readonly> layoutBounds : [Phaser.Rectangle](phaser.rectangle)

  The bounds of the Layout viewport, as discussed in  
[A tale of two viewports — part two](http://www.quirksmode.org/mobile/viewports2.html);  
but honoring the constraints as specified applicable viewport meta-tag.

 The bounds returned are not guaranteed to be fully aligned with CSS media queries (see  
[What size is my viewport?](http://www.matanich.com/2013/01/07/viewport-size/)).

 This is *not* representative of the Visual bounds: in particular the non-primary axis will  
generally be significantly larger than the screen height on mobile devices when running with a  
constrained viewport.

 The properties change dynamically.

   ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | Viewport width in pixels. |
| `height` | number | Viewport height in pixels. |

  Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 260](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L260))   ### 
<internal, static, readonly> scrollX : number

  A cross-browser window.scrollX.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 289](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L289))   ### 
<internal, static, readonly> scrollY : number

  A cross-browser window.scrollY.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 301](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L301))   ### 
<static, readonly> visualBounds : [Phaser.Rectangle](phaser.rectangle)

  The bounds of the Visual viewport, as discussed in  
[A tale of two viewports — part one](http://www.quirksmode.org/mobile/viewports.html)  
with one difference: the viewport size *excludes* scrollbars, as found on some desktop browsers. 

 Supported mobile:  
 iOS/Safari, Android 4, IE10, Firefox OS (maybe not Firefox Android), Opera Mobile 16

 The properties change dynamically.

   ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | Scroll, left offset - eg. "scrollX" |
| `y` | number | Scroll, top offset - eg. "scrollY" |
| `width` | number | Viewport width in pixels. |
| `height` | number | Viewport height in pixels. |

  Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 239](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L239))    Public Methods
--------------

  ### 
<static> getAspectRatio(object) → {number}

  Get the Visual viewport aspect ratio (or the aspect ratio of an object or element)

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object` | DOMElement | Object |  <optional> |  (visualViewport)  | The object to determine the aspect ratio for. Must have public `width` and `height` properties or methods. |

 ##### Returns

   number -   The aspect ratio.

    Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L100))   ### 
<static> getBounds(element, cushion) → {Object | boolean}

  A cross-browser element.getBoundingClientRect method with optional cushion.

 Returns a plain object containing the properties `top/bottom/left/right/width/height` with respect to the top-left corner of the current viewport.  
Its properties match the native rectangle.  
The cushion parameter is an amount of pixels (+/-) to cushion the element.  
It adjusts the measurements such that it is possible to detect when an element is near the viewport.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `element` | DOMElement | Object |  | The element or stack (uses first item) to get the bounds for. |
| `cushion` | number |  <optional> | A +/- pixel adjustment amount. |

 ##### Returns

   Object | boolean -   A plain object containing the properties `top/bottom/left/right/width/height` or `false` if a non-valid element is given.

    Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L48))   ### 
<static> getOffset(element, point) → {[Phaser.Point](phaser.point)}

  Get the [absolute] position of the element relative to the Document.

 The value may vary slightly as the page is scrolled due to rounding errors.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `element` | DOMElement |  | The targeted element that we want to retrieve the offset. |
| `point` | [Phaser.Point](phaser.point) |  <optional> | The point we want to take the x/y values of the offset. |

 ##### Returns

   [Phaser.Point](phaser.point) -   * A point objet with the offsetX and Y as its properties.

    Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L20))   ### 
<internal, static> getScreenOrientation(primaryFallback)

  Returns the device screen orientation.

 Orientation values: 'portrait-primary', 'landscape-primary', 'portrait-secondary', 'landscape-secondary'.

 Order of resolving:

 * Screen Orientation API, or variation of - Future track. Most desktop and mobile browsers.
* Screen size ratio check - If fallback is 'screen', suited for desktops.
* Viewport size ratio check - If fallback is 'viewport', suited for mobile.
* window.orientation - If fallback is 'window.orientation', works iOS and probably most Android; non-recommended track.
* Media query
* Viewport size ratio check (probably only IE9 and legacy mobile gets here..)

 See

 * https://w3c.github.io/screen-orientation/ (conflicts with mozOrientation/msOrientation)
* https://developer.mozilla.org/en-US/docs/Web/API/Screen.orientation (mozOrientation)
* http://msdn.microsoft.com/en-us/library/ie/dn342934(v=vs.85).aspx
* https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Testing\_media\_queries
* http://stackoverflow.com/questions/4917664/detect-viewport-orientation
* http://www.matthewgifford.com/blog/2011/12/22/a-misconception-about-window-orientation

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `primaryFallback` | string |  <optional> |  (none)  | Specify 'screen', 'viewport', or 'window.orientation'. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L149))   ### 
<static> inLayoutViewport(element, cushion) → {boolean}

  Tests if the given DOM element is within the Layout viewport.

 The optional cushion parameter allows you to specify a distance.

 inLayoutViewport(element, 100) is `true` if the element is in the viewport or 100px near it.  
inLayoutViewport(element, -100) is `true` if the element is in the viewport or at least 100px near it.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `element` | DOMElement | Object |  | The DOM element to check. If no element is given it defaults to the Phaser game canvas. |
| `cushion` | number |  <optional> | The cushion allows you to specify a distance within which the element must be within the viewport. |

 ##### Returns

   boolean -   True if the element is within the viewport, or within `cushion` distance from it.

    Source code: [utils/DOM.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js) ([Line 128](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/DOM.js#L128))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.DOM.html>

Class: Phaser.ArraySet
======================

 Constructor
-----------

 ### 
new ArraySet(list)

  ArraySet is a Set data structure (items must be unique within the set) that also maintains order.  
This allows specific items to be easily added or removed from the Set.

 Item equality (and uniqueness) is determined by the behavior of `Array.indexOf`.

 This used primarily by the Input subsystem.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `list` | Array.<any> |  <optional> |  (new array)  | The backing array: if specified the items in the list *must* be unique, per `Array.indexOf`, and the ownership of the array *should* be relinquished to the ArraySet. |

  Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L19))   Public Properties
-----------------

  ### 
first :any

  Returns the first item and resets the cursor to the start.

   Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 231](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L231))   ### 
list : Array.<any>

  The backing array.

  ##### Type

 * Array.<any>

  Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L32))   ### 
next :any

  Returns the the next item (based on the cursor) and advances the cursor.

   Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 256](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L256))   ### 
position : integer

  Current cursor position as established by `first` and `next`.

   Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L26))   ### 
total : integer

  Number of items in the ArraySet. Same as `list.length`.

   Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L217))    Public Methods
--------------

  ### 
add(item) → {any}

  Adds a new element to the end of the list.  
If the item already exists in the list it is not moved.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `item` | any | The element to add to this list. |

 ##### Returns

   any -   The item that was added.

    Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L38))   ### 
callAll(key, parameter)

  Calls a function on all members of this list, using the member as the context for the callback.

 If the `key` property is present it must be a function.  
The function is invoked using the item as the context.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `key` | string |  | The name of the property with the function to call. |
| `parameter` | \* |  <repeatable> | Additional parameters that will be passed to the callback. |

  Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 159](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L159))   ### 
exists(item) → {boolean}

  Checks for the item within this list.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `item` | any | The element to get the list index for. |

 ##### Returns

   boolean -   True if the item is found in the list, otherwise false.

    Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L95))   ### 
getByKey(property, value) → {any}

  Gets an item from the set based on the property strictly equaling the value given.  
Returns null if not found.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to check against the value. |
| `value` | any | The value to check if the property strictly equals. |

 ##### Returns

   any -   The item that was found, or null if nothing matched.

    Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L70))   ### 
getIndex(item) → {integer}

  Gets the index of the item in the list, or -1 if it isn't in the list.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `item` | any | The element to get the list index for. |

 ##### Returns

   integer -   The index of the item or -1 if not found.

    Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L57))   ### 
remove(item) → {any}

  Removes the given element from this list if it exists.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `item` | any | The item to be removed from the list. |

 ##### Returns

   any -   item - The item that was removed.

    Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L119))   ### 
removeAll(destroy)

  Removes every member from this ArraySet and optionally destroys it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroy` | boolean |  <optional> |  false  | Call `destroy` on each member as it's removed from this set. |

  Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L185))   ### 
reset()

  Removes all the items.

   Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 108](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L108))   ### 
setAll(key, value)

  Sets the property `key` to the given value on all members of this list.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | any | The property of the item to set. |
| `value` | any | The value to set the property to. |

  Source code: [utils/ArraySet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArraySet.js#L138))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.ArraySet.html>

Class: Phaser.ArrayUtils
========================

 Constructor
-----------

 ### 
new ArrayUtils()

  Utility functions for dealing with Arrays.

   Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 13](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L13))   Public Methods
--------------

  ### 
<static> findClosest(value, arr) → {number}

  Snaps a value to the nearest value in an array.  
The result will always be in the range `[first_value, last_value]`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `value` | number | The search value |
| `arr` | Array.<number> | The input array which *must* be sorted. |

 ##### Returns

   number -   The nearest value found.

    Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 172](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L172))   ### 
<static> getRandomItem(objects, startIndex, length) → {object}

  Fetch a random entry from the given array.

 Will return null if there are no array items that fall within the specified range  
or if there is no item for the randomly chosen index.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `objects` | Array.<any> | An array of objects. |
| `startIndex` | integer | Optional offset off the front of the array. Default value is 0, or the beginning of the array. |
| `length` | integer | Optional restriction on the number of values you want to randomly select from. |

 ##### Returns

   object -   The random object that was selected.

    Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L27))   ### 
<static> removeRandomItem(objects, startIndex, length) → {object}

  Removes a random object from the given array and returns it.

 Will return null if there are no array items that fall within the specified range  
or if there is no item for the randomly chosen index.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `objects` | Array.<any> | An array of objects. |
| `startIndex` | integer | Optional offset off the front of the array. Default value is 0, or the beginning of the array. |
| `length` | integer | Optional restriction on the number of values you want to randomly select from. |

 ##### Returns

   object -   The random object that was removed.

    Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L51))   ### 
<static> rotate(array) → {any}

  This method is *deprecated* and should not be used. It may be removed in the future.   Moves the element from the start of the array to the end, shifting all items in the process.  
The "rotation" happens to the left.

 Before: `[ A, B, C, D, E, F ]`  
After: `[ B, C, D, E, F, A ]`

 See also Phaser.ArrayUtils.rotateRight

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `array` | Array.<any> | The array to rotate. The array is modified. |

 ##### Returns

   any -   The rotated value.

    Deprecated: * Please use Phaser.ArrayUtils.rotate instead.
 Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 239](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L239))   ### 
<static> rotateLeft(array) → {any}

  Moves the element from the start of the array to the end, shifting all items in the process.  
The "rotation" happens to the left.

 Before: `[ A, B, C, D, E, F ]`  
After: `[ B, C, D, E, F, A ]`

 See also Phaser.ArrayUtils.rotateRight

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `array` | Array.<any> | The array to rotate. The array is modified. |

 ##### Returns

   any -   The rotated value.

    Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L217))   ### 
<static> rotateMatrix(matrix, direction) → {Array.<Array.<any>>}

  Rotates the given matrix (array of arrays).

 Based on the routine from <http://jsfiddle.net/MrPolywhirl/NH42z/>.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Array.<Array.<any>> | The array to rotate; this matrix *may* be altered. |
| `direction` | number | string | The amount to rotate: the rotation in degrees (90, -90, 270, -270, 180) or a string command ('rotateLeft', 'rotateRight' or 'rotate180'). |

 ##### Returns

   Array.<Array.<any>> -   The rotated matrix. The source matrix should be discarded for the returned matrix.

    Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L132))   ### 
<static> rotateRight(array) → {any}

  Moves the element from the end of the array to the start, shifting all items in the process.  
The "rotation" happens to the right.

 Before: `[ A, B, C, D, E, F ]`  
After: `[ F, A, B, C, D, E ]`

 See also Phaser.ArrayUtils.rotateLeft.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `array` | Array.<any> | The array to rotate. The array is modified. |

 ##### Returns

   any -   The shifted value.

    Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 195](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L195))   ### 
<static> shuffle(array) → {Array.<any>}

  A standard Fisher-Yates Array shuffle implementation which modifies the array in place.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `array` | Array.<any> | The array to shuffle. |

 ##### Returns

   Array.<any> -   The original array, now shuffled.

    Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L80))   ### 
<static> transposeMatrix(array) → {Array.<Array.<any>>}

  Transposes the elements of the given matrix (array of arrays).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `array` | Array.<Array.<any>> | The matrix to transpose. |

 ##### Returns

   Array.<Array.<any>> -   A new transposed matrix

    Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 101](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L101))   ### 
numberArray(start, end) → {Array.<number>}

  Create an array representing the inclusive range of numbers (usually integers) in `[start, end]`.  
This is equivalent to `numberArrayStep(start, end, 1)`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `start` | number | The minimum value the array starts with. |
| `end` | number | The maximum value the array contains. |

 ##### Returns

   Array.<number> -   The array of number values.

    Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 262](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L262))   ### 
numberArrayStep(start, end, step) → {Array}

  Create an array of numbers (positive and/or negative) progressing from `start`  
up to but not including `end` by advancing by `step`.

 If `start` is less than `end` a zero-length range is created unless a negative `step` is specified.

 Certain values for `start` and `end` (eg. NaN/undefined/null) are currently coerced to 0;  
for forward compatibility make sure to pass in actual numbers.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `start` | number |  |  | The start of the range. |
| `end` | number |  <optional> |  | The end of the range. |
| `step` | number |  <optional> |  1  | The value to increment or decrement by. |

 ##### Returns

   Array -   Returns the new array of numbers.

    Source code: [utils/ArrayUtils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/ArrayUtils.js#L284))   ##### Example

 
```
Phaser.ArrayUtils.numberArrayStep(4);
// => [0, 1, 2, 3]

Phaser.ArrayUtils.numberArrayStep(1, 5);
// => [1, 2, 3, 4]

Phaser.ArrayUtils.numberArrayStep(0, 20, 5);
// => [0, 5, 10, 15]

Phaser.ArrayUtils.numberArrayStep(0, -4, -1);
// => [0, -1, -2, -3]

Phaser.ArrayUtils.numberArrayStep(1, 4, 0);
// => [1, 1, 1]

Phaser.ArrayUtils.numberArrayStep(0);
// => []
```
 

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.ArrayUtils.html>

Class: Phaser.Tween
===================

 Constructor
-----------

 ### 
new Tween(target, game, manager)

  A Tween allows you to alter one or more properties of a target object over a defined period of time.  
This can be used for things such as alpha fading Sprites, scaling them or motion.  
Use `Tween.to` or `Tween.from` to set-up the tween values. You can create multiple tweens on the same object  
by calling Tween.to multiple times on the same Tween. Additional tweens specified in this way become "child" tweens and  
are played through in sequence. You can use Tween.timeScale and Tween.reverse to control the playback of this Tween and all of its children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `target` | object | The target object, such as a Phaser.Sprite or Phaser.Sprite.scale. |
| `game` | [Phaser.Game](phaser.game) | Current game instance. |
| `manager` | [Phaser.TweenManager](phaser.tweenmanager) | The TweenManager responsible for looking after this Tween. |

  Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L20))   Public Properties
-----------------

  ### 
chainedTween : [Phaser.Tween](phaser.tween)

  If this Tween is chained to another this holds a reference to it.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L130))   ### 
[readonly] current : number

  The current Tween child being run.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 120](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L120))   ### 
frameBased : boolean

  Is this Tween frame or time based? A frame based tween will use the physics elapsed timer when updating. This means  
it will retain the same consistent frame rate, regardless of the speed of the device. The duration value given should  
be given in frames.

 If the Tween uses a time based update (which is the default) then the duration is given in milliseconds.  
In this situation a 2000ms tween will last exactly 2 seconds, regardless of the device and how many visual updates the tween  
has actually been through. For very short tweens you may wish to experiment with a frame based update instead.

 The default value is whatever you've set in TweenManager.frameBased.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 152](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L152))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L25))   ### 
isPaused : boolean

  Is this Tween paused or not?

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 136](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L136))   ### 
isRunning : boolean

  If the tween is running this is set to true, otherwise false. Tweens that are in a delayed state or waiting to start are considered as being running.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L113))   ### 
manager : [Phaser.TweenManager](phaser.tweenmanager)

  Reference to the TweenManager responsible for updating this Tween.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L35))   ### 
onChildComplete : [Phaser.Signal](phaser.signal)

  The onChildComplete event is fired when the Tween or any of its children completes.  
Fires every time a child completes unless a child is set to repeat forever.  
It will be sent 2 parameters: the target object and this tween.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L100))   ### 
onComplete : [Phaser.Signal](phaser.signal)

  The onComplete event is fired when the Tween and all of its children completes. Does not fire if the Tween is set to loop or repeatAll(-1).  
It will be sent 2 parameters: the target object and this tween.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L107))   ### 
onLoop : [Phaser.Signal](phaser.signal)

  The onLoop event is fired if the Tween, or any child tweens loop.  
It will be sent 2 parameters: the target object and this tween.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L85))   ### 
onRepeat : [Phaser.Signal](phaser.signal)

  The onRepeat event is fired if the Tween and all of its children repeats. If this tween has no children this will never be fired.  
It will be sent 2 parameters: the target object and this tween.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L92))   ### 
onStart : [Phaser.Signal](phaser.signal)

  The onStart event is fired when the Tween begins. If there is a delay before the tween starts then onStart fires after the delay is finished.  
It will be sent 2 parameters: the target object and this tween.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L77))   ### 
[readonly] pendingDelete : boolean

  True if this Tween is ready to be deleted by the TweenManager.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L70))   ### 
properties : Object

  Target property cache used when building the child data values.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L125))   ### 
repeatCounter : number

  If the Tween and any child tweens are set to repeat this contains the current repeat count.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L63))   ### 
reverse : boolean

  If set to `true` the current tween will play in reverse.  
If the tween hasn't yet started this has no effect.  
If there are child tweens then all child tweens will play in reverse from the current point.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L49))   ### 
target : Object

  The target object, such as a Phaser.Sprite or property like Phaser.Sprite.scale.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L30))   ### 
timeline : Array

  An Array of TweenData objects that comprise the different parts of this Tween.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L40))   ### 
timeScale : number

  The speed at which the tweens will run. A value of 1 means it will match the game frame rate. 0.5 will run at half the frame rate. 2 at double the frame rate, etc.  
If a tweens duration is 1 second but timeScale is 0.5 then it will take 2 seconds to complete.

   Default Value * 1
 Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L58))   ### 
totalDuration : [Phaser.TweenData](phaser.tweendata)

  Gets the total duration of this Tween, including all child tweens, in milliseconds.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 893](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L893))    Public Methods
--------------

  ### 
chain(tweens) → {[Phaser.Tween](phaser.tween)}

  This method allows you to chain tweens together. Any tween chained to this tween will have its `Tween.start` method called  
as soon as this tween completes. If this tween never completes (i.e. repeatAll or loop is set) then the chain will never progress.  
Note that `Tween.onComplete` will fire when *this* tween completes, not when the whole chain completes.  
For that you should listen to `onComplete` on the final tween in your chain.

 If you pass multiple tweens to this method they will be joined into a single long chain.  
For example if this is Tween A and you pass in B, C and D then B will be chained to A, C will be chained to B and D will be chained to C.  
Any previously chained tweens that may have been set will be overwritten.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `tweens` | [Phaser.Tween](phaser.tween) |  <repeatable> | One or more tweens that will be chained to this one. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 566](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L566))   ### 
delay(duration, index) → {[Phaser.Tween](phaser.tween)}

  Sets the delay in milliseconds before this tween will start. If there are child tweens it sets the delay before the first child starts.  
The delay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween.  
If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to delay.  
If you have child tweens and pass -1 as the index value it sets the delay across all of them.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `duration` | number |  |  | The amount of time in ms that the Tween should wait until it begins once started is called. Set to zero to remove any active delay. |
| `index` | number |  <optional> |  0  | If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the delay on all the children. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 408](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L408))   ### 
easing(ease, index) → {[Phaser.Tween](phaser.tween)}

  Set easing function this tween will use, i.e. Phaser.Easing.Linear.None.  
The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ".  
".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.  
If you have child tweens and pass -1 as the index value it sets the easing function defined here across all of them.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `ease` | function | string |  |  | The easing function this tween will use, i.e. Phaser.Easing.Linear.None. |
| `index` | number |  <optional> |  0  | If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the easing function on all children. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 504](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L504))   ### 
from(properties, duration, ease, autoStart, delay, repeat, yoyo) → {[Phaser.Tween](phaser.tween)}

  Sets this tween to be a `from` tween on the properties given. A `from` tween sets the target to the destination value and tweens to its current value.  
For example a Sprite with an `x` coordinate of 100 tweened from `x` 500 would be set to `x` 500 and then tweened to `x` 100 by giving a properties object of `{ x: 500 }`.  
The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ".  
".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `properties` | object |  |  | An object containing the properties you want to tween., such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. |
| `duration` | number |  <optional> |  1000  | Duration of this tween in ms. Or if `Tween.frameBased` is true this represents the number of frames that should elapse. |
| `ease` | function | string |  <optional> |  null  | Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden. |
| `autoStart` | boolean |  <optional> |  false  | Set to `true` to allow this tween to start automatically. Otherwise call Tween.start(). |
| `delay` | number |  <optional> |  0  | Delay before this tween will start in milliseconds. Defaults to 0, no delay. |
| `repeat` | number |  <optional> |  0  | Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this individual tween, not any chained tweens. |
| `yoyo` | boolean |  <optional> |  false  | A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This Tween object.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 237](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L237))   ### 
generateData(frameRate, data) → {array}

  This will generate an array populated with the tweened object values from start to end.  
It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from.  
It ignores delay and repeat counts and any chained tweens, but does include child tweens.  
Just one play through of the tween data is returned, including yoyo if set.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `frameRate` | number |  <optional> |  60  | The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates. |
| `data` | array |  <optional> |  | If given the generated data will be appended to this array, otherwise a new array will be returned. |

 ##### Returns

   array -   An array of tweened values.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 840](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L840))   ### 
interpolation(interpolation, context, index) → {[Phaser.Tween](phaser.tween)}

  Sets the interpolation function the tween will use. By default it uses Phaser.Math.linearInterpolation.  
Also available: Phaser.Math.bezierInterpolation and Phaser.Math.catmullRomInterpolation.  
The interpolation function is only used if the target properties is an array.  
If you have child tweens and pass -1 as the index value and it will set the interpolation function across all of them.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `interpolation` | function |  |  | The interpolation function to use (Phaser.Math.linearInterpolation by default) |
| `context` | object |  <optional> |  | The context under which the interpolation function will be run. |
| `index` | number |  <optional> |  0  | If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the interpolation function on all children. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 526](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L526))   ### 
loop(value) → {[Phaser.Tween](phaser.tween)}

  Enables the looping of this tween. The tween will loop forever, and onComplete will never fire.

 If `value` is `true` then this is the same as setting `Tween.repeatAll(-1)`.  
If `value` is `false` it is the same as setting `Tween.repeatAll(0)` and will reset the `repeatCounter` to zero.

 Usage:  
game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)  
.to({ y: 300 }, 1000, Phaser.Easing.Linear.None)  
.to({ x: 0 }, 1000, Phaser.Easing.Linear.None)  
.to({ y: 0 }, 1000, Phaser.Easing.Linear.None)  
.loop();

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `value` | boolean |  <optional> |  true  | If `true` this tween will loop once it reaches the end. Set to `false` to remove an active loop. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L600))   ### 
onUpdateCallback(callback, callbackContext) → {[Phaser.Tween](phaser.tween)}

  Sets a callback to be fired each time this tween updates.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `callback` | function | The callback to invoke each time this tween is updated. Set to `null` to remove an already active callback. |
| `callbackContext` | object | The context in which to call the onUpdate callback. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 626](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L626))   ### 
pause()

  Pauses the tween. Resume playback with Tween.resume.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 643](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L643))   ### 
repeat(total, repeat, index) → {[Phaser.Tween](phaser.tween)}

  Sets the number of times this tween will repeat.  
If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to repeat.  
If you have child tweens and pass -1 as the index value it sets the number of times they'll repeat across all of them.  
If you wish to define how many times this Tween and all children will repeat see Tween.repeatAll.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `total` | number |  |  | How many times a tween should repeat before completing. Set to zero to remove an active repeat. Set to -1 to repeat forever. |
| `repeat` | number |  <optional> |  0  | This is the amount of time to pause (in ms) before the repeat will start. |
| `index` | number |  <optional> |  0  | If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the repeat value on all the children. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 425](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L425))   ### 
repeatAll(total) → {[Phaser.Tween](phaser.tween)}

  Set how many times this tween and all of its children will repeat.  
A tween (A) with 3 children (B,C,D) with a `repeatAll` value of 2 would play as: ABCDABCD before completing.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `total` | number |  <optional> |  0  | How many times this tween and all children should repeat before completing. Set to zero to remove an active repeat. Set to -1 to repeat forever. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 548](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L548))   ### 
repeatDelay(duration, index) → {[Phaser.Tween](phaser.tween)}

  Sets the delay in milliseconds before this tween will repeat itself.  
The repeatDelay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween.  
If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to set repeatDelay on.  
If you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `duration` | number |  |  | The amount of time in ms that the Tween should wait until it repeats or yoyos once start is called. Set to zero to remove any active repeatDelay. |
| `index` | number |  <optional> |  0  | If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the repeatDelay on all the children. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 447](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L447))   ### 
resume()

  Resumes a paused tween.

   Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 675](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L675))   ### 
start(index) → {[Phaser.Tween](phaser.tween)}

  Starts the tween running. Can also be called by the autoStart parameter of `Tween.to` or `Tween.from`.  
This sets the `Tween.isRunning` property to `true` and dispatches a `Tween.onStart` signal.  
If the Tween has a delay set then nothing will start tweening until the delay has expired.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `index` | number |  <optional> |  0  | If this Tween contains child tweens you can specify which one to start from. The default is zero, i.e. the first tween created. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L284))   ### 
stop(complete) → {[Phaser.Tween](phaser.tween)}

  Stops the tween if running and flags it for deletion from the TweenManager.  
If called directly the `Tween.onComplete` signal is not dispatched and no chained tweens are started unless the complete parameter is set to `true`.  
If you just wish to pause a tween then use Tween.pause instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `complete` | boolean |  <optional> |  false  | Set to `true` to dispatch the Tween.onComplete signal. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 340](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L340))   ### 
to(properties, duration, ease, autoStart, delay, repeat, yoyo) → {[Phaser.Tween](phaser.tween)}

  Sets this tween to be a `to` tween on the properties given. A `to` tween starts at the current value and tweens to the destination value given.  
For example a Sprite with an `x` coordinate of 100 could be tweened to `x` 200 by giving a properties object of `{ x: 200 }`.  
The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ".  
".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `properties` | object |  |  | An object containing the properties you want to tween, such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. |
| `duration` | number |  <optional> |  1000  | Duration of this tween in ms. Or if `Tween.frameBased` is true this represents the number of frames that should elapse. |
| `ease` | function | string |  <optional> |  null  | Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden. |
| `autoStart` | boolean |  <optional> |  false  | Set to `true` to allow this tween to start automatically. Otherwise call Tween.start(). |
| `delay` | number |  <optional> |  0  | Delay before this tween will start in milliseconds. Defaults to 0, no delay. |
| `repeat` | number |  <optional> |  0  | Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this individual tween, not any chained tweens. |
| `yoyo` | boolean |  <optional> |  false  | A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This Tween object.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 190](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L190))   ### 
update(time) → {boolean}

  Core tween update function called by the TweenManager. Does not need to be invoked directly.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `time` | number | A timestamp passed in by the TweenManager. |

 ##### Returns

   boolean -   false if the tween and all child tweens have completed and should be deleted from the manager, otherwise true (still active).

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L717))   ### 
updateTweenData(property, value, index) → {[Phaser.Tween](phaser.tween)}

  Updates either a single TweenData or all TweenData objects properties to the given value.  
Used internally by methods like Tween.delay, Tween.yoyo, etc. but can also be called directly if you know which property you want to tweak.  
The property is not checked, so if you pass an invalid one you'll generate a run-time error.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `property` | string |  |  | The property to update. |
| `value` | number | function |  |  | The value to set the property to. |
| `index` | number |  <optional> |  0  | If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the delay on all the children. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 375](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L375))   ### 
yoyo(enable, yoyoDelay, index) → {[Phaser.Tween](phaser.tween)}

  A Tween that has yoyo set to true will run through from its starting values to its end values and then play back in reverse from end to start.  
Used in combination with repeat you can create endless loops.  
If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to yoyo.  
If you have child tweens and pass -1 as the index value it sets the yoyo property across all of them.  
If you wish to yoyo this Tween and all of its children then see Tween.yoyoAll.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `enable` | boolean |  |  | Set to true to yoyo this tween, or false to disable an already active yoyo. |
| `yoyoDelay` | number |  <optional> |  0  | This is the amount of time to pause (in ms) before the yoyo will start. |
| `index` | number |  <optional> |  0  | If this tween has more than one child this allows you to target a specific child. If set to -1 it will set yoyo on all the children. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 464](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L464))   ### 
yoyoDelay(duration, index) → {[Phaser.Tween](phaser.tween)}

  Sets the delay in milliseconds before this tween will run a yoyo (only applies if yoyo is enabled).  
The repeatDelay is invoked as soon as you call `Tween.start`. If the tween is already running this method doesn't do anything for the current active tween.  
If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to set repeatDelay on.  
If you have child tweens and pass -1 as the index value it sets the repeatDelay across all of them.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `duration` | number |  |  | The amount of time in ms that the Tween should wait until it repeats or yoyos once start is called. Set to zero to remove any active yoyoDelay. |
| `index` | number |  <optional> |  0  | If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the yoyoDelay on all the children. |

 ##### Returns

   [Phaser.Tween](phaser.tween) -   This tween. Useful for method chaining.

    Source code: [tween/Tween.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js) ([Line 487](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Tween.js#L487))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Tween.html>

Class: Phaser.Sound
===================

 Constructor
-----------

 ### 
new Sound(game, key, volume, loop)

  The Sound class constructor.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | Reference to the current game instance. |
| `key` | string |  |  | Asset key for the sound. |
| `volume` | number |  <optional> |  1  | Default value for the volume, between 0 and 1. |
| `loop` | boolean |  <optional> |  false  | Whether or not the sound will loop. |

  Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L17))   Public Properties
-----------------

  ### 
allowMultiple : boolean

  This will allow you to have multiple instances of this Sound playing at once. This is only useful when running under Web Audio, and we recommend you implement a local pooling system to not flood the sound channels.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L144))   ### 
autoplay : boolean

  Boolean indicating whether the sound should start automatically.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L57))   ### 
context :AudioContext

  Reference to the AudioContext instance.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L52))   ### 
currentMarker : string

  The string ID of the currently playing marker, if any.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 121](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L121))   ### 
currentTime : number

  The current time the sound is at.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L73))   ### 
duration : number

  The duration of the current sound marker in seconds.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L78))   ### 
durationMS : number

  The duration of the current sound marker in ms.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 83](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L83))   ### 
externalNode : Object

  If defined this Sound won't connect to the SoundManager master gain node, but will instead connect to externalNode.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L160))   ### 
fadeTween : [Phaser.Tween](phaser.tween)

  The tween that fades the audio, set via Sound.fadeIn and Sound.fadeOut.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 126](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L126))   ### 
gainNode : Object

  The gain node in a Web Audio system.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 170](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L170))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L27))   ### 
[readonly] isDecoded : boolean

  Returns true if the sound file has decoded.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 1087](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L1087))   ### 
[readonly] isDecoding : boolean

  Returns true if the sound file is still decoding.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 1074](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L1074))   ### 
isPlaying : boolean

  true if the sound is currently playing, otherwise false.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L115))   ### 
key : string

  Asset key for the sound.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L37))   ### 
loop : boolean

  Whether or not the sound or current sound marker will loop.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L42))   ### 
markers : Object

  The sound markers.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 47](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L47))   ### 
masterGainNode : Object

  The master gain node in a Web Audio system.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L165))   ### 
mute : boolean

  Gets or sets the muted state of this sound.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 1100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L1100))   ### 
name : string

  Name of the sound.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L32))   ### 
onDecoded : [Phaser.Signal](phaser.signal)

  The onDecoded event is dispatched when the sound has finished decoding (typically for mp3 files)

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L220))   ### 
onFadeComplete : [Phaser.Signal](phaser.signal)

  The onFadeComplete event is dispatched when this sound finishes fading either in or out.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 260](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L260))   ### 
onLoop : [Phaser.Signal](phaser.signal)

  The onLoop event is dispatched when this sound loops during playback.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L240))   ### 
onMarkerComplete : [Phaser.Signal](phaser.signal)

  The onMarkerComplete event is dispatched when a marker within this sound completes playback.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 255](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L255))   ### 
onMute : [Phaser.Signal](phaser.signal)

  The onMute event is dispatched when this sound is muted.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 250](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L250))   ### 
onPause : [Phaser.Signal](phaser.signal)

  The onPause event is dispatched when this sound is paused.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 230](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L230))   ### 
onPlay : [Phaser.Signal](phaser.signal)

  The onPlay event is dispatched each time this sound is played.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L225))   ### 
onResume : [Phaser.Signal](phaser.signal)

  The onResume event is dispatched when this sound is resumed from a paused state.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 235](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L235))   ### 
onStop : [Phaser.Signal](phaser.signal)

  The onStop event is dispatched when this sound stops playback.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 245](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L245))   ### 
override : boolean

  if true when you play this sound it will always start from the beginning.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L138))   ### 
paused : boolean

  true if the sound is paused, otherwise false.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 99](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L99))   ### 
pausedPosition : number

  The position the sound had reached when it was paused.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L104))   ### 
pausedTime : number

  The game time at which the sound was paused.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L109))   ### 
[readonly] pendingPlayback : boolean

  true if the sound file is pending playback

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L132))   ### 
position : number

  The position of the current sound marker.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 88](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L88))   ### 
startTime : number

  The time the Sound starts at (typically 0 unless starting from a marker)

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L68))   ### 
stopTime : number

  The time the sound stopped.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L93))   ### 
totalDuration : number

  The total duration of the sound in seconds.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 62](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L62))   ### 
usingAudioTag : boolean

  true if the sound is being played via the Audio tag.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L155))   ### 
[readonly] usingWebAudio : boolean

  true if this sound is being played with Web Audio.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L150))   ### 
volume : number

  Gets or sets the volume of this sound, a value between 0 and 1. The value given is clamped to the range 0 to 1.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 1155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L1155))    Public Methods
--------------

  ### 
addMarker(name, start, duration, volume, loop)

  Adds a marker into the current Sound. A marker is represented by a unique key and a start time and duration.  
This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | A unique name for this marker, i.e. 'explosion', 'gunshot', etc. |
| `start` | number |  |  | The start point of this marker in the audio file, given in seconds. 2.5 = 2500ms, 0.5 = 500ms, etc. |
| `duration` | number |  <optional> |  1  | The duration of the marker in seconds. 2.5 = 2500ms, 0.5 = 500ms, etc. |
| `volume` | number |  <optional> |  1  | The volume the sound will play back at, between 0 (silent) and 1 (full volume). |
| `loop` | boolean |  <optional> |  false  | Sets if the sound will loop or not. |

  Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 348](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L348))   ### 
destroy(remove)

  Destroys this sound and all associated events and removes it from the SoundManager.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `remove` | boolean |  <optional> |  true  | If true this Sound is automatically removed from the SoundManager. |

  Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 1035](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L1035))   ### 
fadeIn(duration, loop, marker)

  Starts this sound playing (or restarts it if already doing so) and sets the volume to zero.  
Then increases the volume from 0 to 1 over the duration specified.

 At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter,  
and the final volume (1) as the second parameter.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `duration` | number |  <optional> |  1000  | The time in milliseconds over which the Sound should fade in. |
| `loop` | boolean |  <optional> |  false  | Should the Sound be set to loop? Note that this doesn't cause the fade to repeat. |
| `marker` | string |  <optional> |  (current marker)  | The marker to start at; defaults to the current (last played) marker. To start playing from the beginning specify specify a marker of `''`. |

  Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 924](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L924))   ### 
fadeOut(duration)

  Decreases the volume of this Sound from its current value to 0 over the duration specified.  
At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter,  
and the final volume (0) as the second parameter.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `duration` | number |  <optional> |  1000  | The time in milliseconds over which the Sound should fade out. |

  Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 952](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L952))   ### 
fadeTo(duration, volume)

  Fades the volume of this Sound from its current value to the given volume over the duration specified.  
At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter,  
and the final volume (volume) as the second parameter.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `duration` | number |  <optional> |  1000  | The time in milliseconds during which the Sound should fade out. |
| `volume` | number |  <optional> |  | The volume which the Sound should fade to. This is a value between 0 and 1. |

  Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 966](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L966))   ### 
loopFull(volume) → {[Phaser.Sound](phaser.sound)}

  Loops this entire sound. If you need to loop a section of it then use Sound.play and the marker and loop parameters.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `volume` | number |  <optional> |  1  | Volume of the sound you want to play. If none is given it will use the volume given to the Sound when it was created (which defaults to 1 if none was specified). |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   This sound instance.

    Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 492](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L492))   ### 
<internal> onEndedHandler()

  Called automatically by the AudioContext when the sound stops playing.  
Doesn't get called if the sound is set to loop or is a section of an Audio Sprite.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 388](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L388))   ### 
pause()

  Pauses the sound.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 763](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L763))   ### 
play(marker, position, volume, loop, forceRestart) → {[Phaser.Sound](phaser.sound)}

  Play this sound, or a marked section of it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `marker` | string |  <optional> |  ''  | If you want to play a marker then give the key here, otherwise leave blank to play the full sound. |
| `position` | number |  <optional> |  0  | The starting position to play the sound from - this is ignored if you provide a marker. |
| `volume` | number |  <optional> |  1  | Volume of the sound you want to play. If none is given it will use the volume given to the Sound when it was created (which defaults to 1 if none was specified). |
| `loop` | boolean |  <optional> |  false  | Loop when finished playing? If not using a marker / audio sprite the looping will be done via the WebAudio loop property, otherwise it's time based. |
| `forceRestart` | boolean |  <optional> |  true  | If the sound is already playing you can set forceRestart to restart it from the beginning. |

 ##### Returns

   [Phaser.Sound](phaser.sound) -   This sound instance.

    Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 505](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L505))   ### 
removeMarker(name)

  Removes a marker from the sound.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The key of the marker to remove. |

  Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 377](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L377))   ### 
restart(marker, position, volume, loop)

  Restart the sound, or a marked section of it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `marker` | string |  <optional> |  ''  | If you want to play a marker then give the key here, otherwise leave blank to play the full sound. |
| `position` | number |  <optional> |  0  | The starting position to play the sound from - this is ignored if you provide a marker. |
| `volume` | number |  <optional> |  1  | Volume of the sound you want to play. |
| `loop` | boolean |  <optional> |  false  | Loop when it finished playing? |

  Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 743](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L743))   ### 
resume()

  Resumes the sound.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 782](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L782))   ### 
<internal> soundHasUnlocked(key)

  Called automatically when this sound is unlocked.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The Phaser.Cache key of the sound file to check for decoding. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 332](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L332))   ### 
stop()

  Stop playing this sound.

   Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 858](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L858))   ### 
<internal> update()

  Called automatically by Phaser.SoundManager.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 404](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L404))   ### 
<internal> updateGlobalVolume(globalVolume)

  Called automatically by SoundManager.volume.

 Sets the volume of AudioTag Sounds as a percentage of the Global Volume.

 You should not normally call this directly.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `globalVolume` | float | The global SoundManager volume. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [sound/Sound.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js) ([Line 1013](https://github.com/photonstorm/phaser/tree/v2.6.2/src/sound/Sound.js#L1013))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Sound.html>

Class: PIXI.CanvasRenderer
==========================

 Constructor
-----------

 ### 
new CanvasRenderer(game)

  The CanvasRenderer draws the Stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL.  
Don't forget to add the CanvasRenderer.view to your DOM or you will not see anything :)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | PhaserGame | A reference to the Phaser Game instance |

  Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L5))   Public Properties
-----------------

  ### 
autoResize : boolean

  Whether the render view should be resized automatically

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L61))   ### 
CanvasMaskManager : [PIXI.CanvasMaskManager](pixi.canvasmaskmanager)

  Instance of a PIXI.CanvasMaskManager, handles masking when using the canvas renderer

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 118](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L118))   ### 
clearBeforeRender : boolean

  This sets if the CanvasRenderer will clear the canvas or not before the new render pass.  
If the Stage is NOT transparent Pixi will use a canvas sized fillRect operation every frame to set the canvas background color.  
If the Stage is transparent Pixi will use clearRect to clear the canvas every frame.  
Disable this by setting this to false. For example if your game has a canvas filling background image you often don't need this set.

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 41](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L41))   ### 
context :CanvasRenderingContext2D

  The canvas 2d context that everything is drawn with

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L95))   ### 
count : number

  Internal var.

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L110))   ### 
game :PhaserGame

  Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 15](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L15))   ### 
height : number

  The height of the canvas view

   Default Value * 600
 Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L78))   ### 
refresh : boolean

  Boolean flag controlling canvas refresh.

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L102))   ### 
renderSession : Object

  The render session is just a bunch of parameter used for rendering

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L125))   ### 
resolution : number

  The resolution of the canvas.

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L33))   ### 
transparent : boolean

  Whether the render view is transparent

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L53))   ### 
type : number

  The renderer type.

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L25))   ### 
view :HTMLCanvasElement

  The canvas element that everything is drawn to.

   Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L87))   ### 
width : number

  The width of the canvas view

   Default Value * 800
 Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L69))    Public Methods
--------------

  ### 
destroy(removeView)

  Removes everything from the renderer and optionally removes the Canvas DOM element.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `removeView` | Boolean |  <optional> |  true  | Removes the Canvas element from the DOM. |

  Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 194](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L194))   ### 
render(root)

  Renders the DisplayObjectContainer, usually the Phaser.Stage, to this canvas view.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `root` | PhaserStage | PIXIDisplayObjectContainer | The root element to be rendered. |

  Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 152](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L152))   ### 
resize(width, height)

  Resizes the canvas view to the specified width and height

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | Number | the new width of the canvas view |
| `height` | Number | the new height of the canvas view |

  Source code: [pixi/renderers/canvas/CanvasRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js) ([Line 216](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/CanvasRenderer.js#L216))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.CanvasRenderer.html>

Class: PIXI.WebGLRenderer
=========================

 Constructor
-----------

 ### 
new WebGLRenderer(game)

  The WebGLRenderer draws the stage and all its content onto a webGL enabled canvas. This renderer  
should be used for browsers that support webGL. This Render works by automatically managing webGLBatchs.  
So no need for Sprite Batches or Sprite Clouds.  
Don't forget to add the view to your DOM or you will not see anything :)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | PhaserGame | A reference to the Phaser Game instance |

  Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 8](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L8))   Public Properties
-----------------

  ### 
autoResize : boolean

  Whether the render view should be resized automatically

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L53))   ### 
blendModeManager : [PIXI.WebGLBlendModeManager](pixi.webglblendmodemanager)

  Manages the blendModes

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L167))   ### 
clearBeforeRender : boolean

  This sets if the WebGLRenderer will clear the context texture or not before the new render pass. If true:  
If the Stage is NOT transparent, Pixi will clear to alpha (0, 0, 0, 0).  
If the Stage is transparent, Pixi will clear to the target Stage's background color.  
Disable this by setting this to false. For example: if your game has a canvas filling background image, you often don't need this set.

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L69))   ### 
filterManager : [PIXI.WebGLFilterManager](pixi.webglfiltermanager)

  Manages the filters

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L153))   ### 
game :PhaserGame

  Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L20))   ### 
height : number

  The height of the canvas view

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 89](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L89))   ### 
maskManager : [PIXI.WebGLMaskManager](http://phaser.io/docs/2.6.2/PIXI.WebGLMaskManager.html)

  Manages the masks using the stencil buffer

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L146))   ### 
offset :Point

  Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L124))   ### 
preserveDrawingBuffer : boolean

  The value of the preserveDrawingBuffer flag affects whether or not the contents of the stencil buffer is retained after rendering.

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L61))   ### 
projection :Point

  Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 118](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L118))   ### 
renderSession : Object

  Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L174))   ### 
resolution : number

  The resolution of the renderer

   Default Value * 1
 Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L36))   ### 
shaderManager : [PIXI.WebGLShaderManager](http://phaser.io/docs/2.6.2/PIXI.WebGLShaderManager.html)

  Deals with managing the shader programs and their attribs

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L132))   ### 
spriteBatch : [PIXI.WebGLSpriteBatch](http://phaser.io/docs/2.6.2/PIXI.WebGLSpriteBatch.html)

  Manages the rendering of sprites

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L139))   ### 
stencilManager : [PIXI.WebGLStencilManager](http://phaser.io/docs/2.6.2/PIXI.WebGLStencilManager.html)

  Manages the stencil buffer

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L160))   ### 
transparent : boolean

  Whether the render view is transparent

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L45))   ### 
type : number

  Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L30))   ### 
view :HTMLCanvasElement

  The canvas element that everything is drawn to

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 97](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L97))   ### 
width : number

  The width of the canvas view

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 81](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L81))    Public Methods
--------------

  ### 
destroy()

  Removes everything from the renderer (event listeners, spritebatch, etc...)

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 398](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L398))   ### 
initContext()

  Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L204))   ### 
mapBlendModes()

  Maps Pixi blend modes to WebGL blend modes.

   Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 430](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L430))   ### 
render(stage)

  Renders the stage to its webGL view

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `stage` | Stage | the Stage element to be rendered |

  Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 243](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L243))   ### 
renderDisplayObject(displayObject, projection, buffer)

  Renders a Display Object.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [DisplayObject](global#DisplayObject) | The DisplayObject to render |
| `projection` | Point | The projection |
| `buffer` | Array | a standard WebGL buffer |

  Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 278](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L278))   ### 
resize(width, height)

  Resizes the webGL view to the specified width and height.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | Number | the new width of the webGL view |
| `height` | Number | the new height of the webGL view |

  Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L315))   ### 
updateTexture(texture) → {Boolean}

  Updates and Creates a WebGL texture for the renderers context.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) | the texture to update |

 ##### Returns

   Boolean -   True if the texture was successfully bound, otherwise false.

    Source code: [pixi/renderers/webgl/WebGLRenderer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js) ([Line 341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/WebGLRenderer.js#L341))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.WebGLRenderer.html>

Class: Phaser.Device
====================

 Constructor
-----------

 ### 
<internal> new Device()

  It is not possible to instantiate the Device class manually.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L30))   Public Properties
-----------------

  ### 
<static, nullable> onInitialized : [Phaser.Signal](phaser.signal)

  This signal is dispatched after device initialization occurs but before any of the ready  
callbacks (see [whenReady](phaser.device#.whenReady)) have been invoked.

 Local "patching" for a particular device can/should be done in this event.

 *Note*: This signal is removed after the device has been readied; if a handler has not been  
added *before* `new Phaser.Game(..)` it is probably too late.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 544](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L544))   ### 
android : boolean

  Is running on android?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 118](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L118))   ### 
arora : boolean

  Set to true if running in Arora.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 257](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L257))   ### 
audioData : boolean

  Are Audio tags available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 367](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L367))   ### 
cancelFullscreen : string

  If the browser supports the Full Screen API this holds the call you need to use to cancel it.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 518](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L518))   ### 
canvas : boolean

  Is canvas available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L156))   ### 
canvasBitBltShift : boolean

  True if canvas supports a 'copy' bitblt onto itself when the source and destination regions overlap.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 162](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L162))   ### 
chrome : boolean

  Set to true if running in Chrome.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 263](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L263))   ### 
chromeOS : boolean

  Is running on chromeOS?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L124))   ### 
chromeVersion : number

  If running in Chrome this will contain the major version number.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 269](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L269))   ### 
cocoonJS : boolean

  Is the game running under CocoonJS?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L70))   ### 
cocoonJSApp : boolean

  Is this game running with CocoonJS.App?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 76](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L76))   ### 
cordova : boolean

  Is the game running under Apache Cordova?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L82))   ### 
crosswalk : boolean

  Is the game running under the Intel Crosswalk XDK?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L112))   ### 
css3D : boolean

  Is css3D available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L198))   ### 
desktop : boolean

  Is running on a desktop?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L52))   ### 
<internal> deviceReadyAt : integer

  The time the device became ready.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L37))   ### 
dolby : boolean

  Can this device play EC-3 Dolby Digital Plus files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 416](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L416))   ### 
edge : boolean

  Set to true if running in Microsoft Edge browser.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 317](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L317))   ### 
ejecta : boolean

  Is the game running under Ejecta?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L106))   ### 
electron : boolean

  Is the game running under GitHub Electron?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L100))   ### 
epiphany : boolean

  Set to true if running in Epiphany.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 275](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L275))   ### 
file : boolean

  Is file available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L174))   ### 
fileSystem : boolean

  Is fileSystem available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 180](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L180))   ### 
firefox : boolean

  Set to true if running in Firefox.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 281](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L281))   ### 
firefoxVersion : number

  If running in Firefox this will contain the major version number.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 287](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L287))   ### 
fullscreen : boolean

  Does the browser support the Full Screen API?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 506](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L506))   ### 
fullscreenKeyboard : boolean

  Does the browser support access to the Keyboard during Full Screen mode?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 524](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L524))   ### 
getUserMedia : boolean

  Does the device support the getUserMedia API?

   Default Value * true
 Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 222](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L222))   ### 
h264Video : boolean

  Can this device play h264 mp4 video files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 430](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L430))   ### 
hlsVideo : boolean

  Can this device play hls video files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 454](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L454))   ### 
ie : boolean

  Set to true if running in Internet Explorer.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L293))   ### 
ieVersion : number

  If running in Internet Explorer this will contain the major version number. Beyond IE10 you should use Device.trident and Device.tridentVersion.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 299](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L299))   ### 
<internal> initialized : boolean

  The time as which initialization has completed.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L44))   ### 
iOS : boolean

  Is running on iOS?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L58))   ### 
iOSVersion : number

  If running in iOS this will contain the major version number.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L64))   ### 
iPad : boolean

  Is running on iPad?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 474](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L474))   ### 
iPhone : boolean

  Is running on iPhone?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 462](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L462))   ### 
iPhone4 : boolean

  Is running on iPhone4?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 468](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L468))   ### 
linux : boolean

  Is running on linux?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L130))   ### 
LITTLE\_ENDIAN : boolean

  Same value as `littleEndian`.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 494](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L494))   ### 
littleEndian : boolean

  Is the device big or little endian? (only detected if the browser supports TypedArrays)

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 488](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L488))   ### 
localStorage : boolean

  Is localStorage available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L186))   ### 
m4a : boolean

  Can this device play m4a files? True if this device can play m4a files.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 404](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L404))   ### 
macOS : boolean

  Is running on macOS?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 136](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L136))   ### 
midori : boolean

  Set to true if running in Midori.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 329](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L329))   ### 
mobileSafari : boolean

  Set to true if running in Mobile Safari.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 323](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L323))   ### 
mp3 : boolean

  Can this device play mp3 files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 391](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L391))   ### 
mp4Video : boolean

  Can this device play h264 mp4 video files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 436](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L436))   ### 
mspointer : boolean

  Is mspointer available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 242](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L242))   ### 
node : boolean

  Is the game running under Node.js?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 88](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L88))   ### 
nodeWebkit : boolean

  Is the game running under Node-Webkit?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L94))   ### 
ogg : boolean

  Can this device play ogg files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 379](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L379))   ### 
oggVideo : boolean

  Can this device play ogg video files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 424](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L424))   ### 
opera : boolean

  Set to true if running in Opera.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 335](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L335))   ### 
opus : boolean

  Can this device play opus files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 385](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L385))   ### 
pixelRatio : number

  PixelRatio of the host device?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 482](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L482))   ### 
pointerLock : boolean

  Is Pointer Lock available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L204))   ### 
quirksMode : boolean

  Is the browser running in strict mode (false) or quirks mode? (true)

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 228](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L228))   ### 
requestFullscreen : string

  If the browser supports the Full Screen API this holds the call you need to use to activate it.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 512](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L512))   ### 
safari : boolean

  Set to true if running in Safari.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L341))   ### 
safariVersion : number

  If running in Safari this will contain the major version number.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 347](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L347))   ### 
silk : boolean

  Set to true if running in the Silk browser (as used on the Amazon Kindle)

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 359](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L359))   ### 
support32bit : boolean

  Does the device context support 32bit pixel manipulation using array buffer views?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 500](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L500))   ### 
touch : boolean

  Is touch available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 236](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L236))   ### 
trident : boolean

  Set to true if running a Trident version of Internet Explorer (IE11+)

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 305](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L305))   ### 
tridentVersion : number

  If running in Internet Explorer 11 this will contain the major version number. See <http://msdn.microsoft.com/en-us/library/ie/ms537503(v=vs.85).aspx>

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 311](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L311))   ### 
typedArray : boolean

  Does the browser support TypedArrays?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 210](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L210))   ### 
vibration : boolean

  Does the device support the Vibration API?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 216](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L216))   ### 
vp9Video : boolean

  Can this device play vp9 video files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 448](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L448))   ### 
wav : boolean

  Can this device play wav files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 397](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L397))   ### 
webApp : boolean

  Set to true if running as a WebApp, i.e. within a WebView

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 353](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L353))   ### 
webAudio : boolean

  Is the WebAudio API available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 373](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L373))   ### 
webGL : boolean

  Is webGL available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L168))   ### 
webm : boolean

  Can this device play webm files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 410](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L410))   ### 
webmVideo : boolean

  Can this device play webm video files?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 442](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L442))   ### 
<internal> wheelEvent

  ##### Properties:

  

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `wheelType` | string |  <nullable> | The newest type of Wheel/Scroll event supported: 'wheel', 'mousewheel', 'DOMMouseScroll' |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L249))   ### 
windows : boolean

  Is running on windows?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L142))   ### 
windowsPhone : boolean

  Is running on a Windows Phone?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 148](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L148))   ### 
worker : boolean

  Is worker available?

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 192](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L192))    Public Methods
--------------

  ### 
<static> whenReady(handler, context, nonPrimer)

  Add a device-ready handler and ensure the device ready sequence is started.

 Phaser.Device will *not* activate or initialize until at least one `whenReady` handler is added,  
which is normally done automatically be calling `new Phaser.Game(..)`.

 The handler is invoked when the device is considered "ready", which may be immediately  
if the device is already "ready". See [deviceReadyAt](phaser.device#deviceReadyAt).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `handler` | function |  |  | Callback to invoke when the device is ready. It is invoked with the given context the Phaser.Device object is supplied as the first argument. |
| `context` | object |  <optional> |  | Context in which to invoke the handler |
| `nonPrimer` | boolean |  <optional> |  false  | If true the device ready check will not be started. |

  Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 560](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L560))   ### 
canPlayAudio(type) → {boolean}

  Check whether the host environment can play audio.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `type` | string | One of 'mp3, 'ogg', 'm4a', 'wav', 'webm' or 'opus'. |

 ##### Returns

   boolean -   True if the given file type is supported by the browser, otherwise false.

    Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 1250](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L1250))   ### 
canPlayVideo(type) → {boolean}

  Check whether the host environment can play video files.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `type` | string | One of 'mp4, 'ogg', 'webm' or 'mpeg'. |

 ##### Returns

   boolean -   True if the given file type is supported by the browser, otherwise false.

    Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 1293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L1293))   ### 
isAndroidStockBrowser()

  Detect if the host is a an Android Stock browser.  
This is available before the device "ready" event.

 Authors might want to scale down on effects and switch to the CANVAS rendering method on those devices.

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 1359](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L1359))   ##### Example

 
```
var defaultRenderingMode = Phaser.Device.isAndroidStockBrowser() ? Phaser.CANVAS : Phaser.AUTO;
```
 ### 
isConsoleOpen()

  Check whether the console is open.  
Note that this only works in Firefox with Firebug and earlier versions of Chrome.  
It used to work in Chrome, but then they removed the ability: <http://src.chromium.org/viewvc/blink?view=revision&revision=151136>

   Source code: [utils/Device.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js) ([Line 1324](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Device.js#L1324))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Device.html>

Class: Phaser.LinkedList
========================

 Constructor
-----------

 ### 
new LinkedList()

  A basic Linked List data structure.

 This implementation *modifies* the `prev` and `next` properties of each item added:

 * The `prev` and `next` properties must be writable and should not be used for any other purpose.
* Items *cannot* be added to multiple LinkedLists at the same time.
* Only objects can be added.

   Source code: [utils/LinkedList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js) ([Line 18](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js#L18))   Public Properties
-----------------

  ### 
first : Object

  First element in the list.

   Source code: [utils/LinkedList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js#L39))   ### 
last : Object

  Last element in the list.

   Source code: [utils/LinkedList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js#L46))   ### 
next : Object

  Next element in the list.

   Source code: [utils/LinkedList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js#L25))   ### 
prev : Object

  Previous element in the list.

   Source code: [utils/LinkedList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js#L32))   ### 
total : integer

  Number of elements in the list.

   Source code: [utils/LinkedList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js#L53))    Public Methods
--------------

  ### 
add(item) → {object}

  Adds a new element to this linked list.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `item` | object | The element to add to this list. Can be a Phaser.Sprite or any other object you need to quickly iterate through. |

 ##### Returns

   object -   The item that was added.

    Source code: [utils/LinkedList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js#L59))   ### 
callAll(callback)

  Calls a function on all members of this list, using the member as the context for the callback.  
The function must exist on the member.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `callback` | function | The function to call. |

  Source code: [utils/LinkedList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js) ([Line 156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js#L156))   ### 
remove(item)

  Removes the given element from this linked list if it exists.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `item` | object | The item to be removed from the list. |

  Source code: [utils/LinkedList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js#L107))   ### 
reset()

  Resets the first, last, next and previous node pointers in this list.

   Source code: [utils/LinkedList.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/LinkedList.js#L92))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.LinkedList.html>

Class: PIXI.DisplayObjectContainer
==================================

 Constructor
-----------

 ### 
new DisplayObjectContainer()

  A DisplayObjectContainer represents a collection of display objects.  
It is the base class of all display objects that act as a container for other objects.

   Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L5))   Extends
-------

 * [DisplayObject](global#DisplayObject)

 Public Properties
-----------------

  ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
getBounds(targetCoordinateSpace) → {Rectangle}

  Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `targetCoordinateSpace` | PIXIDisplayObject | PIXIMatrix |  <optional> | Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. |

 ##### Returns

   Rectangle -   The rectangular bounding area

    Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 280](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L280))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.DisplayObjectContainer.html>

Class: Phaser.Utils
===================

 Constructor
-----------

 ### 
new Utils()

  Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 11](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L11))   Classes
-------

   [Debug](phaser.utils.debug)   Public Methods
--------------

  ### 
<static> extend(deep, target) → {object}

  This is a slightly modified version of http://api.jquery.com/jQuery.extend/

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `deep` | boolean | Perform a deep copy? |
| `target` | object | The target object to copy to. |

 ##### Returns

   object -   The extended object.

    Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 258](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L258))   ### 
<static> getProperty(obj, prop) → {\*}

  Gets an objects property by string.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `obj` | object | The object to traverse. |
| `prop` | string | The property whose value will be returned. |

 ##### Returns

   \* -   the value of the property or null if property isn't found .

    Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L27))   ### 
<static> isPlainObject(obj) → {boolean}

  This is a slightly modified version of jQuery.isPlainObject.  
A plain object is an object whose internal class property is [object Object].

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `obj` | object | The object to inspect. |

 ##### Returns

   boolean -   * true if the object is plain, otherwise false.

    Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 222](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L222))   ### 
<static> mixin(from, to) → {object}

  Mixes the source object into the destination object, returning the newly modified destination object.  
Based on original code by @mudcube

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `from` | object | The object to copy (the source object). |
| `to` | object | The object to copy to (the destination object). |

 ##### Returns

   object -   The modified destination object.

    Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 390](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L390))   ### 
<static> mixinPrototype(target, mixin, replace)

  Mixes in an existing mixin object with the target.

 Values in the mixin that have either `get` or `set` functions are created as properties via `defineProperty`  
*except* if they also define a `clone` method - if a clone method is defined that is called instead and  
the result is assigned directly.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `target` | object |  |  | The target object to receive the new functions. |
| `mixin` | object |  |  | The object to copy the functions from. |
| `replace` | boolean |  <optional> |  false  | If the target object already has a matching function should it be overwritten or not? |

  Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L338))   ### 
<static> pad(str, len, pad, dir) → {string}

  Takes the given string and pads it out, to the length required, using the character  
specified. For example if you need a string to be 6 characters long, you can call:

 `pad('bob', 6, '-', 2)`

 This would return: `bob---` as it has padded it out to 6 characters, using the `-` on the right.

 You can also use it to pad numbers (they are always returned as strings):

 `pad(512, 6, '0', 1)`

 Would return: `000512` with the string padded to the left.

 If you don't specify a direction it'll pad to both sides:

 `pad('c64', 7, '*')`

 Would return: `**c64**`

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `str` | string |  |  | The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. |
| `len` | integer |  <optional> |  0  | The number of characters to be added. |
| `pad` | string |  <optional> |  " "  | The string to pad it out with (defaults to a space). |
| `dir` | integer |  <optional> |  3  | The direction dir = 1 (left), 2 (right), 3 (both). |

 ##### Returns

   string -   The padded string.

    Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L161))   ### 
<static> parseDimension(size, dimension) → {number}

  Get a unit dimension from a string.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `size` | string | number | The size to parse. |
| `dimension` | number | The window dimension to check. |

 ##### Returns

   number -   The parsed dimension.

    Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 118](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L118))   ### 
<static> reverseString(string) → {string}

  Takes the given string and reverses it, returning the reversed string.  
For example if given the string `Atari 520ST` it would return `TS025 iratA`.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `string` | string | The string to be reversed. |

 ##### Returns

   string -   The reversed string.

    Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 13](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L13))   ### 
<static> setProperty(obj, prop) → {object}

  Sets an objects property by string.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `obj` | object | The object to traverse |
| `prop` | string | The property whose value will be changed |

 ##### Returns

   object -   The object on which the property was set.

    Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L60))   ### 
chanceRoll(chance) → {boolean}

  Generate a random bool result based on the chance value.

 Returns true or false based on the chance value (default 50%). For example if you wanted a player to have a 30% chance  
of getting a bonus, call chanceRoll(30) - true means the chance passed, false means it failed.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `chance` | number | The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%). |

 ##### Returns

   boolean -   True if the roll passed, or false otherwise.

    Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L91))   ### 
randomChoice(choice1, choice2) → {any}

  Choose between one of two values randomly.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `choice1` | any |  |
| `choice2` | any |  |

 ##### Returns

   any -   The randomly selected choice

    Source code: [utils/Utils.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Utils.js#L106))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Utils.html>

Class: Event
============

 Constructor
-----------

 ### 
new Event(target, name, data)

  Creates an homogenous object for tracking events so users can know what to expect.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `target` | Object | The target object that the event is called on |
| `name` | String | The string name of the event that was triggered |
| `data` | Object | Arbitrary event data to pass along |

  Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 202](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L202))   Extends
-------

 * Object

 Public Properties
-----------------

  ### 
[readonly] data : Object

  The data that was passed in with this event.

   Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 253](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L253))   ### 
[readonly] target : Object

  The original target the event triggered on.

   Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 235](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L235))   ### 
[readonly] timeStamp : number

  The timestamp when the event occurred.

   Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 265](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L265))   ### 
[readonly] type : string

  The string name of the event that this represents.

   Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 244](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L244))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Event.html>

Class: Phaser.Plugin.PathManager
================================

 Constructor
-----------

 ### 
new PathManager(game, parent)

  PathManager controls a list of Paths and a list of PathFollowers.  
It is the central control for the majority of the Pathing API.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the current Phaser.Game instance. |
| `parent` | [Phaser.PluginManager](phaser.pluginmanager) | The Phaser Plugin Manager which looks after this plugin. |

  Source code: [plugins/path/PathManagerPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/PathManagerPlugin.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/PathManagerPlugin.js#L17))   Public Methods
--------------

  ### 
createPathsFromJSON()

  create a new Path from JSON data

 JSON data format:  
required: "coordinateSystem":, "smoothness":, "loops":, "speed":, "pointList":[ {"x":, "y":}, ... ]  
optional: "branchFrom": { "path":, "point": }, "joinTo": { "path":, "point": }

   Source code: [plugins/path/PathManagerPlugin.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/PathManagerPlugin.js) ([Line 47](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/PathManagerPlugin.js#L47))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Plugin.PathManager.html>

Class: Phaser.Particles.Arcade.Emitter
======================================

 Constructor
-----------

 ### 
new Emitter(game, x, y, maxParticles)

  Emitter is a lightweight particle emitter that uses Arcade Physics.  
It can be used for one-time explosions or for continuous effects like rain and fire.  
All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | Current game instance. |
| `x` | number |  <optional> |  0  | The x coordinate within the Emitter that the particles are emitted from. |
| `y` | number |  <optional> |  0  | The y coordinate within the Emitter that the particles are emitted from. |
| `maxParticles` | number |  <optional> |  50  | The total number of particles in this emitter. |

  Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L20))   Extends
-------

 * [Phaser.Group](phaser.group)

 Public Properties
-----------------

  ### 
alive : boolean

  The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

   Inherited From * [Phaser.Group#alive](phaser.group#alive)
 Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L93))   ### 
alpha : number

  The alpha value of the group container.

   Inherited From * [Phaser.Group#alpha](phaser.group#alpha)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 3003](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L3003))   ### 
alphaData :array

  An array of the calculated alpha easing data applied to particles with alphaRates > 0.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 109](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L109))   ### 
angle : number

  The angle of rotation of the group container, in degrees.

 This adjusts the group itself by modifying its local rotation transform.

 This has no impact on the rotation/angle properties of the children, but it will update their worldTransform  
and on-screen orientation and position.

   Inherited From * [Phaser.Group#angle](phaser.group#angle)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2682))   ### 
angularDrag : number

  The angular drag component of particles launched from the emitter if they are rotating.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L132))   ### 
area : [Phaser.Rectangle](phaser.rectangle)

  The area of the emitter. Particles can be randomly generated from anywhere within this rectangle.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L51))   ### 
autoAlpha : boolean

  When a new Particle is emitted this controls if it will automatically change alpha. Use Emitter.setAlpha to configure.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L193))   ### 
autoScale : boolean

  When a new Particle is emitted this controls if it will automatically scale in size. Use Emitter.setScale to configure.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 188](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L188))   ### 
blendMode : number

  The blendMode as set on the particle when emitted from the Emitter. Defaults to NORMAL. Needs browser capable of supporting canvas blend-modes (most not available in WebGL)

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L167))   ### 
[readonly] bottom : number

  Gets the bottom position of the Emitter.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 990](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L990))   ### 
bounce : [Phaser.Point](phaser.point)

  How much each particle should bounce on each axis. 1 = full bounce, 0 = no bounce.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L149))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  If this object is [fixedToCamera](phaser.group#fixedToCamera) then this stores the x/y position offset relative to the top-left of the camera view.  
If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

   Inherited From * [Phaser.Group#cameraOffset](phaser.group#cameraOffset)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 272](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L272))   ### 
centerX : number

  The center x coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#centerX](phaser.group#centerX)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2705](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2705))   ### 
centerY : number

  The center y coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#centerY](phaser.group#centerY)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2733](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2733))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
classType : Object

  The type of objects that will be created when using [create](phaser.group#create) or [createMultiple](phaser.group#createMultiple).

 Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments:  
when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

   Inherited From * [Phaser.Group#classType](phaser.group#classType)
 Default Value * [Phaser.Sprite](phaser.sprite)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L130))   ### 
cursor : [DisplayObject](global#DisplayObject)

  The current display object that the group cursor is pointing to, if any. (Can be set manually.)

 The cursor is a way to iterate through the children in a Group using [next](phaser.group#next) and [previous](phaser.group#previous).

   Inherited From * [Phaser.Group#cursor](phaser.group#cursor)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L138))   ### 
[readonly] cursorIndex : integer

  The current index of the Group cursor. Advance it with Group.next.

   Inherited From * [Phaser.Group#cursorIndex](phaser.group#cursorIndex)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 255](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L255))   ### 
emitX : number

  The point the particles are emitted from.  
Emitter.x and Emitter.y control the containers location, which updates all current particles  
Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 175](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L175))   ### 
emitY : number

  The point the particles are emitted from.  
Emitter.x and Emitter.y control the containers location, which updates all current particles  
Emitter.emitX and Emitter.emitY control the emission location relative to the x/y position.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 183](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L183))   ### 
enableBody : boolean

  If true all Sprites created by, or added to this group, will have a physics body enabled on them.

 If there are children already in the Group at the time you set this property, they are not changed.

 The default body type is controlled with [physicsBodyType](phaser.group#physicsBodyType).

   Inherited From * [Phaser.Group#enableBody](phaser.group#enableBody)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L208))   ### 
enableBodyDebug : boolean

  If true when a physics body is created (via [enableBody](phaser.group#enableBody)) it will create a physics debug object as well.

 This only works for P2 bodies.

   Inherited From * [Phaser.Group#enableBodyDebug](phaser.group#enableBodyDebug)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L217))   ### 
exists : boolean

  If exists is true the group is updated, otherwise it is skipped.

   Inherited From * [Phaser.Group#exists](phaser.group#exists)
 Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L100))   ### 
fixedToCamera : boolean

  A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

 Note that the cameraOffset values are in addition to any parent in the display list.  
So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

   Inherited From * [Phaser.Group#fixedToCamera](phaser.group#fixedToCamera)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 265](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L265))   ### 
frequency : number

  How often a particle is emitted in ms (if emitter is started with Explode === false).

   Default Value * 100
 Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L138))   ### 
<internal> game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Group#game](phaser.group#game)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L38))   ### 
gravity : number

  Sets the `body.gravity.y` of each particle sprite to this value on launch.

   Default Value * 100
 Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L115))   ### 
hash :array

  The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

 Only children of this Group can be added to and removed from the hash.

 This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.  
However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own  
sorting and filtering of Group children without touching their z-index (and therefore display draw order)

   Inherited From * [Phaser.Group#hash](phaser.group#hash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 285](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L285))   ### 
height : number

  Gets or sets the height of the Emitter. This is the region in which a particle can be emitted.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 903](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L903))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
ignoreDestroy : boolean

  A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

   Inherited From * [Phaser.Group#ignoreDestroy](phaser.group#ignoreDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L107))   ### 
inputEnableChildren : boolean

  A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true`  
on any children *added* to, or *created by*, this Group.

 If there are children already in the Group at the time you set this property, they are not changed.

   Inherited From * [Phaser.Group#inputEnableChildren](phaser.group#inputEnableChildren)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L149))   ### 
[readonly] left : number

  Gets the left position of the Emitter.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 951](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L951))   ### 
[readonly] length : integer

  Total number of children in this group, regardless of exists/alive status.

   Inherited From * [Phaser.Group#length](phaser.group#length)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2665](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2665))   ### 
lifespan : number

  How long each particle lives once it is emitted in ms. Default is 2 seconds. Set lifespan to 'zero' for particles to live forever.

   Default Value * 2000
 Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L144))   ### 
maxParticleAlpha : number

  The maximum possible alpha value of a particle.

   Default Value * 1
 Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L104))   ### 
maxParticles : number

  The total number of particles in this emitter.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L26))   ### 
maxParticleScale : number

  The maximum possible scale of a particle. This is applied to the X and Y axis. If you need to control each axis see maxParticleScaleX.

   Default Value * 1
 Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L75))   ### 
maxParticleSpeed : [Phaser.Point](phaser.point)

  The maximum possible velocity of a particle.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L63))   ### 
maxRotation : number

  The maximum possible angular velocity of a particle.

   Default Value * 360
 Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L92))   ### 
minParticleAlpha : number

  The minimum possible alpha value of a particle.

   Default Value * 1
 Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L98))   ### 
minParticleScale : number

  The minimum possible scale of a particle. This is applied to the X and Y axis. If you need to control each axis see minParticleScaleX.

   Default Value * 1
 Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L69))   ### 
minParticleSpeed : [Phaser.Point](phaser.point)

  The minimum possible velocity of a particle.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L57))   ### 
minRotation : number

  The minimum possible angular velocity of a particle.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L86))   ### 
name : string

  A handy string name for this emitter. Can be set to anything.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L33))   ### 
on : boolean

  Determines whether the emitter is currently emitting particles. It is totally safe to directly toggle this.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L155))   ### 
onChildInputDown : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputDown](phaser.group#onChildInputDown)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L161))   ### 
onChildInputOut : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputOut](phaser.group#onChildInputOut)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L198))   ### 
onChildInputOver : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputOver](phaser.group#onChildInputOver)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L186))   ### 
onChildInputUp : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal,  
a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer  
is still over the Sprite or not.

   Inherited From * [Phaser.Group#onChildInputUp](phaser.group#onChildInputUp)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L174))   ### 
onDestroy : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the group is destroyed.

   Inherited From * [Phaser.Group#onDestroy](phaser.group#onDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L249))   ### 
particleAnchor : [Phaser.Point](phaser.point)

  When a particle is created its anchor will be set to match this Point object (defaults to x/y: 0.5 to aid in rotation)

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L161))   ### 
particleBringToTop : boolean

  If this is `true` then when the Particle is emitted it will be bought to the top of the Emitters display list.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L199))   ### 
particleClass :any

  For emitting your own particle class types. They must extend Phaser.Particle.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 121](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L121))   ### 
particleDrag : [Phaser.Point](phaser.point)

  The X and Y drag component of particles launched from the emitter.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 126](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L126))   ### 
particleSendToBack : boolean

  If this is `true` then when the Particle is emitted it will be sent to the back of the Emitters display list.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 205](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L205))   ### 
pendingDestroy : boolean

  A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method  
called on the next logic update.  
You can set it directly to flag the Group to be destroyed on its next update.

 This is extremely useful if you wish to destroy a Group from within one of its own callbacks  
or a callback of one of its children.

   Inherited From * [Phaser.Group#pendingDestroy](phaser.group#pendingDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L119))   ### 
physicsBodyType : integer

  If [enableBody](phaser.group#enableBody) is true this is the type of physics body that is created on new Sprites.

 The valid values are [Phaser.Physics.ARCADE](phaser.physics#.ARCADE), [Phaser.Physics.P2JS](phaser.physics#.P2JS), [Phaser.Physics.NINJA](phaser.physics#.NINJA), etc.

   Inherited From * [Phaser.Group#physicsBodyType](phaser.group#physicsBodyType)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L225))   ### 
physicsSortDirection : integer

  If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

 It should be set to one of the Phaser.Physics.Arcade sort direction constants: 

 Phaser.Physics.Arcade.SORT\_NONE  
Phaser.Physics.Arcade.LEFT\_RIGHT  
Phaser.Physics.Arcade.RIGHT\_LEFT  
Phaser.Physics.Arcade.TOP\_BOTTOM  
Phaser.Physics.Arcade.BOTTOM\_TOP

 If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

   Inherited From * [Phaser.Group#physicsSortDirection](phaser.group#physicsSortDirection)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 243](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L243))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L45))   ### 
[readonly] right : number

  Gets the right position of the Emitter.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 964](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L964))   ### 
rotation : number

  The angle of rotation of the group container, in radians.

 This will adjust the group container itself by modifying its rotation.  
This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#rotation](phaser.group#rotation)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2987](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2987))   ### 
scaleData :array

  An array of the calculated scale easing data applied to particles with scaleRates > 0.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L80))   ### 
[readonly] top : number

  Gets the top position of the Emitter.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 977](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L977))   ### 
[readonly] total : integer

  Total number of existing children in the group.

   Inherited From * [Phaser.Group#total](phaser.group#total)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2648](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2648))   ### 
<internal> type : number

  Internal Phaser Type value.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L39))   ### 
visible : boolean

  The visible state of the group. Non-visible Groups and all of their children are not rendered.

   Inherited From * [Phaser.Group#visible](phaser.group#visible)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2996](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2996))   ### 
width : number

  Gets or sets the width of the Emitter. This is the region in which a particle can be emitted.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 887](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L887))   ### 
x : number

  Gets or sets the x position of the Emitter.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 919](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L919))   ### 
y : number

  Gets or sets the y position of the Emitter.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 935](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L935))   ### 
[readonly] z : integer

  The z-depth value of this object within its parent container/Group - the World is a Group as well.  
This value must be unique for each child in a Group.

   Inherited From * [Phaser.Group#z](phaser.group#z)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L57))    Public Methods
--------------

  ### 
add(child, silent, index) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object as the top child in this group.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If the child was already in this Group, it is simply returned, and nothing else happens to it.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

 Use [addAt](phaser.group#addAt) to control where a child is added. Use [create](phaser.group#create) to create and add a new child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Inherited From * [Phaser.Group#add](phaser.group#add)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L341))   ### 
addAll(property, amount, checkAlive, checkVisible)

  Adds the amount to the given property on all children in this group.

 `Group.addAll('x', 10)` will add 10 to the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to increment, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#addAll](phaser.group#addAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1386))   ### 
addAt(child, index, silent) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object to this group.

 The child is added to the group at the location specified by the index value, this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `index` | integer |  <optional> |  0  | The index within the group to insert the child to. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Inherited From * [Phaser.Group#addAt](phaser.group#addAt)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 418](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L418))   ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
addMultiple(children, silent) → {Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group)}

  Adds an array of existing Display Objects to this Group.

 The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

 As well as an array you can also pass another Group as the first argument. In this case all of the children from that  
Group will be removed from it and added into this Group.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `children` | Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) |  |  | An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) -   The array of children or Group of children that were added to this Group.

    Inherited From * [Phaser.Group#addMultiple](phaser.group#addMultiple)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 489](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L489))   ### 
addToHash(child) → {boolean}

  Adds a child of this Group into the hash array.  
This call will return false if the child is not a child of this Group, or is already in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash. |

 ##### Returns

   boolean -   True if the child was successfully added to the hash, otherwise false.

    Inherited From * [Phaser.Group#addToHash](phaser.group#addToHash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 439](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L439))   ### 
align(width, height, cellWidth, cellHeight, position, offset) → {boolean}

  This method iterates through all children in the Group (regardless if they are visible or exist)  
and then changes their position so they are arranged in a Grid formation. Children must have  
the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have  
this.

 The grid dimensions are determined by the first four arguments. The `width` and `height` arguments  
relate to the width and height of the grid respectively.

 For example if the Group had 100 children in it:

 `Group.align(10, 10, 32, 32)`

 This will align all of the children into a grid formation of 10x10, using 32 pixels per  
grid cell. If you want a wider grid, you could do:

 `Group.align(25, 4, 32, 32)`

 This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

 You can choose to set *either* the `width` or `height` value to -1. Doing so tells the method  
to keep on aligning children until there are no children left. For example if this Group had  
48 children in it, the following:

 `Group.align(-1, 8, 32, 32)`

 ... will align the children so that there are 8 children vertically (the second argument),  
and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

 You can also do:

 `Group.align(10, -1, 32, 32)`

 In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit  
all of the children in.

 The `position` property allows you to control where in each grid cell the child is positioned.  
This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`,  
`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`,  
`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

 The final argument; `offset` lets you start the alignment from a specific child index.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | integer |  |  | The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value. |
| `height` | integer |  |  | The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value. |
| `cellWidth` | integer |  |  | The width of each grid cell, in pixels. |
| `cellHeight` | integer |  |  | The height of each grid cell, in pixels. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offset` | integer |  <optional> |  0  | Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value. |

 ##### Returns

   boolean -   True if the Group children were aligned, otherwise false.

    Inherited From * [Phaser.Group#align](phaser.group#align)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L682))   ### 
alignIn(container, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation and scale of its children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Inherited From * [Phaser.Group#alignIn](phaser.group#alignIn)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2873](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2873))   ### 
alignTo(parent, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation and scale of the children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Inherited From * [Phaser.Group#alignTo](phaser.group#alignTo)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2915](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2915))   ### 
<internal> ascendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Inherited From * [Phaser.Group#ascendingSortHandler](phaser.group#ascendingSortHandler)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1919](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1919))   ### 
at(object) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  Change the emitters center to match the center of any object with a `center` property, such as a Sprite.  
If the object doesn't have a center property it will be set to object.x + object.width / 2

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | object | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Text](phaser.text) | PIXI.DisplayObject | The object that you wish to match the center with. |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 862](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L862))   ### 
bringToTop(child) → {any}

  Brings the given child to the top of this group so it renders above all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to bring to the top of this group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#bringToTop](phaser.group#bringToTop)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 907](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L907))   ### 
callAll(method, context, args)

  Calls a function, specified by name, on all on children.

 The function is called for all children regardless if they are dead or alive (see callAllExists for different options).  
After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `method` | string |  |  | Name of the function on the child to call. Deep property lookup is supported. |
| `context` | string |  <optional> |  null  | A string containing the context under which the method will be executed. Set to null to default to the child. |
| `args` | any |  <repeatable> |  | Additional parameters that will be passed to the method. |

  Inherited From * [Phaser.Group#callAll](phaser.group#callAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1538](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1538))   ### 
callAllExists(callback, existsValue, parameter)

  Calls a function, specified by name, on all children in the group who exist (or do not exist).

 After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `callback` | string |  | Name of the function on the children to call. |
| `existsValue` | boolean |  | Only children with exists=existsValue will be called. |
| `parameter` | any |  <repeatable> | Additional parameters that will be passed to the callback. |

  Inherited From * [Phaser.Group#callAllExists](phaser.group#callAllExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1454](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1454))   ### 
<internal> callbackFromArray(child, callback, length)

  Returns a reference to a function that exists on a child of the group based on the given callback array.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | object | The object to inspect. |
| `callback` | array | The array of function names. |
| `length` | integer | The size of the array (pre-calculated in callAll). |

  Inherited From * [Phaser.Group#callbackFromArray](phaser.group#callbackFromArray)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1488](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1488))   ### 
checkAll(key, value, checkAlive, checkVisible, force)

  Quickly check that the same property across all children of this group is equal to the given value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be checked. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be checked. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be checked. This includes any Groups that are children. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

  Inherited From * [Phaser.Group#checkAll](phaser.group#checkAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1353](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1353))   ### 
checkProperty(child, key, value, force) → {boolean}

  Checks a property for the given value on the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to check the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be checked. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

 ##### Returns

   boolean -   True if the property was was equal to value, false if not.

    Inherited From * [Phaser.Group#checkProperty](phaser.group#checkProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1217))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
countDead() → {integer}

  Get the number of dead children in this group.

  ##### Returns

   integer -   The number of children flagged as dead.

    Inherited From * [Phaser.Group#countDead](phaser.group#countDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2338))   ### 
countLiving() → {integer}

  Get the number of living children in this group.

  ##### Returns

   integer -   The number of children flagged as alive.

    Inherited From * [Phaser.Group#countLiving](phaser.group#countLiving)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2326](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2326))   ### 
create(x, y, key, frame, exists, index) → {[DisplayObject](global#DisplayObject)}

  Creates a new Phaser.Sprite object and adds it to the top of this group.

 Use [classType](phaser.group#classType) to change the type of object created.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point. |
| `y` | number |  |  | The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `exists` | boolean |  <optional> |  true  | The default exists state of the Sprite. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was created: will be a [Phaser.Sprite](phaser.sprite) unless #classType has been changed.

    Inherited From * [Phaser.Group#create](phaser.group#create)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 544](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L544))   ### 
createMultiple(quantity, key, frame, exists) → {array}

  Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

 This method is useful if you need to quickly generate a pool of sprites, such as bullets.

 Use [classType](phaser.group#classType) to change the type of object created.

 You can provide an array as the `key` and / or `frame` arguments. When you do this  
it will create `quantity` Sprites for every key (and frame) in the arrays.

 For example:

 `createMultiple(25, ['ball', 'carrot'])`

 In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be  
created in total, 25 of each. You can also have the `frame` as an array:

 `createMultiple(5, 'bricks', [0, 1, 2, 3])`

 In the above there is one key (bricks), which is a sprite sheet. The frames array tells  
this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because  
the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with  
frame 1, and so on.

 If you set both the key and frame arguments to be arrays then understand it will create  
a total quantity of sprites equal to the size of both arrays times each other. I.e.:

 `createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

 The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.  
It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.  
In total it will have created 120 sprites.

 By default the Sprites will have their `exists` property set to `false`, and they will be  
positioned at 0x0, relative to the `Group.x / y` values.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | integer |  |  | The number of Sprites to create. |
| `key` | string | array |  |  | The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used. |
| `frame` | integer | string | array |  <optional> |  0  | If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used. |
| `exists` | boolean |  <optional> |  false  | The default exists state of the Sprite. |

 ##### Returns

   array -   An array containing all of the Sprites that were created.

    Inherited From * [Phaser.Group#createMultiple](phaser.group#createMultiple)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 581](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L581))   ### 
customSort(sortHandler, context)

  Sort the children in the group according to custom sort function.

 The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).  
It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sortHandler` | function |  | The custom sort function. |
| `context` | object |  <optional> | The context in which the sortHandler is called. |

  Inherited From * [Phaser.Group#customSort](phaser.group#customSort)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1895](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1895))   ### 
<internal> descendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Inherited From * [Phaser.Group#descendingSortHandler](phaser.group#descendingSortHandler)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1951](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1951))   ### 
destroy()

  Destroys this Emitter, all associated child Particles and then removes itself from the Particle Manager.

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 681](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L681))   ### 
divideAll(property, amount, checkAlive, checkVisible)

  Divides the given property by the amount on all children in this group.

 `Group.divideAll('x', 2)` will half the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to divide, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#divideAll](phaser.group#divideAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1437))   ### 
emitParticle(x, y, key, frame) → {boolean}

  This function is used internally to emit the next particle in the queue.

 However it can also be called externally to emit a particle.

 When called externally you can use the arguments to override any defaults the Emitter has set.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `x` | number |  <optional> | The x coordinate to emit the particle from. If `null` or `undefined` it will use `Emitter.emitX` or if the Emitter has a width > 1 a random value between `Emitter.left` and `Emitter.right`. |
| `y` | number |  <optional> | The y coordinate to emit the particle from. If `null` or `undefined` it will use `Emitter.emitY` or if the Emitter has a height > 1 a random value between `Emitter.top` and `Emitter.bottom`. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> | This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> | If this Particle 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. |

 ##### Returns

   boolean -   True if a particle was emitted, otherwise false.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 553](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L553))   ### 
explode(lifespan, quantity) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  Call this function to emit the given quantity of particles at all once (an explosion)

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `lifespan` | number |  <optional> |  0  | How long each particle lives once emitted in ms. 0 = forever. |
| `quantity` | number |  <optional> |  0  | How many particles to launch. |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 438](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L438))   ### 
filter(predicate, checkExists) → {[Phaser.ArraySet](phaser.arrayset)}

  Find children matching a certain predicate.

 For example:

 
```
var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');
```

Note: Currently this will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `predicate` | function |  |  | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third |
| `checkExists` | boolean |  <optional> |  false  | If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate. |

 ##### Returns

   [Phaser.ArraySet](phaser.arrayset) -   Returns an array list containing all the children that the predicate returned true for

    Inherited From * [Phaser.Group#filter](phaser.group#filter)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1677](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1677))   ### 
flow(lifespan, frequency, quantity, total, immediate) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  Call this function to start emitting a flow of particles at the given frequency.  
It will carry on going until the total given is reached.  
Each time the flow is run the quantity number of particles will be emitted together.  
If you set the total to be 20 and quantity to be 5 then flow will emit 4 times in total (4 x 5 = 20 total)  
If you set the total to be -1 then no quantity cap is used and it will keep emitting.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `lifespan` | number |  <optional> |  0  | How long each particle lives once emitted in ms. 0 = forever. |
| `frequency` | number |  <optional> |  250  | Frequency is how often to emit the particles, given in ms. |
| `quantity` | number |  <optional> |  1  | How many particles to launch each time the frequency is met. Can never be > Emitter.maxParticles. |
| `total` | number |  <optional> |  -1  | How many particles to launch in total. If -1 it will carry on indefinitely. |
| `immediate` | boolean |  <optional> |  true  | Should the flow start immediately (true) or wait until the first frequency event? (false) |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 456](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L456))   ### 
forEach(callback, callbackContext, checkExists, args)

  Call a function on each child in this group.

 Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

 
```
Group.forEach(awardBonusGold, this, true, 100, 500)
```

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

 Note: This check will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `checkExists` | boolean |  <optional> |  false  | If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed. |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEach](phaser.group#forEach)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1717))   ### 
forEachAlive(callback, callbackContext, args)

  Call a function on each alive child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachAlive](phaser.group#forEachAlive)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1799](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1799))   ### 
forEachDead(callback, callbackContext, args)

  Call a function on each dead child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachDead](phaser.group#forEachDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1827](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1827))   ### 
forEachExists(callback, callbackContext, args)

  Call a function on each existing child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachExists](phaser.group#forEachExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1771](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1771))   ### 
getAll(property, value, startIndex, endIndex) → {any}

  Returns all children in this Group.

 You can optionally specify a matching criteria using the `property` and `value` arguments.

 For example: `getAll('exists', true)` would return only children that have their exists property set.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `property` | string |  <optional> |  | An optional property to test against the value argument. |
| `value` | any |  <optional> |  | If property is set then Child.property must strictly equal this value to be included in the results. |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up until. |

 ##### Returns

   any -   A random existing child of this Group.

    Inherited From * [Phaser.Group#getAll](phaser.group#getAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2392](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2392))   ### 
getAt(index) → {[DisplayObject](global#DisplayObject) | integer}

  Returns the child found at the given index within this group.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index to return the child from. |

 ##### Returns

   [DisplayObject](global#DisplayObject) | integer -   The child that was found at the given index, or -1 for an invalid index.

    Inherited From * [Phaser.Group#getAt](phaser.group#getAt)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 524](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L524))   ### 
getBottom() → {any}

  Returns the child at the bottom of this group.

 The bottom child the child being displayed (rendered) below every other child.

  ##### Returns

   any -   The child at the bottom of the Group.

    Inherited From * [Phaser.Group#getBottom](phaser.group#getBottom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2221))   ### 
getBounds(targetCoordinateSpace) → {Rectangle}

  Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `targetCoordinateSpace` | PIXIDisplayObject | PIXIMatrix |  <optional> | Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. |

 ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getBounds](pixi.displayobjectcontainer#getBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 280](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L280))   ### 
getByName(name) → {any}

  Searches the Group for the first instance of a child with the `name`  
property matching the given argument. Should more than one child have  
the same name only the first instance is returned.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name to search for. |

 ##### Returns

   any -   The first child with a matching name, or null if none were found.

    Inherited From * [Phaser.Group#getByName](phaser.group#getByName)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1042](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1042))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getClosestTo(object, callback, callbackContext) → {any}

  Get the closest child to given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child closest to given object, or `null` if no child was found.

    Inherited From * [Phaser.Group#getClosestTo](phaser.group#getClosestTo)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2238](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2238))   ### 
getFirstAlive(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is alive (`child.alive === true`).

 This is handy for choosing a squad leader, etc.

 You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The alive dead child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstAlive](phaser.group#getFirstAlive)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2105))   ### 
getFirstDead(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is dead (`child.alive === false`).

 This is handy for checking if everything has been wiped out and adding to the pool as needed.

 You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no dead children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first dead child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstDead](phaser.group#getFirstDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2135))   ### 
getFirstExists(exists, createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first display object that exists, or doesn't exist.

 You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `exists` | boolean |  <optional> |  true  | If true, find the first existing child; otherwise find the first non-existing child. |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstExists](phaser.group#getFirstExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2071](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2071))   ### 
getFurthestFrom(object, callback, callbackContext) → {any}

  Get the child furthest away from the given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child furthest from the given object, or `null` if no child was found.

    Inherited From * [Phaser.Group#getFurthestFrom](phaser.group#getFurthestFrom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2282](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2282))   ### 
getIndex(child) → {integer}

  Get the index position of the given child in this group, which should match the child's `z` property.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to get the index for. |

 ##### Returns

   integer -   The index of the child or -1 if it's not a member of this group.

    Inherited From * [Phaser.Group#getIndex](phaser.group#getIndex)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1029](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1029))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
getRandom(startIndex, length) → {any}

  Returns a random child from the group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | Offset from the front of the group (lowest child). |
| `length` | integer |  <optional> |  (to top)  | Restriction on the number of values you want to randomly select from. |

 ##### Returns

   any -   A random child of this Group.

    Inherited From * [Phaser.Group#getRandom](phaser.group#getRandom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2350](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2350))   ### 
getRandomExists(startIndex, endIndex) → {any}

  Returns a random child from the Group that has `exists` set to `true`.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up to. |

 ##### Returns

   any -   A random child of this Group that exists.

    Inherited From * [Phaser.Group#getRandomExists](phaser.group#getRandomExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2372](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2372))   ### 
getTop() → {any}

  Return the child at the top of this group.

 The top child is the child displayed (rendered) above every other child.

  ##### Returns

   any -   The child at the top of the Group.

    Inherited From * [Phaser.Group#getTop](phaser.group#getTop)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2204))   ### 
hasProperty(child, key) → {boolean}

  Checks if the child has the given property.

 Will scan up to 4 levels deep only.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to check for the existence of the property on. |
| `key` | Array.<string> | An array of strings that make up the property. |

 ##### Returns

   boolean -   True if the child has the property, otherwise false.

    Inherited From * [Phaser.Group#hasProperty](phaser.group#hasProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1104))   ### 
iterate(key, value, returnType, callback, callbackContext, args) → {any}

  Iterates over the children of the group performing one of several actions for matched children.

 A child is considered a match when it has a property, named `key`, whose value is equal to `value`  
according to a strict equality comparison.

 The result depends on the `returnType`:

 * [RETURN\_TOTAL](phaser.group#.RETURN_TOTAL):  
 The callback, if any, is applied to all matching children. The number of matched children is returned.
* [RETURN\_NONE](phaser.group#.RETURN_NONE):  
 The callback, if any, is applied to all matching children. No value is returned.
* [RETURN\_CHILD](phaser.group#.RETURN_CHILD):  
 The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.  
 If there is no matching child then null is returned.

 If `args` is specified it must be an array. The matched child will be assigned to the first  
element and the entire array will be applied to the callback function.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The child property to check, i.e. 'exists', 'alive', 'health' |
| `value` | any |  |  | A child matches if `child[key] === value` is true. |
| `returnType` | integer |  |  | How to iterate the children and what to return. |
| `callback` | function |  <optional> |  null  | Optional function that will be called on each matching child. The matched child is supplied as the first argument. |
| `callbackContext` | object |  <optional> |  | The context in which the function should be called (usually 'this'). |
| `args` | Array.<any> |  <optional> |  (none)  | The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child. |

 ##### Returns

   any -   Returns either an integer (for RETURN\_TOTAL), the first matched child (for RETURN\_CHILD), or null.

    Inherited From * [Phaser.Group#iterate](phaser.group#iterate)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1976](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1976))   ### 
kill() → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  Call this function to turn off all the particles and the emitter.

  ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 407](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L407))   ### 
makeParticles(keys, frames, quantity, collide, collideWorldBounds) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  This function generates a new set of particles for use by this emitter.  
The particles are stored internally waiting to be emitted via Emitter.start.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `keys` | array | string |  |  | A string or an array of strings that the particle sprites will use as their texture. If an array one is picked at random. |
| `frames` | array | number |  <optional> |  0  | A frame number, or array of frames that the sprite will use. If an array one is picked at random. |
| `quantity` | number |  <optional> |  | The number of particles to generate. If not given it will use the value of Emitter.maxParticles. If the value is greater than Emitter.maxParticles it will use Emitter.maxParticles as the quantity. |
| `collide` | boolean |  <optional> |  false  | If you want the particles to be able to collide with other Arcade Physics bodies then set this to true. |
| `collideWorldBounds` | boolean |  <optional> |  false  | A particle can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 335](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L335))   ### 
moveAll(group, silent) → {[Phaser.Group](phaser.group)}

  Moves all children from this Group to the Group given.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `group` | [Phaser.Group](phaser.group) |  |  | The new Group to which the children will be moved to. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event for the new Group. |

 ##### Returns

   [Phaser.Group](phaser.group) -   The Group to which all the children were moved.

    Inherited From * [Phaser.Group#moveAll](phaser.group#moveAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2479](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2479))   ### 
moveDown(child) → {any}

  Moves the given child down one place in this group unless it's already at the bottom.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move down in the group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#moveDown](phaser.group#moveDown)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L969))   ### 
moveUp(child) → {any}

  Moves the given child up one place in this group unless it's already at the top.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move up in the group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#moveUp](phaser.group#moveUp)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 945](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L945))   ### 
multiplyAll(property, amount, checkAlive, checkVisible)

  Multiplies the given property by the amount on all children in this group.

 `Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to multiply, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#multiplyAll](phaser.group#multiplyAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1420](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1420))   ### 
next() → {any}

  Advances the group cursor to the next (higher) object in the group.

 If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

  ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#next](phaser.group#next)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 833](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L833))   ### 
<internal> postUpdate()

  The core postUpdate - as called by World.

   Inherited From * [Phaser.Group#postUpdate](phaser.group#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1656](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1656))   ### 
<internal> preUpdate()

  The core preUpdate - as called by World.

   Inherited From * [Phaser.Group#preUpdate](phaser.group#preUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1611))   ### 
previous() → {any}

  Moves the group cursor to the previous (lower) child in the group.

 If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

  ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#previous](phaser.group#previous)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 862](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L862))   ### 
remove(child, destroy, silent) → {boolean}

  Removes the given child from this group.

 This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

 If the group cursor was referring to the removed child it is updated to refer to the next child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to remove. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on the removed child. |
| `silent` | boolean |  <optional> |  false  | If true the the child will not dispatch the `onRemovedFromGroup` event. |

 ##### Returns

   boolean -   true if the child was removed from this group, otherwise false.

    Inherited From * [Phaser.Group#remove](phaser.group#remove)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2431](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2431))   ### 
removeAll(destroy, silent, destroyTexture)

  Removes all children from this Group, but does not remove the group from its parent.

 The children can be optionally destroyed as they are removed.

 You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |
| `destroyTexture` | boolean |  <optional> |  false  | If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Group#removeAll](phaser.group#removeAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2508](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2508))   ### 
removeBetween(startIndex, endIndex, destroy, silent)

  Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  |  | The index to start removing children from. |
| `endIndex` | integer |  <optional> |  | The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |

  Inherited From * [Phaser.Group#removeBetween](phaser.group#removeBetween)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2556](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2556))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
removeFromHash(child) → {boolean}

  Removes a child of this Group from the hash array.  
This call will return false if the child is not in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to remove from this Groups hash. Must be a member of this Group and in the hash. |

 ##### Returns

   boolean -   True if the child was successfully removed from the hash, otherwise false.

    Inherited From * [Phaser.Group#removeFromHash](phaser.group#removeFromHash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 464](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L464))   ### 
replace(oldChild, newChild) → {any}

  Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `oldChild` | any | The child in this group that will be replaced. |
| `newChild` | any | The child to be inserted into this group. |

 ##### Returns

   any -   Returns the oldChild that was replaced within this group.

    Inherited From * [Phaser.Group#replace](phaser.group#replace)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1065](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1065))   ### 
resetChild(child, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

 If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

 The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  | The child to reset and/or load the texture on. |
| `x` | number |  <optional> | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was reset: usually a [Phaser.Sprite](phaser.sprite).

    Inherited From * [Phaser.Group#resetChild](phaser.group#resetChild)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2165))   ### 
resetCursor(index) → {any}

  Sets the group cursor to the first child in the group.

 If the optional index parameter is given it sets the cursor to the object at that index instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `index` | integer |  <optional> |  0  | Set the cursor to point to a specific index. |

 ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#resetCursor](phaser.group#resetCursor)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 806](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L806))   ### 
reverse()

  Reverses all children in this group.

 This operation applies only to immediate children and does not propagate to subgroups.

   Inherited From * [Phaser.Group#reverse](phaser.group#reverse)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1015](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1015))   ### 
revive() → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  Handy for bringing game objects "back to life". Just sets alive and exists back to true.

  ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 423](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L423))   ### 
sendToBack(child) → {any}

  Sends the given child to the bottom of this group so it renders below all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to send to the bottom of this group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#sendToBack](phaser.group#sendToBack)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 926](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L926))   ### 
set(child, key, value, checkAlive, checkVisible, operation, force) → {boolean}

  Quickly set a property on a single child of this group to a new value.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [Phaser.Sprite](phaser.sprite) |  |  | The child to set the property on. |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then the child will only be updated if alive=true. |
| `checkVisible` | boolean |  <optional> |  false  | If set then the child will only be updated if visible=true. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Inherited From * [Phaser.Group#set](phaser.group#set)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1246))   ### 
setAll(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group to a new value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.  
If you need that ability please see `Group.setAllChildren`.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Inherited From * [Phaser.Group#setAll](phaser.group#setAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1277](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1277))   ### 
setAllChildren(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group, and any child Groups, to a new value.

 If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.  
Unlike with `setAll` the property is NOT set on child Groups itself.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Inherited From * [Phaser.Group#setAllChildren](phaser.group#setAllChildren)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1312](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1312))   ### 
setAlpha(min, max, rate, ease, yoyo) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  A more compact way of setting the alpha constraints of the particles.  
The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max.  
If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `min` | number |  <optional> |  1  | The minimum value for this range. |
| `max` | number |  <optional> |  1  | The maximum value for this range. |
| `rate` | number |  <optional> |  0  | The rate (in ms) at which the particles will change in alpha from min to max, or set to zero to pick a random alpha between the two. |
| `ease` | function |  <optional> |  Phaser.Easing.Linear.None  | If you've set a rate > 0 this is the easing formula applied between the min and max values. |
| `yoyo` | boolean |  <optional> |  false  | If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values) |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 769](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L769))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setProperty(child, key, value, operation, force) → {boolean}

  Sets a property to the given value on the child. The operation parameter controls how the value is set.

 The operations are:

 * 0: set the existing value to the given value; if force is `true` a new property will be created if needed
* 1: will add the given value to the value already present.
* 2: will subtract the given value from the value already present.
* 3: will multiply the value already present by the given value.
* 4: will divide the value already present by the given value.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to set the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be set. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Inherited From * [Phaser.Group#setProperty](phaser.group#setProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1139))   ### 
setRotation(min, max) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  A more compact way of setting the angular velocity constraints of the particles.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `min` | number |  <optional> |  0  | The minimum value for this range. |
| `max` | number |  <optional> |  0  | The maximum value for this range. |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 749](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L749))   ### 
setScale(minX, maxX, minY, maxY, rate, ease, yoyo) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  A more compact way of setting the scale constraints of the particles.  
The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis.  
If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `minX` | number |  <optional> |  1  | The minimum value of Particle.scale.x. |
| `maxX` | number |  <optional> |  1  | The maximum value of Particle.scale.x. |
| `minY` | number |  <optional> |  1  | The minimum value of Particle.scale.y. |
| `maxY` | number |  <optional> |  1  | The maximum value of Particle.scale.y. |
| `rate` | number |  <optional> |  0  | The rate (in ms) at which the particles will change in scale from min to max, or set to zero to pick a random size between the two. |
| `ease` | function |  <optional> |  Phaser.Easing.Linear.None  | If you've set a rate > 0 this is the easing formula applied between the min and max values. |
| `yoyo` | boolean |  <optional> |  false  | If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values) |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 811](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L811))   ### 
setSize(width, height) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  A more compact way of setting the width and height of the emitter.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | The desired width of the emitter (particles are spawned randomly within these dimensions). |
| `height` | number | The desired height of the emitter. |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 694](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L694))   ### 
setXSpeed(min, max) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  A more compact way of setting the X velocity range of the emitter.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `min` | number |  <optional> |  0  | The minimum value for this range. |
| `max` | number |  <optional> |  0  | The maximum value for this range. |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 711](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L711))   ### 
setYSpeed(min, max) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  A more compact way of setting the Y velocity range of the emitter.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `min` | number |  <optional> |  0  | The minimum value for this range. |
| `max` | number |  <optional> |  0  | The maximum value for this range. |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 730](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L730))   ### 
sort(key, order)

  Sort the children in the group according to a particular key and ordering.

 Call this function to sort the group according to a particular key value and order.

 For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

 Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including  
alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  <optional> |  'z'  | The name of the property to sort on. Defaults to the objects z-depth value. |
| `order` | integer |  <optional> |  Phaser.Group.SORT\_ASCENDING  | Order ascending ([SORT\_ASCENDING](phaser.group#.SORT_ASCENDING)) or descending ([SORT\_DESCENDING](phaser.group#.SORT_DESCENDING)). |

  Inherited From * [Phaser.Group#sort](phaser.group#sort)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1855](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1855))   ### 
start(explode, lifespan, frequency, quantity, forceQuantity) → {[Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter)}

  Call this function to start emitting particles.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `explode` | boolean |  <optional> |  true  | Whether the particles should all burst out at once (true) or at the frequency given (false). |
| `lifespan` | number |  <optional> |  0  | How long each particle lives once emitted in ms. 0 = forever. |
| `frequency` | number |  <optional> |  250  | Ignored if Explode is set to true. Frequency is how often to emit 1 particle. Value given in ms. |
| `quantity` | number |  <optional> |  0  | How many particles to launch. 0 = "all of the particles" which will keep emitting until Emitter.maxParticles is reached. |
| `forceQuantity` | number |  <optional> |  false  | If `true` and creating a particle flow, the quantity emitted will be forced to the be quantity given in this call. This can never exceed Emitter.maxParticles. |

 ##### Returns

   [Phaser.Particles.Arcade.Emitter](phaser.particles.arcade.emitter) -   This Emitter instance.

    Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 503](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L503))   ### 
subAll(property, amount, checkAlive, checkVisible)

  Subtracts the amount from the given property on all children in this group.

 `Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to decrement, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#subAll](phaser.group#subAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1403](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1403))   ### 
swap(child1, child2)

  Swaps the position of two children in this group.

 Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child1` | any | The first child to swap. |
| `child2` | any | The second child to swap. |

  Inherited From * [Phaser.Group#swap](phaser.group#swap)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 891](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L891))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Called automatically by the game loop, decides when to launch particles and when to "die".

   Source code: [particles/arcade/Emitter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js) ([Line 266](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/Emitter.js#L266))   ### 
<internal> updateZ()

  Internal method that re-applies all of the children's Z values.

 This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

   Inherited From * [Phaser.Group#updateZ](phaser.group#updateZ)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 663](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L663))   ### 
xy(index, x, y)

  Positions the child found at the given index within this group to the given x and y coordinates.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index of the child in the group to set the position of. |
| `x` | number | The new x position of the child. |
| `y` | number | The new y position of the child. |

  Inherited From * [Phaser.Group#xy](phaser.group#xy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 993](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L993))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Particles.Arcade.Emitter.html>

Class: Phaser.Component.Angle
=============================

 Constructor
-----------

 ### 
new Angle()

  The Angle Component provides access to an `angle` property; the rotation of a Game Object in degrees.

   Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L12))   Public Properties
-----------------

  ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Angle.html>

Class: Phaser.Component.Animation
=================================

 Constructor
-----------

 ### 
new Animation()

  The Animation Component provides a `play` method, which is a proxy to the `AnimationManager.play` method.

   Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L12))   Public Methods
--------------

  ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays an Animation.

 The animation should have previously been created via `animations.add`.

 If the animation is already playing calling this again won't do anything.  
If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'. |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation.

    Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L31))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Animation.html>

Class: Phaser.Component.AutoCull
================================

 Constructor
-----------

 ### 
new AutoCull()

  The AutoCull Component is responsible for providing methods that check if a Game Object is within the bounds of the World Camera.  
It is used by the InWorld component.

   Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 13](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L13))   Public Properties
-----------------

  ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.AutoCull.html>

Class: PIXI.Texture
===================

 Constructor
-----------

 ### 
new Texture(baseTexture, frame, crop, trim)

  A texture stores the information that represents an image or part of an image. It cannot be added  
to the display list directly. Instead use it as the texture for a PIXI.Sprite. If no frame is provided then the whole image is used.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `baseTexture` | [PIXI.BaseTexture](pixi.basetexture) |  | The base texture source to create the texture from |
| `frame` | Rectangle |  | The rectangle frame of the texture to show |
| `crop` | Rectangle |  <optional> | The area of original texture |
| `trim` | Rectangle |  <optional> | Trimmed texture rectangle |

  Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L14))   Public Properties
-----------------

  ### 
baseTexture : [PIXI.BaseTexture](pixi.basetexture)

  The base texture that this texture uses.

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 47](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L47))   ### 
crop :Rectangle

  This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,  
irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 128](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L128))   ### 
frame :Rectangle

  The frame specifies the region of the base texture that this texture uses

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L55))   ### 
height : number

  The height of the Texture in pixels.

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 120](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L120))   ### 
isTiling : boolean

  Is this a tiling texture? As used by the likes of a TilingSprite.

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L79))   ### 
noFrame : boolean

  Does this Texture have any frame data assigned to it?

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L28))   ### 
requiresReTint : boolean

  This will let a renderer know that a tinted parent has updated its texture.

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L95))   ### 
requiresUpdate : boolean

  This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L87))   ### 
trim :Rectangle

  The texture trim data.

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L63))   ### 
valid : boolean

  This will let the renderer know if the texture is valid. If it's not then it cannot be rendered.

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 71](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L71))   ### 
width : number

  The width of the Texture in pixels.

   Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L112))    Public Methods
--------------

  ### 
<static> fromCanvas(canvas, scaleMode) → {[PIXI.Texture](pixi.texture)}

  Helper function that creates a new a Texture based on the given canvas element.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `canvas` | Canvas | The canvas element source of the texture |
| `scaleMode` | Number | See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values |

 ##### Returns

   [PIXI.Texture](pixi.texture) -    Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L249))   ### 
destroy(destroyBase)

  Destroys this texture

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `destroyBase` | Boolean | Whether to destroy the base texture as well |

  Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L165))   ### 
setFrame(frame)

  Specifies the region of the baseTexture that this texture will use.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | Rectangle | The frame of the texture to set it to |

  Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 178](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L178))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.Texture.html>

Class: PIXI.BaseTexture
=======================

 Constructor
-----------

 ### 
new BaseTexture(source, scaleMode)

  A texture stores the information that represents an image. All textures have a base texture.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `source` | String | Canvas | the source object (image or canvas) |
| `scaleMode` | Number | See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values |

  Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L5))   Public Properties
-----------------

  ### 
[readonly] hasLoaded : boolean

  [read-only] Set to true once the base texture has loaded

   Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L51))   ### 
[readonly] height : number

  [read-only] The height of the base texture set when the image has loaded

   Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L33))   ### 
mipmap : boolean

  Set this to true if a mipmap of this texture needs to be generated. This value needs to be set before the texture is used  
Also the texture must be a power of two size to work

   Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L86))   ### 
premultipliedAlpha : boolean

  Controls if RGB channels should be pre-multiplied by Alpha (WebGL only)

   Default Value * true
 Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L68))   ### 
resolution : number

  The Resolution of the texture.

   Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 16](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L16))   ### 
scaleMode : number

  The scale mode to apply when scaling this texture

   Default Value * PIXI.scaleModes.LINEAR
 Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L42))   ### 
skipRender : boolean

  A BaseTexture can be set to skip the rendering phase in the WebGL Sprite Batch.

 You may want to do this if you have a parent Sprite with no visible texture (i.e. uses the internal `__default` texture)  
that has children that you do want to render, without causing a batch flush in the process.

   Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L115))   ### 
source :Image

  The image source that is used to create the texture.

   Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L60))   ### 
[readonly] width : number

  [read-only] The width of the base texture set when the image has loaded

   Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L24))    Public Methods
--------------

  ### 
<static> fromCanvas(canvas, scaleMode) → {[PIXI.BaseTexture](pixi.basetexture)}

  Helper function that creates a base texture from the given canvas element.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `canvas` | Canvas | The canvas element source of the texture |
| `scaleMode` | Number | See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values |

 ##### Returns

   [PIXI.BaseTexture](pixi.basetexture) -    Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 224](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L224))   ### 
destroy()

  Destroys this base texture

   Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 154](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L154))   ### 
dirty()

  Sets all glTextures to be dirty.

   Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 183](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L183))   ### 
forceLoaded(width, height)

  Forces this BaseTexture to be set as loaded, with the given width and height.  
Then calls BaseTexture.dirty.  
Important for when you don't want to modify the source object by forcing in `complete` or dimension properties it may not have.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | Number | * The new width to force the BaseTexture to be.
 |
| `height` | Number | * The new height to force the BaseTexture to be.
 |

  Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 137](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L137))   ### 
unloadFromGPU()

  Removes the base texture from the GPU, useful for managing resources on the GPU.  
Atexture is still 100% usable and will simply be reuploaded if there is a sprite on screen that is using it.

   Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 196](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L196))   ### 
updateSourceImage(newSrc)

  This method is *deprecated* and should not be used. It may be removed in the future.   Changes the source image of the texture

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `newSrc` | String | the path of the image |

  Deprecated: * true
 Source code: [pixi/textures/BaseTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/BaseTexture.js#L171))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.BaseTexture.html>

Class: Phaser.Video
===================

 Constructor
-----------

 ### 
new Video(game, key, url)

  A Video object that takes a previously loaded Video from the Phaser Cache and handles playback of it.

 Alternatively it takes a getUserMedia feed from an active webcam and streams the contents of that to  
the Video instead (see `startMediaStream` method)

 The video can then be applied to a Sprite as a texture. If multiple Sprites share the same Video texture and playback  
changes (i.e. you pause the video, or seek to a new time) then this change will be seen across all Sprites simultaneously.

 Due to a bug in IE11 you cannot play a video texture to a Sprite in WebGL. For IE11 force Canvas mode.

 If you need each Sprite to be able to play a video fully independently then you will need one Video object per Sprite.  
Please understand the obvious performance implications of doing this, and the memory required to hold videos in RAM.

 On some mobile browsers such as iOS Safari, you cannot play a video until the user has explicitly touched the screen.  
This works in the same way as audio unlocking. Phaser will handle the touch unlocking for you, however unlike with audio  
it's worth noting that every single Video needs to be touch unlocked, not just the first one. You can use the `changeSource`  
method to try and work around this limitation, but see the method help for details.

 Small screen devices, especially iPod and iPhone will launch the video in its own native video player,  
outside of the Safari browser. There is no way to avoid this, it's a device imposed limitation.

 Note: On iOS if you need to detect when the user presses the 'Done' button (before the video ends)  
then you need to add your own event listener

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `key` | string | null |  <optional> |  null  | The key of the video file in the Phaser.Cache that this Video object will play. Set to `null` or leave undefined if you wish to use a webcam as the source. See `startMediaStream` to start webcam capture. |
| `url` | string | null |  <optional> |  null  | 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) |

  Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L38))   Public Properties
-----------------

  ### 
currentTime : number

  The current time of the video in seconds. If set the video will attempt to seek to that point in time.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1167))   ### 
disableTextureUpload : boolean

  If true this video will never send its image data to the GPU when its dirty flag is true. This only applies in WebGL.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L75))   ### 
[readonly] duration : number

  The duration of the video in seconds.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1187](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1187))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L46))   ### 
height : number

  The height of the video in pixels.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L64))   ### 
isStreaming : boolean

  Is there a streaming video source? I.e. from a webcam.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 140](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L140))   ### 
key : string

  The key of the Video in the Cache, if stored there. Will be `null` if this Video is using the webcam instead.

   Default Value * null
 Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L52))   ### 
loop : boolean

  Gets or sets if the Video is set to loop.  
Please note that at present some browsers (i.e. Chrome) do not support *seamless* video looping.  
If the video isn't yet set this will always return false.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1360](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1360))   ### 
mute : boolean

  Gets or sets the muted state of the Video.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1217))   ### 
onAccess : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the user allows access to their webcam.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 101](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L101))   ### 
onChangeSource : [Phaser.Signal](phaser.signal)

  This signal is dispatched if the Video source is changed. It sends 3 parameters: a reference to the Video object and the new width and height of the new video source.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L91))   ### 
onComplete : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the Video completes playback, i.e. enters an 'ended' state. On iOS specifically it also fires if the user hits the 'Done' button at any point during playback. Videos set to loop will never dispatch this signal.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 96](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L96))   ### 
onError : [Phaser.Signal](phaser.signal)

  This signal is dispatched if an error occurs either getting permission to use the webcam (for a Video Stream) or when trying to play back a video file.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L106))   ### 
onPlay : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the Video starts to play. It sends 3 parameters: a reference to the Video object, if the video is set to loop or not and the playback rate.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L86))   ### 
onTimeout : [Phaser.Signal](phaser.signal)

  This signal is dispatched if when asking for permission to use the webcam no response is given within a the Video.timeout limit.  
This may be because the user has picked `Not now` in the permissions window, or there is a delay in establishing the LocalMediaStream.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L113))   ### 
paused : boolean

  Gets or sets the paused state of the Video.  
If the video is still touch locked (such as on iOS devices) this call has no effect.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1257](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1257))   ### 
playbackRate : number

  Gets or sets the playback rate of the Video. This is the speed at which the video is playing.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1337](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1337))   ### 
[readonly] playing : boolean

  True if the video is currently playing (and not paused or ended), otherwise false.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1391](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1391))   ### 
[readonly] progress : number

  The progress of this video. This is a value between 0 and 1, where 0 is the start and 1 is the end of the video.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1202](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1202))   ### 
retry : integer

  The current retry attempt.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L155))   ### 
retryInterval : integer

  The number of ms between each retry at monitoring the status of a downloading video.

   Default Value * 500
 Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L161))   ### 
retryLimit : integer

  When starting playback of a video Phaser will monitor its readyState using a setTimeout call.  
The setTimeout happens once every `Video.retryInterval` ms. It will carry on monitoring the video  
state in this manner until the `retryLimit` is reached and then abort.

   Default Value * 20
 Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L149))   ### 
[readonly] snapshot : [Phaser.BitmapData](phaser.bitmapdata)

  A snapshot grabbed from the video. This is initially black. Populate it by calling Video.grab().  
When called the BitmapData is updated with a grab taken from the current video playing or active video stream.  
If Phaser has been compiled without BitmapData support this property will always be `null`.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 288](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L288))   ### 
texture : [PIXI.Texture](pixi.texture)

  The PIXI.Texture.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 263](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L263))   ### 
textureFrame : [Phaser.Frame](phaser.frame)

  The Frame this video uses for rendering.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 269](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L269))   ### 
timeout : integer

  The amount of ms allowed to elapsed before the Video.onTimeout signal is dispatched while waiting for webcam access.

   Default Value * 15000
 Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L119))   ### 
touchLocked : boolean

  true if this video is currently locked awaiting a touch event. This happens on some mobile devices, such as iOS.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 81](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L81))   ### 
type : number

  The const type of this object.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L70))   ### 
video :HTMLVideoElement

  The HTML Video Element that is added to the document.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L130))   ### 
videoStream :MediaStream

  The Video Stream data. Only set if this Video is streaming from the webcam via `startMediaStream`.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L135))   ### 
volume : number

  Gets or sets the volume of the Video, a value between 0 and 1. The value given is clamped to the range 0 to 1.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1305](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1305))   ### 
width : number

  The width of the video in pixels.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L58))    Public Methods
--------------

  ### 
add(object) → {[Phaser.Video](phaser.video)}

  Updates the given Display Objects so they use this Video as their texture.  
This will replace any texture they will currently have set.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | [Phaser.Sprite](phaser.sprite) | Array.<[Phaser.Sprite](phaser.sprite)> | [Phaser.Image](phaser.image) | Array.<[Phaser.Image](phaser.image)> | Either a single Sprite/Image or an Array of Sprites/Images. |

 ##### Returns

   [Phaser.Video](phaser.video) -   This Video object for method chaining.

    Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 804](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L804))   ### 
addToWorld(x, y, anchorX, anchorY, scaleX, scaleY) → {[Phaser.Image](phaser.image)}

  Creates a new Phaser.Image object, assigns this Video to be its texture, adds it to the world then returns it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate to place the Image at. |
| `y` | number |  <optional> |  0  | The y coordinate to place the Image at. |
| `anchorX` | number |  <optional> |  0  | Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. |
| `anchorY` | number |  <optional> |  0  | Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. |
| `scaleX` | number |  <optional> |  1  | The horizontal scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on. |
| `scaleY` | number |  <optional> |  1  | The vertical scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on. |

 ##### Returns

   [Phaser.Image](phaser.image) -   The newly added Image object.

    Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 833](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L833))   ### 
changeSource(src, autoplay) → {[Phaser.Video](phaser.video)}

  On some mobile browsers you cannot play a video until the user has explicitly touched the video to allow it.  
Phaser handles this via the `setTouchLock` method. However if you have 3 different videos, maybe an "Intro", "Start" and "Game Over"  
split into three different Video objects, then you will need the user to touch-unlock every single one of them.

 You can avoid this by using just one Video object and simply changing the video source. Once a Video element is unlocked it remains  
unlocked, even if the source changes. So you can use this to your benefit to avoid forcing the user to 'touch' the video yet again.

 As you'd expect there are limitations. So far we've found that the videos need to be in the same encoding format and bitrate.  
This method will automatically handle a change in video dimensions, but if you try swapping to a different bitrate we've found it  
cannot render the new video on iOS (desktop browsers cope better).

 When the video source is changed the video file is requested over the network. Listen for the `onChangeSource` signal to know  
when the new video has downloaded enough content to be able to be played. Previous settings such as the volume and loop state  
are adopted automatically by the new video.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `src` | string |  |  | The new URL to change the video.src to. |
| `autoplay` | boolean |  <optional> |  true  | Should the video play automatically after the source has been updated? |

 ##### Returns

   [Phaser.Video](phaser.video) -   This Video object for method chaining.

    Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 954](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L954))   ### 
complete()

  Called when the video completes playback (reaches and ended state).  
Dispatches the Video.onComplete signal.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 623](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L623))   ### 
connectToMediaStream(video, stream) → {[Phaser.Video](phaser.video)}

  Connects to an external media stream for the webcam, rather than using a local one.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `video` | HTMLVideoElement | The HTML Video Element that the stream uses. |
| `stream` | MediaStream | The Video Stream data. |

 ##### Returns

   [Phaser.Video](phaser.video) -   This Video object for method chaining.

    Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 311](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L311))   ### 
createVideoFromBlob(blob) → {[Phaser.Video](phaser.video)}

  Creates a new Video element from the given Blob. The Blob must contain the video data in the correct encoded format.  
This method is typically called by the Phaser.Loader and Phaser.Cache for you, but is exposed publicly for convenience.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `blob` | Blob | The Blob containing the video data: `Blob([new Uint8Array(data)])` |

 ##### Returns

   [Phaser.Video](phaser.video) -   This Video object for method chaining.

    Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 507](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L507))   ### 
createVideoFromURL(url, autoplay) → {[Phaser.Video](phaser.video)}

  Creates a new Video element from the given URL.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `url` | string |  |  | The URL of the video. |
| `autoplay` | boolean |  <optional> |  false  | Automatically start the video? |

 ##### Returns

   [Phaser.Video](phaser.video) -   This Video object for method chaining.

    Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 530](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L530))   ### 
destroy()

  Destroys the Video object. This calls `Video.stop` and then `Video.removeVideoElement`.  
If any Sprites are using this Video as their texture it is up to you to manage those.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1141](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1141))   ### 
grab(clear, alpha, blendMode) → {[Phaser.BitmapData](phaser.bitmapdata)}

  Grabs the current frame from the Video or Video Stream and renders it to the Video.snapshot BitmapData.

 You can optionally set if the BitmapData should be cleared or not, the alpha and the blend mode of the draw.

 If you need more advanced control over the grabbing them call `Video.snapshot.copy` directly with the same parameters as BitmapData.copy.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `clear` | boolean |  <optional> |  false  | Should the BitmapData be cleared before the Video is grabbed? Unless you are using alpha or a blend mode you can usually leave this set to false. |
| `alpha` | number |  <optional> |  1  | The alpha that will be set on the video before drawing. A value between 0 (fully transparent) and 1, opaque. |
| `blendMode` | string |  <optional> |  null  | The composite blend mode that will be used when drawing. The default is no blend mode at all. This is a Canvas globalCompositeOperation value such as 'lighter' or 'xor'. |

 ##### Returns

   [Phaser.BitmapData](phaser.bitmapdata) -   A reference to the Video.snapshot BitmapData object for further method chaining.

    Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1075](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1075))   ### 
play(loop, playbackRate) → {[Phaser.Video](phaser.video)}

  Starts this video playing if it's not already doing so.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `loop` | boolean |  <optional> |  false  | Should the video loop automatically when it reaches the end? Please note that at present some browsers (i.e. Chrome) do not support *seamless* video looping. |
| `playbackRate` | number |  <optional> |  1  | The playback rate of the video. 1 is normal speed, 2 is x2 speed, and so on. You cannot set a negative playback rate. |

 ##### Returns

   [Phaser.Video](phaser.video) -   This Video object for method chaining.

    Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 635](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L635))   ### 
removeVideoElement()

  Removes the Video element from the DOM by calling parentNode.removeChild on itself.  
Also removes the autoplay and src attributes and nulls the reference.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1111](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1111))   ### 
render()

  If the game is running in WebGL this will push the texture up to the GPU if it's dirty.  
This is called automatically if the Video is being used by a Sprite, otherwise you need to remember to call it in your render function.  
If you wish to suppress this functionality set Video.disableTextureUpload to `true`.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 859](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L859))   ### 
setTouchLock()

  Sets the Input Manager touch callback to be Video.unlock.  
Required for mobile video unlocking. Mostly just used internally.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1033](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1033))   ### 
startMediaStream(captureAudio, width, height) → {[Phaser.Video](phaser.video)}

  Instead of playing a video file this method allows you to stream video data from an attached webcam.

 As soon as this method is called the user will be prompted by their browser to "Allow" access to the webcam.  
If they allow it the webcam feed is directed to this Video. Call `Video.play` to start the stream.

 If they block the webcam the onError signal will be dispatched containing the NavigatorUserMediaError  
or MediaStreamError event.

 You can optionally set a width and height for the stream. If set the input will be cropped to these dimensions.  
If not given then as soon as the stream has enough data the video dimensions will be changed to match the webcam device.  
You can listen for this with the onChangeSource signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `captureAudio` | boolean |  <optional> |  false  | Controls if audio should be captured along with video in the video stream. |
| `width` | integer |  <optional> |  | The width is used to create the video stream. If not provided the video width will be set to the width of the webcam input source. |
| `height` | integer |  <optional> |  | The height is used to create the video stream. If not provided the video height will be set to the height of the webcam input source. |

 ##### Returns

   [Phaser.Video](phaser.video) -   This Video object for method chaining or false if the device doesn't support getUserMedia.

    Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 337](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L337))   ### 
stop() → {[Phaser.Video](phaser.video)}

  Stops the video playing.

 This removes all locally set signals.

 If you only wish to pause playback of the video, to resume at a later time, use `Video.paused = true` instead.  
If the video hasn't finished downloading calling `Video.stop` will not abort the download. To do that you need to  
call `Video.destroy` instead.

 If you are using a video stream from a webcam then calling Stop will disconnect the MediaStream session and disable the webcam.

  ##### Returns

   [Phaser.Video](phaser.video) -   This Video object for method chaining.

    Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 723](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L723))   ### 
unlock()

  Enables the video on mobile devices, usually after the first touch.  
If the SoundManager hasn't been unlocked then this will automatically unlock that as well.  
Only one video can be pending unlock at any one time.

   Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 1046](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L1046))   ### 
updateTexture(event, width, height)

  Called automatically if the video source changes and updates the internal texture dimensions.  
Then dispatches the onChangeSource signal.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `event` | object |  <optional> | The event which triggered the texture update. |
| `width` | integer |  <optional> | The new width of the video. If undefined `video.videoWidth` is used. |
| `height` | integer |  <optional> | The new height of the video. If undefined `video.videoHeight` is used. |

  Source code: [gameobjects/Video.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js) ([Line 572](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Video.js#L572))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Video.html>

Class: Phaser.Filter
====================

 Constructor
-----------

 ### 
new Filter(game, uniforms, fragmentSrc)

  This is a base Filter class to use for any Phaser filter development.

 The vast majority of filters (including all of those that ship with Phaser) use fragment shaders, and  
therefore only work in WebGL and are not supported by Canvas at all.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `uniforms` | object | Uniform mappings object |
| `fragmentSrc` | Array | string | The fragment shader code. Either an array, one element per line of code, or a string. |

  Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L19))   Public Properties
-----------------

  ### 
dirty : boolean

  Internal PIXI var.

   Default Value * true
 Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L50))   ### 
fragmentSrc :array | string

  The fragment shader code.

  ##### Type

 * array | string

  Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L98))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running game.

   Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L24))   ### 
height : number

  The height (resolution uniform)

   Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 233](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L233))   ### 
padding : number

  Internal PIXI var.

   Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L56))   ### 
prevPoint : [Phaser.Point](phaser.point)

  The previous position of the pointer (we don't update the uniform if the same)

   Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L61))   ### 
type : number

  The const type of this object, either Phaser.WEBGL\_FILTER or Phaser.CANVAS\_FILTER.

   Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L30))   ### 
uniforms : Object

  Default uniform mappings. Compatible with ShaderToy and GLSLSandbox.

   Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L72))   ### 
width : number

  The width (resolution uniform)

   Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L217))    Public Methods
--------------

  ### 
addToWorld(x, y, width, height, anchorX, anchorY) → {[Phaser.Image](phaser.image)}

  Creates a new Phaser.Image object using a blank texture and assigns  
this Filter to it. The image is then added to the world.

 If you don't provide width and height values then Filter.width and Filter.height are used.

 If you do provide width and height values then this filter will be resized to match those  
values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The x coordinate to place the Image at. |
| `y` | number |  <optional> |  0  | The y coordinate to place the Image at. |
| `width` | number |  <optional> |  | The width of the Image. If not specified (or null) it will use Filter.width. If specified Filter.width will be set to this value. |
| `height` | number |  <optional> |  | The height of the Image. If not specified (or null) it will use Filter.height. If specified Filter.height will be set to this value. |
| `anchorX` | number |  <optional> |  0  | Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. |
| `anchorY` | number |  <optional> |  0  | Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. |

 ##### Returns

   [Phaser.Image](phaser.image) -   The newly added Image object.

    Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L149))   ### 
destroy()

  Clear down this Filter and null out references

   Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L203))   ### 
init()

  Should be over-ridden.

   Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L104))   ### 
setResolution(width, height)

  Set the resolution uniforms on the filter.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | number | The width of the display. |
| `height` | number | The height of the display. |

  Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L112))   ### 
update(pointer)

  Updates the filter.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  <optional> | A Pointer object to use for the filter. The coordinates are mapped to the mouse uniform. |

  Source code: [core/Filter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Filter.js#L125))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Filter.html>

Class: PIXI.Sprite
==================

 Constructor
-----------

 ### 
new Sprite(texture)

  The Sprite object is the base for all textured objects that are rendered to the screen

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) | The texture for this sprite |

  Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L5))   Extends
-------

 * [PIXI.DisplayObjectContainer](pixi.displayobjectcontainer)

 Public Properties
-----------------

  ### 
anchor :Point

  The anchor sets the origin point of the texture.  
The default is 0,0 this means the texture's origin is the top left  
Setting than anchor to 0.5,0.5 means the textures origin is centered  
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

   Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L17))   ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

 Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

   Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L82))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
exists : boolean

  Controls if this Sprite is processed by the core Phaser game loops and Group loops.

   Default Value * true
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L103))   ### 
height : number

  The height of the sprite, setting this will actually modify the scale to achieve the value set

   Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L144))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
shader : [PIXI.AbstractFilter](pixi.abstractfilter)

  The shader that will be used to render this Sprite.  
Set to null to remove a current shader.

   Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L93))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture that the sprite is using

   Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L28))   ### 
tint : number

  The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

   Default Value * 0xFFFFFF
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L54))   ### 
tintedTexture :Canvas

  A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

   Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L73))   ### 
width : number

  The width of the sprite, setting this will actually modify the scale to achieve the value set

   Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L125))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
getBounds(matrix) → {Rectangle}

  Returns the bounds of the Sprite as a rectangle.  
The bounds calculation takes the worldTransform into account.

 It is important to note that the transform is not updated when you call this method.  
So if this Sprite is the child of a Display Object which has had its transform  
updated since the last render pass, those changes will not yet have been applied  
to this Sprites worldTransform. If you need to ensure that all parent transforms  
are factored into this getBounds operation then you should call `updateTransform`  
on the root most object in this Sprites display list first.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Matrix | the transformation matrix of the sprite |

 ##### Returns

   Rectangle -   the framing rectangle

    Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L199))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L315))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setTexture(texture, destroy)

  Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous  
texture this Sprite was using.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) |  |  | The PIXI texture that is displayed by the sprite |
| `destroy` | Boolean |  <optional> |  false  | Call Texture.destroy on the current texture before replacing it with the new one? |

  Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L163))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.Sprite.html>

Class: Phaser.Component.Core
============================

 Constructor
-----------

 ### 
new Core()

  Core Component Features.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L12))   Public Properties
-----------------

  ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
<internal> components : Object

  The components this Game Object has installed.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Game Object is processed by the core game loop.  
If this Game Object has a physics body it also controls if its physics body is updated or not.  
When `exists` is set to `false` it will remove its physics body from the physics world if it has one.  
It also toggles the `visible` property to false as well.

 Setting `exists` to true will add its physics body back in to the physics world, if it has one.  
It will also set the `visible` property to `true`.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L284))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
<internal, static> init()

  Initializes the mixin components.

 The `this` context should be an instance of the component mixin target.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L54))   ### 
<internal, static> install()

  Installs / registers mixin components.

 The `this` context should be that of the applicable object instance or prototype.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L22))   ### 
<internal> postUpdate()

  Internal method called by the World postUpdate cycle.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L338))   ### 
update()

  Override this method in your own custom objects to handle any update requirements.  
It is called immediately after `preUpdate` and before `postUpdate`.  
Remember if this Game Object has any children you should call update on those too.

   Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L328))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Core.html>

Class: Phaser.Component.BringToTop
==================================

 Constructor
-----------

 ### 
new BringToTop()

  The BringToTop Component features quick access to Group sorting related methods.

   Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L12))   Public Methods
--------------

  ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.BringToTop.html>

Class: Phaser.Component.Crop
============================

 Constructor
-----------

 ### 
new Crop()

  The Crop component provides the ability to crop a texture based Game Object to a defined rectangle,  
which can be updated in real-time.

   Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 13](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L13))   Public Properties
-----------------

  ### 
cropRect : [Phaser.Rectangle](phaser.rectangle)

  The Rectangle used to crop the texture this Game Object uses.  
Set this property via `crop`.  
If you modify this property directly you must call `updateCrop` in order to have the change take effect.

   Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L24))    Public Methods
--------------

  ### 
crop(rect, copy)

  Crop allows you to crop the texture being used to display this Game Object.  
Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

 Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,  
or by modifying `cropRect` property directly and then calling `updateCrop`.

 The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object  
so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

 A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`,  
in which case the values are duplicated to a local object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) |  |  | The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. |
| `copy` | boolean |  <optional> |  false  | If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect. |

  Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L49))   ### 
updateCrop()

  If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,  
or the rectangle it references, then you need to update the crop frame by calling this method.

   Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L86))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Crop.html>

Class: Phaser.Physics.P2.BodyDebug
==================================

 Constructor
-----------

 ### 
new BodyDebug(game, body, settings)

  Draws a P2 Body to a Graphics instance for visual debugging.  
Needless to say, for every body you enable debug drawing on, you are adding processor and graphical overhead.  
So use sparingly and rarely (if ever) in production code.

 Also be aware that the Debug body is only updated when the Sprite it is connected to changes position. If you  
manipulate the sprite in any other way (such as moving it to another Group or bringToTop, etc) then you will  
need to manually adjust its BodyDebug as well.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | Game reference to the currently running game. |
| `body` | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | The P2 Body to display debug data for. |
| `settings` | object | Settings object. |

  Source code: [physics/p2/BodyDebug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js#L24))   Extends
-------

 * [Phaser.Group](phaser.group)

 Public Properties
-----------------

  ### 
alive : boolean

  The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.

   Inherited From * [Phaser.Group#alive](phaser.group#alive)
 Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L93))   ### 
alpha : number

  The alpha value of the group container.

   Inherited From * [Phaser.Group#alpha](phaser.group#alpha)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 3003](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L3003))   ### 
angle : number

  The angle of rotation of the group container, in degrees.

 This adjusts the group itself by modifying its local rotation transform.

 This has no impact on the rotation/angle properties of the children, but it will update their worldTransform  
and on-screen orientation and position.

   Inherited From * [Phaser.Group#angle](phaser.group#angle)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2682))   ### 
body : [Phaser.Physics.P2.Body](phaser.physics.p2.body)

  The P2 Body to display debug data for.

   Source code: [physics/p2/BodyDebug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js#L50))   ### 
bottom : number

  The bottom coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#bottom](phaser.group#bottom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2845](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2845))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  If this object is [fixedToCamera](phaser.group#fixedToCamera) then this stores the x/y position offset relative to the top-left of the camera view.  
If the parent of this Group is also `fixedToCamera` then the offset here is in addition to that and should typically be disabled.

   Inherited From * [Phaser.Group#cameraOffset](phaser.group#cameraOffset)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 272](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L272))   ### 
canvas : [Phaser.Graphics](phaser.graphics)

  The canvas to render the debug info to.

   Source code: [physics/p2/BodyDebug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js#L55))   ### 
centerX : number

  The center x coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#centerX](phaser.group#centerX)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2705](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2705))   ### 
centerY : number

  The center y coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#centerY](phaser.group#centerY)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2733](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2733))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
classType : Object

  The type of objects that will be created when using [create](phaser.group#create) or [createMultiple](phaser.group#createMultiple).

 Any object may be used but it should extend either Sprite or Image and accept the same constructor arguments:  
when a new object is created it is passed the following parameters to its constructor: `(game, x, y, key, frame)`.

   Inherited From * [Phaser.Group#classType](phaser.group#classType)
 Default Value * [Phaser.Sprite](phaser.sprite)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 130](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L130))   ### 
cursor : [DisplayObject](global#DisplayObject)

  The current display object that the group cursor is pointing to, if any. (Can be set manually.)

 The cursor is a way to iterate through the children in a Group using [next](phaser.group#next) and [previous](phaser.group#previous).

   Inherited From * [Phaser.Group#cursor](phaser.group#cursor)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 138](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L138))   ### 
[readonly] cursorIndex : integer

  The current index of the Group cursor. Advance it with Group.next.

   Inherited From * [Phaser.Group#cursorIndex](phaser.group#cursorIndex)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 255](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L255))   ### 
enableBody : boolean

  If true all Sprites created by, or added to this group, will have a physics body enabled on them.

 If there are children already in the Group at the time you set this property, they are not changed.

 The default body type is controlled with [physicsBodyType](phaser.group#physicsBodyType).

   Inherited From * [Phaser.Group#enableBody](phaser.group#enableBody)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 208](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L208))   ### 
enableBodyDebug : boolean

  If true when a physics body is created (via [enableBody](phaser.group#enableBody)) it will create a physics debug object as well.

 This only works for P2 bodies.

   Inherited From * [Phaser.Group#enableBodyDebug](phaser.group#enableBodyDebug)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L217))   ### 
exists : boolean

  If exists is true the group is updated, otherwise it is skipped.

   Inherited From * [Phaser.Group#exists](phaser.group#exists)
 Default Value * true
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 100](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L100))   ### 
fixedToCamera : boolean

  A Group that is fixed to the camera uses its x/y coordinates as offsets from the top left of the camera. These are stored in Group.cameraOffset.

 Note that the cameraOffset values are in addition to any parent in the display list.  
So if this Group was in a Group that has x: 200, then this will be added to the cameraOffset.x

   Inherited From * [Phaser.Group#fixedToCamera](phaser.group#fixedToCamera)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 265](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L265))   ### 
<internal> game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Group#game](phaser.group#game)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L38))   ### 
hash :array

  The hash array is an array belonging to this Group into which you can add any of its children via Group.addToHash and Group.removeFromHash.

 Only children of this Group can be added to and removed from the hash.

 This hash is used automatically by Phaser Arcade Physics in order to perform non z-index based destructive sorting.  
However if you don't use Arcade Physics, or this isn't a physics enabled Group, then you can use the hash to perform your own  
sorting and filtering of Group children without touching their z-index (and therefore display draw order)

   Inherited From * [Phaser.Group#hash](phaser.group#hash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 285](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L285))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
ignoreDestroy : boolean

  A group with `ignoreDestroy` set to `true` ignores all calls to its `destroy` method.

   Inherited From * [Phaser.Group#ignoreDestroy](phaser.group#ignoreDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L107))   ### 
inputEnableChildren : boolean

  A Group with `inputEnableChildren` set to `true` will automatically call `inputEnabled = true`  
on any children *added* to, or *created by*, this Group.

 If there are children already in the Group at the time you set this property, they are not changed.

   Inherited From * [Phaser.Group#inputEnableChildren](phaser.group#inputEnableChildren)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L149))   ### 
left : number

  The left coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#left](phaser.group#left)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2761](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2761))   ### 
[readonly] length : integer

  Total number of children in this group, regardless of exists/alive status.

   Inherited From * [Phaser.Group#length](phaser.group#length)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2665](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2665))   ### 
name : string

  A name for this group. Not used internally but useful for debugging.

   Inherited From * [Phaser.Group#name](phaser.group#name)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L49))   ### 
onChildInputDown : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputDown signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputDown](phaser.group#onChildInputDown)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L161))   ### 
onChildInputOut : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOut signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputOut](phaser.group#onChildInputOut)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L198))   ### 
onChildInputOver : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputOver signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 2 arguments: A reference to the Sprite that triggered the signal, and  
a reference to the Pointer that caused it.

   Inherited From * [Phaser.Group#onChildInputOver](phaser.group#onChildInputOver)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 186](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L186))   ### 
onChildInputUp : [Phaser.Signal](phaser.signal)

  This Signal is dispatched whenever a child of this Group emits an onInputUp signal as a result  
of having been interacted with by a Pointer. You can bind functions to this Signal instead of to  
every child Sprite.

 This Signal is sent 3 arguments: A reference to the Sprite that triggered the signal,  
a reference to the Pointer that caused it, and a boolean value `isOver` that tells you if the Pointer  
is still over the Sprite or not.

   Inherited From * [Phaser.Group#onChildInputUp](phaser.group#onChildInputUp)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 174](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L174))   ### 
onDestroy : [Phaser.Signal](phaser.signal)

  This signal is dispatched when the group is destroyed.

   Inherited From * [Phaser.Group#onDestroy](phaser.group#onDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 249](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L249))   ### 
pendingDestroy : boolean

  A Group is that has `pendingDestroy` set to `true` is flagged to have its destroy method  
called on the next logic update.  
You can set it directly to flag the Group to be destroyed on its next update.

 This is extremely useful if you wish to destroy a Group from within one of its own callbacks  
or a callback of one of its children.

   Inherited From * [Phaser.Group#pendingDestroy](phaser.group#pendingDestroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L119))   ### 
physicsBodyType : integer

  If [enableBody](phaser.group#enableBody) is true this is the type of physics body that is created on new Sprites.

 The valid values are [Phaser.Physics.ARCADE](phaser.physics#.ARCADE), [Phaser.Physics.P2JS](phaser.physics#.P2JS), [Phaser.Physics.NINJA](phaser.physics#.NINJA), etc.

   Inherited From * [Phaser.Group#physicsBodyType](phaser.group#physicsBodyType)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L225))   ### 
physicsSortDirection : integer

  If this Group contains Arcade Physics Sprites you can set a custom sort direction via this property.

 It should be set to one of the Phaser.Physics.Arcade sort direction constants: 

 Phaser.Physics.Arcade.SORT\_NONE  
Phaser.Physics.Arcade.LEFT\_RIGHT  
Phaser.Physics.Arcade.RIGHT\_LEFT  
Phaser.Physics.Arcade.TOP\_BOTTOM  
Phaser.Physics.Arcade.BOTTOM\_TOP

 If set to `null` the Group will use whatever Phaser.Physics.Arcade.sortDirection is set to. This is the default behavior.

   Inherited From * [Phaser.Group#physicsSortDirection](phaser.group#physicsSortDirection)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 243](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L243))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Inherited From * [Phaser.Group#physicsType](phaser.group#physicsType)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L86))   ### 
ppu : number

  Pixels per Length Unit.

   Source code: [physics/p2/BodyDebug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js) ([Line 44](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js#L44))   ### 
right : number

  The right coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#right](phaser.group#right)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2789](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2789))   ### 
rotation : number

  The angle of rotation of the group container, in radians.

 This will adjust the group container itself by modifying its rotation.  
This will have no impact on the rotation value of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#rotation](phaser.group#rotation)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2987](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2987))   ### 
top : number

  The top coordinate of this Group.

 It is derived by calling `getBounds`, calculating the Groups dimensions based on its  
visible children.

   Inherited From * [Phaser.Group#top](phaser.group#top)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2817](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2817))   ### 
[readonly] total : integer

  Total number of existing children in the group.

   Inherited From * [Phaser.Group#total](phaser.group#total)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2648](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2648))   ### 
<internal> type : integer

  Internal Phaser Type value.

   Inherited From * [Phaser.Group#type](phaser.group#type)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L80))   ### 
visible : boolean

  The visible state of the group. Non-visible Groups and all of their children are not rendered.

   Inherited From * [Phaser.Group#visible](phaser.group#visible)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2996](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2996))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))   ### 
x : number

  The x coordinate of the group container.

 You can adjust the group container itself by modifying its coordinates.  
This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#x](phaser.group#x)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2969))   ### 
y : number

  The y coordinate of the group container.

 You can adjust the group container itself by modifying its coordinates.  
This will have no impact on the x/y coordinates of its children, but it will update their worldTransform and on-screen position.

   Inherited From * [Phaser.Group#y](phaser.group#y)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2978](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2978))   ### 
[readonly] z : integer

  The z-depth value of this object within its parent container/Group - the World is a Group as well.  
This value must be unique for each child in a Group.

   Inherited From * [Phaser.Group#z](phaser.group#z)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L57))    Public Methods
--------------

  ### 
add(child, silent, index) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object as the top child in this group.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If the child was already in this Group, it is simply returned, and nothing else happens to it.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

 Use [addAt](phaser.group#addAt) to control where a child is added. Use [create](phaser.group#create) to create and add a new child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Inherited From * [Phaser.Group#add](phaser.group#add)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 341](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L341))   ### 
addAll(property, amount, checkAlive, checkVisible)

  Adds the amount to the given property on all children in this group.

 `Group.addAll('x', 10)` will add 10 to the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to increment, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#addAll](phaser.group#addAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1386](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1386))   ### 
addAt(child, index, silent) → {[DisplayObject](global#DisplayObject)}

  Adds an existing object to this group.

 The child is added to the group at the location specified by the index value, this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  |  | The display object to add as a child. |
| `index` | integer |  <optional> |  0  | The index within the group to insert the child to. |
| `silent` | boolean |  <optional> |  false  | If true the child will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added to the group.

    Inherited From * [Phaser.Group#addAt](phaser.group#addAt)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 418](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L418))   ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
addMultiple(children, silent) → {Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group)}

  Adds an array of existing Display Objects to this Group.

 The Display Objects are automatically added to the top of this Group, and will render on-top of everything already in this Group.

 As well as an array you can also pass another Group as the first argument. In this case all of the children from that  
Group will be removed from it and added into this Group.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `children` | Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) |  |  | An array of display objects or a Phaser.Group. If a Group is given then *all* children will be moved from it. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event. |

 ##### Returns

   Array.<[DisplayObject](global#DisplayObject)> | [Phaser.Group](phaser.group) -   The array of children or Group of children that were added to this Group.

    Inherited From * [Phaser.Group#addMultiple](phaser.group#addMultiple)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 489](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L489))   ### 
addToHash(child) → {boolean}

  Adds a child of this Group into the hash array.  
This call will return false if the child is not a child of this Group, or is already in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to add to this Groups hash. Must be a member of this Group already and not present in the hash. |

 ##### Returns

   boolean -   True if the child was successfully added to the hash, otherwise false.

    Inherited From * [Phaser.Group#addToHash](phaser.group#addToHash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 439](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L439))   ### 
align(width, height, cellWidth, cellHeight, position, offset) → {boolean}

  This method iterates through all children in the Group (regardless if they are visible or exist)  
and then changes their position so they are arranged in a Grid formation. Children must have  
the `alignTo` method in order to be positioned by this call. All default Phaser Game Objects have  
this.

 The grid dimensions are determined by the first four arguments. The `width` and `height` arguments  
relate to the width and height of the grid respectively.

 For example if the Group had 100 children in it:

 `Group.align(10, 10, 32, 32)`

 This will align all of the children into a grid formation of 10x10, using 32 pixels per  
grid cell. If you want a wider grid, you could do:

 `Group.align(25, 4, 32, 32)`

 This will align the children into a grid of 25x4, again using 32 pixels per grid cell.

 You can choose to set *either* the `width` or `height` value to -1. Doing so tells the method  
to keep on aligning children until there are no children left. For example if this Group had  
48 children in it, the following:

 `Group.align(-1, 8, 32, 32)`

 ... will align the children so that there are 8 children vertically (the second argument),  
and each row will contain 6 sprites, except the last one, which will contain 5 (totaling 48)

 You can also do:

 `Group.align(10, -1, 32, 32)`

 In this case it will create a grid 10 wide, and as tall as it needs to be in order to fit  
all of the children in.

 The `position` property allows you to control where in each grid cell the child is positioned.  
This is a constant and can be one of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`,  
`Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`,  
`Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`.

 The final argument; `offset` lets you start the alignment from a specific child index.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `width` | integer |  |  | The width of the grid in items (not pixels). Set to -1 for a dynamic width. If -1 then you must set an explicit height value. |
| `height` | integer |  |  | The height of the grid in items (not pixels). Set to -1 for a dynamic height. If -1 then you must set an explicit width value. |
| `cellWidth` | integer |  |  | The width of each grid cell, in pixels. |
| `cellHeight` | integer |  |  | The height of each grid cell, in pixels. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offset` | integer |  <optional> |  0  | Optional index to start the alignment from. Defaults to zero, the first child in the Group, but can be set to any valid child index value. |

 ##### Returns

   boolean -   True if the Group children were aligned, otherwise false.

    Inherited From * [Phaser.Group#align](phaser.group#align)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 682](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L682))   ### 
alignIn(container, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation and scale of its children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Inherited From * [Phaser.Group#alignIn](phaser.group#alignIn)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2873](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2873))   ### 
alignTo(parent, position, offsetX, offsetY) → {[Phaser.Group](phaser.group)}

  Aligns this Group to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Groups within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Group to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 Groups are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation and scale of the children.  
This allows you to neatly align Groups, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Group. For example:

 `group.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `group` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Group to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   [Phaser.Group](phaser.group) -   This Group.

    Inherited From * [Phaser.Group#alignTo](phaser.group#alignTo)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2915](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2915))   ### 
<internal> ascendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Inherited From * [Phaser.Group#ascendingSortHandler](phaser.group#ascendingSortHandler)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1919](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1919))   ### 
bringToTop(child) → {any}

  Brings the given child to the top of this group so it renders above all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to bring to the top of this group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#bringToTop](phaser.group#bringToTop)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 907](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L907))   ### 
callAll(method, context, args)

  Calls a function, specified by name, on all on children.

 The function is called for all children regardless if they are dead or alive (see callAllExists for different options).  
After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `method` | string |  |  | Name of the function on the child to call. Deep property lookup is supported. |
| `context` | string |  <optional> |  null  | A string containing the context under which the method will be executed. Set to null to default to the child. |
| `args` | any |  <repeatable> |  | Additional parameters that will be passed to the method. |

  Inherited From * [Phaser.Group#callAll](phaser.group#callAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1538](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1538))   ### 
callAllExists(callback, existsValue, parameter)

  Calls a function, specified by name, on all children in the group who exist (or do not exist).

 After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `callback` | string |  | Name of the function on the children to call. |
| `existsValue` | boolean |  | Only children with exists=existsValue will be called. |
| `parameter` | any |  <repeatable> | Additional parameters that will be passed to the callback. |

  Inherited From * [Phaser.Group#callAllExists](phaser.group#callAllExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1454](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1454))   ### 
<internal> callbackFromArray(child, callback, length)

  Returns a reference to a function that exists on a child of the group based on the given callback array.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | object | The object to inspect. |
| `callback` | array | The array of function names. |
| `length` | integer | The size of the array (pre-calculated in callAll). |

  Inherited From * [Phaser.Group#callbackFromArray](phaser.group#callbackFromArray)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1488](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1488))   ### 
checkAll(key, value, checkAlive, checkVisible, force)

  Quickly check that the same property across all children of this group is equal to the given value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be checked. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be checked. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be checked. This includes any Groups that are children. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

  Inherited From * [Phaser.Group#checkAll](phaser.group#checkAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1353](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1353))   ### 
checkProperty(child, key, value, force) → {boolean}

  Checks a property for the given value on the child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to check the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be checked. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. |

 ##### Returns

   boolean -   True if the property was was equal to value, false if not.

    Inherited From * [Phaser.Group#checkProperty](phaser.group#checkProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1217))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
countDead() → {integer}

  Get the number of dead children in this group.

  ##### Returns

   integer -   The number of children flagged as dead.

    Inherited From * [Phaser.Group#countDead](phaser.group#countDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2338))   ### 
countLiving() → {integer}

  Get the number of living children in this group.

  ##### Returns

   integer -   The number of children flagged as alive.

    Inherited From * [Phaser.Group#countLiving](phaser.group#countLiving)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2326](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2326))   ### 
create(x, y, key, frame, exists, index) → {[DisplayObject](global#DisplayObject)}

  Creates a new Phaser.Sprite object and adds it to the top of this group.

 Use [classType](phaser.group#classType) to change the type of object created.

 The child is automatically added to the top of the group, and is displayed above every previous child.

 Or if the *optional* index is specified, the child is added at the location specified by the index value,  
this allows you to control child ordering.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point. |
| `y` | number |  |  | The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `exists` | boolean |  <optional> |  true  | The default exists state of the Sprite. |
| `index` | integer |  <optional> |  | The index within the group to insert the child to. Where 0 is the bottom of the Group. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was created: will be a [Phaser.Sprite](phaser.sprite) unless #classType has been changed.

    Inherited From * [Phaser.Group#create](phaser.group#create)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 544](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L544))   ### 
createMultiple(quantity, key, frame, exists) → {array}

  Creates multiple Phaser.Sprite objects and adds them to the top of this Group.

 This method is useful if you need to quickly generate a pool of sprites, such as bullets.

 Use [classType](phaser.group#classType) to change the type of object created.

 You can provide an array as the `key` and / or `frame` arguments. When you do this  
it will create `quantity` Sprites for every key (and frame) in the arrays.

 For example:

 `createMultiple(25, ['ball', 'carrot'])`

 In the above code there are 2 keys (ball and carrot) which means that 50 sprites will be  
created in total, 25 of each. You can also have the `frame` as an array:

 `createMultiple(5, 'bricks', [0, 1, 2, 3])`

 In the above there is one key (bricks), which is a sprite sheet. The frames array tells  
this method to use frames 0, 1, 2 and 3. So in total it will create 20 sprites, because  
the quantity was set to 5, so that is 5 brick sprites of frame 0, 5 brick sprites with  
frame 1, and so on.

 If you set both the key and frame arguments to be arrays then understand it will create  
a total quantity of sprites equal to the size of both arrays times each other. I.e.:

 `createMultiple(20, ['diamonds', 'balls'], [0, 1, 2])`

 The above will create 20 'diamonds' of frame 0, 20 with frame 1 and 20 with frame 2.  
It will then create 20 'balls' of frame 0, 20 with frame 1 and 20 with frame 2.  
In total it will have created 120 sprites.

 By default the Sprites will have their `exists` property set to `false`, and they will be  
positioned at 0x0, relative to the `Group.x / y` values.

 If `Group.enableBody` is set, then a physics body will be created on the objects, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the objects, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `quantity` | integer |  |  | The number of Sprites to create. |
| `key` | string | array |  |  | The Cache key of the image that the Sprites will use. Or an Array of keys. See the description for details on how the quantity applies when arrays are used. |
| `frame` | integer | string | array |  <optional> |  0  | If the Sprite image contains multiple frames you can specify which one to use here. Or an Array of frames. See the description for details on how the quantity applies when arrays are used. |
| `exists` | boolean |  <optional> |  false  | The default exists state of the Sprite. |

 ##### Returns

   array -   An array containing all of the Sprites that were created.

    Inherited From * [Phaser.Group#createMultiple](phaser.group#createMultiple)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 581](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L581))   ### 
customSort(sortHandler, context)

  Sort the children in the group according to custom sort function.

 The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b).  
It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `sortHandler` | function |  | The custom sort function. |
| `context` | object |  <optional> | The context in which the sortHandler is called. |

  Inherited From * [Phaser.Group#customSort](phaser.group#customSort)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1895](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1895))   ### 
<internal> descendingSortHandler(a, b)

  An internal helper function for the sort process.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | object | The first object being sorted. |
| `b` | object | The second object being sorted. |

  Inherited From * [Phaser.Group#descendingSortHandler](phaser.group#descendingSortHandler)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1951](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1951))   ### 
destroy(destroyChildren, soft)

  Destroys this group.

 Removes all children, then removes this group from its parent and nulls references.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | If true `destroy` will be invoked on each removed child. |
| `soft` | boolean |  <optional> |  false  | A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does. |

  Inherited From * [Phaser.Group#destroy](phaser.group#destroy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2611))   ### 
divideAll(property, amount, checkAlive, checkVisible)

  Divides the given property by the amount on all children in this group.

 `Group.divideAll('x', 2)` will half the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to divide, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#divideAll](phaser.group#divideAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1437))   ### 
draw()

  Draws the P2 shapes to the Graphics object.

   Source code: [physics/p2/BodyDebug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js#L85))   ### 
filter(predicate, checkExists) → {[Phaser.ArraySet](phaser.arrayset)}

  Find children matching a certain predicate.

 For example:

 
```
var healthyList = Group.filter(function(child, index, children) {
    return child.health > 10 ? true : false;
}, true);
healthyList.callAll('attack');
```

Note: Currently this will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `predicate` | function |  |  | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third |
| `checkExists` | boolean |  <optional> |  false  | If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate. |

 ##### Returns

   [Phaser.ArraySet](phaser.arrayset) -   Returns an array list containing all the children that the predicate returned true for

    Inherited From * [Phaser.Group#filter](phaser.group#filter)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1677](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1677))   ### 
forEach(callback, callbackContext, checkExists, args)

  Call a function on each child in this group.

 Additional arguments for the callback can be specified after the `checkExists` parameter. For example,

 
```
Group.forEach(awardBonusGold, this, true, 100, 500)
```

would invoke `awardBonusGold` function with the parameters `(child, 100, 500)`.

 Note: This check will skip any children which are Groups themselves.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `checkExists` | boolean |  <optional> |  false  | If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed. |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEach](phaser.group#forEach)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1717](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1717))   ### 
forEachAlive(callback, callbackContext, args)

  Call a function on each alive child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachAlive](phaser.group#forEachAlive)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1799](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1799))   ### 
forEachDead(callback, callbackContext, args)

  Call a function on each dead child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachDead](phaser.group#forEachDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1827](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1827))   ### 
forEachExists(callback, callbackContext, args)

  Call a function on each existing child in this group.

 See [forEach](phaser.group#forEach) for details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `callback` | function |  |  | The function that will be called for each applicable child. The child will be passed as the first argument. |
| `callbackContext` | object |  |  | The context in which the function should be called (usually 'this'). |
| `args` | any |  <optional> <repeatable> |  (none)  | Additional arguments to pass to the callback function, after the child item. |

  Inherited From * [Phaser.Group#forEachExists](phaser.group#forEachExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1771](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1771))   ### 
getAll(property, value, startIndex, endIndex) → {any}

  Returns all children in this Group.

 You can optionally specify a matching criteria using the `property` and `value` arguments.

 For example: `getAll('exists', true)` would return only children that have their exists property set.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `property` | string |  <optional> |  | An optional property to test against the value argument. |
| `value` | any |  <optional> |  | If property is set then Child.property must strictly equal this value to be included in the results. |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up until. |

 ##### Returns

   any -   A random existing child of this Group.

    Inherited From * [Phaser.Group#getAll](phaser.group#getAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2392](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2392))   ### 
getAt(index) → {[DisplayObject](global#DisplayObject) | integer}

  Returns the child found at the given index within this group.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index to return the child from. |

 ##### Returns

   [DisplayObject](global#DisplayObject) | integer -   The child that was found at the given index, or -1 for an invalid index.

    Inherited From * [Phaser.Group#getAt](phaser.group#getAt)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 524](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L524))   ### 
getBottom() → {any}

  Returns the child at the bottom of this group.

 The bottom child the child being displayed (rendered) below every other child.

  ##### Returns

   any -   The child at the bottom of the Group.

    Inherited From * [Phaser.Group#getBottom](phaser.group#getBottom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2221))   ### 
getBounds(targetCoordinateSpace) → {Rectangle}

  Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `targetCoordinateSpace` | PIXIDisplayObject | PIXIMatrix |  <optional> | Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. |

 ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getBounds](pixi.displayobjectcontainer#getBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 280](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L280))   ### 
getByName(name) → {any}

  Searches the Group for the first instance of a child with the `name`  
property matching the given argument. Should more than one child have  
the same name only the first instance is returned.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `name` | string | The name to search for. |

 ##### Returns

   any -   The first child with a matching name, or null if none were found.

    Inherited From * [Phaser.Group#getByName](phaser.group#getByName)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1042](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1042))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getClosestTo(object, callback, callbackContext) → {any}

  Get the closest child to given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'close' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child closest to given object, or `null` if no child was found.

    Inherited From * [Phaser.Group#getClosestTo](phaser.group#getClosestTo)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2238](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2238))   ### 
getFirstAlive(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is alive (`child.alive === true`).

 This is handy for choosing a squad leader, etc.

 You can use the optional argument `createIfNull` to create a new Game Object if no alive ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The alive dead child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstAlive](phaser.group#getFirstAlive)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2105))   ### 
getFirstDead(createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first child that is dead (`child.alive === false`).

 This is handy for checking if everything has been wiped out and adding to the pool as needed.

 You can use the optional argument `createIfNull` to create a new Game Object if no dead ones were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no dead children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first dead child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstDead](phaser.group#getFirstDead)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2135](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2135))   ### 
getFirstExists(exists, createIfNull, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Get the first display object that exists, or doesn't exist.

 You can use the optional argument `createIfNull` to create a new Game Object if none matching your exists argument were found in this Group.

 It works by calling `Group.create` passing it the parameters given to this method, and returning the new child.

 If a child *was* found , `createIfNull` is `false` and you provided the additional arguments then the child  
will be reset and/or have a new texture loaded on it. This is handled by `Group.resetChild`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `exists` | boolean |  <optional> |  true  | If true, find the first existing child; otherwise find the first non-existing child. |
| `createIfNull` | boolean |  <optional> |  false  | If `true` and no alive children are found a new one is created. |
| `x` | number |  <optional> |  | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> |  | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The first child, or `null` if none found and `createIfNull` was false.

    Inherited From * [Phaser.Group#getFirstExists](phaser.group#getFirstExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2071](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2071))   ### 
getFurthestFrom(object, callback, callbackContext) → {any}

  Get the child furthest away from the given Object, with optional callback to filter children.

 This can be a Sprite, Group, Image or any object with public x and y properties.

 'furthest away' is determined by the distance from the objects `x` and `y` properties compared to the childs `x` and `y` properties.

 You can use the optional `callback` argument to apply your own filter to the distance checks.  
If the child is closer then the previous child, it will be sent to `callback` as the first argument,  
with the distance as the second. The callback should return `true` if it passes your  
filtering criteria, otherwise it should return `false`.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `object` | any |  | The object used to determine the distance. This can be a Sprite, Group, Image or any object with public x and y properties. |
| `callback` | function |  <optional> | The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, with the distance as the second. It should return `true` if the child passes the matching criteria. |
| `callbackContext` | object |  <optional> | The context in which the function should be called (usually 'this'). |

 ##### Returns

   any -   The child furthest from the given object, or `null` if no child was found.

    Inherited From * [Phaser.Group#getFurthestFrom](phaser.group#getFurthestFrom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2282](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2282))   ### 
getIndex(child) → {integer}

  Get the index position of the given child in this group, which should match the child's `z` property.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to get the index for. |

 ##### Returns

   integer -   The index of the child or -1 if it's not a member of this group.

    Inherited From * [Phaser.Group#getIndex](phaser.group#getIndex)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1029](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1029))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
getRandom(startIndex, length) → {any}

  Returns a random child from the group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | Offset from the front of the group (lowest child). |
| `length` | integer |  <optional> |  (to top)  | Restriction on the number of values you want to randomly select from. |

 ##### Returns

   any -   A random child of this Group.

    Inherited From * [Phaser.Group#getRandom](phaser.group#getRandom)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2350](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2350))   ### 
getRandomExists(startIndex, endIndex) → {any}

  Returns a random child from the Group that has `exists` set to `true`.

 Optionally you can specify a start and end index. For example if this Group had 100 children,  
and you set `startIndex` to 0 and `endIndex` to 50, it would return a random child from only  
the first 50 children in the Group.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  <optional> |  0  | The first child index to start the search from. |
| `endIndex` | integer |  <optional> |  | The last child index to search up to. |

 ##### Returns

   any -   A random child of this Group that exists.

    Inherited From * [Phaser.Group#getRandomExists](phaser.group#getRandomExists)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2372](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2372))   ### 
getTop() → {any}

  Return the child at the top of this group.

 The top child is the child displayed (rendered) above every other child.

  ##### Returns

   any -   The child at the top of the Group.

    Inherited From * [Phaser.Group#getTop](phaser.group#getTop)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2204](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2204))   ### 
hasProperty(child, key) → {boolean}

  Checks if the child has the given property.

 Will scan up to 4 levels deep only.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to check for the existence of the property on. |
| `key` | Array.<string> | An array of strings that make up the property. |

 ##### Returns

   boolean -   True if the child has the property, otherwise false.

    Inherited From * [Phaser.Group#hasProperty](phaser.group#hasProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1104](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1104))   ### 
iterate(key, value, returnType, callback, callbackContext, args) → {any}

  Iterates over the children of the group performing one of several actions for matched children.

 A child is considered a match when it has a property, named `key`, whose value is equal to `value`  
according to a strict equality comparison.

 The result depends on the `returnType`:

 * [RETURN\_TOTAL](phaser.group#.RETURN_TOTAL):  
 The callback, if any, is applied to all matching children. The number of matched children is returned.
* [RETURN\_NONE](phaser.group#.RETURN_NONE):  
 The callback, if any, is applied to all matching children. No value is returned.
* [RETURN\_CHILD](phaser.group#.RETURN_CHILD):  
 The callback, if any, is applied to the *first* matching child and the *first* matched child is returned.  
 If there is no matching child then null is returned.

 If `args` is specified it must be an array. The matched child will be assigned to the first  
element and the entire array will be applied to the callback function.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The child property to check, i.e. 'exists', 'alive', 'health' |
| `value` | any |  |  | A child matches if `child[key] === value` is true. |
| `returnType` | integer |  |  | How to iterate the children and what to return. |
| `callback` | function |  <optional> |  null  | Optional function that will be called on each matching child. The matched child is supplied as the first argument. |
| `callbackContext` | object |  <optional> |  | The context in which the function should be called (usually 'this'). |
| `args` | Array.<any> |  <optional> |  (none)  | The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child. |

 ##### Returns

   any -   Returns either an integer (for RETURN\_TOTAL), the first matched child (for RETURN\_CHILD), or null.

    Inherited From * [Phaser.Group#iterate](phaser.group#iterate)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1976](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1976))   ### 
moveAll(group, silent) → {[Phaser.Group](phaser.group)}

  Moves all children from this Group to the Group given.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `group` | [Phaser.Group](phaser.group) |  |  | The new Group to which the children will be moved to. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch the `onAddedToGroup` event for the new Group. |

 ##### Returns

   [Phaser.Group](phaser.group) -   The Group to which all the children were moved.

    Inherited From * [Phaser.Group#moveAll](phaser.group#moveAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2479](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2479))   ### 
moveDown(child) → {any}

  Moves the given child down one place in this group unless it's already at the bottom.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move down in the group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#moveDown](phaser.group#moveDown)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 969](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L969))   ### 
moveUp(child) → {any}

  Moves the given child up one place in this group unless it's already at the top.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to move up in the group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#moveUp](phaser.group#moveUp)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 945](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L945))   ### 
multiplyAll(property, amount, checkAlive, checkVisible)

  Multiplies the given property by the amount on all children in this group.

 `Group.multiplyAll('x', 2)` will x2 the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to multiply, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#multiplyAll](phaser.group#multiplyAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1420](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1420))   ### 
next() → {any}

  Advances the group cursor to the next (higher) object in the group.

 If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child).

  ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#next](phaser.group#next)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 833](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L833))   ### 
<internal> postUpdate()

  The core postUpdate - as called by World.

   Inherited From * [Phaser.Group#postUpdate](phaser.group#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1656](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1656))   ### 
<internal> preUpdate()

  The core preUpdate - as called by World.

   Inherited From * [Phaser.Group#preUpdate](phaser.group#preUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1611](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1611))   ### 
previous() → {any}

  Moves the group cursor to the previous (lower) child in the group.

 If the cursor is at the start of the group (bottom child) it is moved to the end (top child).

  ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#previous](phaser.group#previous)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 862](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L862))   ### 
remove(child, destroy, silent) → {boolean}

  Removes the given child from this group.

 This will dispatch an `onRemovedFromGroup` event from the child (if it has one), and optionally destroy the child.

 If the group cursor was referring to the removed child it is updated to refer to the next child.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to remove. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on the removed child. |
| `silent` | boolean |  <optional> |  false  | If true the the child will not dispatch the `onRemovedFromGroup` event. |

 ##### Returns

   boolean -   true if the child was removed from this group, otherwise false.

    Inherited From * [Phaser.Group#remove](phaser.group#remove)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2431](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2431))   ### 
removeAll(destroy, silent, destroyTexture)

  Removes all children from this Group, but does not remove the group from its parent.

 The children can be optionally destroyed as they are removed.

 You can also optionally also destroy the BaseTexture the Child is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |
| `destroyTexture` | boolean |  <optional> |  false  | If true, and if the `destroy` argument is also true, the BaseTexture belonging to the Child is also destroyed. Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Group#removeAll](phaser.group#removeAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2508](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2508))   ### 
removeBetween(startIndex, endIndex, destroy, silent)

  Removes all children from this group whose index falls beteen the given startIndex and endIndex values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `startIndex` | integer |  |  | The index to start removing children from. |
| `endIndex` | integer |  <optional> |  | The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group. |
| `destroy` | boolean |  <optional> |  false  | If true `destroy` will be invoked on each removed child. |
| `silent` | boolean |  <optional> |  false  | If true the children will not dispatch their `onRemovedFromGroup` events. |

  Inherited From * [Phaser.Group#removeBetween](phaser.group#removeBetween)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2556](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2556))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
removeFromHash(child) → {boolean}

  Removes a child of this Group from the hash array.  
This call will return false if the child is not in the hash.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The display object to remove from this Groups hash. Must be a member of this Group and in the hash. |

 ##### Returns

   boolean -   True if the child was successfully removed from the hash, otherwise false.

    Inherited From * [Phaser.Group#removeFromHash](phaser.group#removeFromHash)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 464](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L464))   ### 
replace(oldChild, newChild) → {any}

  Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.

 If `Group.enableBody` is set, then a physics body will be created on the object, so long as one does not already exist.

 If `Group.inputEnableChildren` is set, then an Input Handler will be created on the object, so long as one does not already exist.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `oldChild` | any | The child in this group that will be replaced. |
| `newChild` | any | The child to be inserted into this group. |

 ##### Returns

   any -   Returns the oldChild that was replaced within this group.

    Inherited From * [Phaser.Group#replace](phaser.group#replace)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1065](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1065))   ### 
resetChild(child, x, y, key, frame) → {[DisplayObject](global#DisplayObject)}

  Takes a child and if the `x` and `y` arguments are given it calls `child.reset(x, y)` on it.

 If the `key` and optionally the `frame` arguments are given, it calls `child.loadTexture(key, frame)` on it.

 The two operations are separate. For example if you just wish to load a new texture then pass `null` as the x and y values.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) |  | The child to reset and/or load the texture on. |
| `x` | number |  <optional> | The x coordinate to reset the child to. The value is in relation to the group.x point. |
| `y` | number |  <optional> | The y coordinate to reset the child to. The value is in relation to the group.y point. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  <optional> | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> | If this Sprite 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. |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was reset: usually a [Phaser.Sprite](phaser.sprite).

    Inherited From * [Phaser.Group#resetChild](phaser.group#resetChild)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2165))   ### 
resetCursor(index) → {any}

  Sets the group cursor to the first child in the group.

 If the optional index parameter is given it sets the cursor to the object at that index instead.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `index` | integer |  <optional> |  0  | Set the cursor to point to a specific index. |

 ##### Returns

   any -   The child the cursor now points to.

    Inherited From * [Phaser.Group#resetCursor](phaser.group#resetCursor)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 806](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L806))   ### 
reverse()

  Reverses all children in this group.

 This operation applies only to immediate children and does not propagate to subgroups.

   Inherited From * [Phaser.Group#reverse](phaser.group#reverse)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1015](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1015))   ### 
sendToBack(child) → {any}

  Sends the given child to the bottom of this group so it renders below all other children.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | any | The child to send to the bottom of this group. |

 ##### Returns

   any -   The child that was moved.

    Inherited From * [Phaser.Group#sendToBack](phaser.group#sendToBack)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 926](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L926))   ### 
set(child, key, value, checkAlive, checkVisible, operation, force) → {boolean}

  Quickly set a property on a single child of this group to a new value.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | [Phaser.Sprite](phaser.sprite) |  |  | The child to set the property on. |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then the child will only be updated if alive=true. |
| `checkVisible` | boolean |  <optional> |  false  | If set then the child will only be updated if visible=true. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Inherited From * [Phaser.Group#set](phaser.group#set)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1246](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1246))   ### 
setAll(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group to a new value.

 This call doesn't descend down children, so if you have a Group inside of this group, the property will be set on the group but not its children.  
If you need that ability please see `Group.setAllChildren`.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Inherited From * [Phaser.Group#setAll](phaser.group#setAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1277](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1277))   ### 
setAllChildren(key, value, checkAlive, checkVisible, operation, force)

  Quickly set the same property across all children of this group, and any child Groups, to a new value.

 If this group contains other Groups then the same property is set across their children as well, iterating down until it reaches the bottom.  
Unlike with `setAll` the property is NOT set on child Groups itself.

 The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  |  | The property, as a string, to be set. For example: 'body.velocity.x' |
| `value` | any |  |  | The value that will be set. |
| `checkAlive` | boolean |  <optional> |  false  | If set then only children with alive=true will be updated. This includes any Groups that are children. |
| `checkVisible` | boolean |  <optional> |  false  | If set then only children with visible=true will be updated. This includes any Groups that are children. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

  Inherited From * [Phaser.Group#setAllChildren](phaser.group#setAllChildren)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1312](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1312))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setProperty(child, key, value, operation, force) → {boolean}

  Sets a property to the given value on the child. The operation parameter controls how the value is set.

 The operations are:

 * 0: set the existing value to the given value; if force is `true` a new property will be created if needed
* 1: will add the given value to the value already present.
* 2: will subtract the given value from the value already present.
* 3: will multiply the value already present by the given value.
* 4: will divide the value already present by the given value.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `child` | any |  |  | The child to set the property value on. |
| `key` | array |  |  | An array of strings that make up the property that will be set. |
| `value` | any |  |  | The value that will be set. |
| `operation` | integer |  <optional> |  0  | Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. |
| `force` | boolean |  <optional> |  false  | If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. |

 ##### Returns

   boolean -   True if the property was set, false if not.

    Inherited From * [Phaser.Group#setProperty](phaser.group#setProperty)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1139))   ### 
sort(key, order)

  Sort the children in the group according to a particular key and ordering.

 Call this function to sort the group according to a particular key value and order.

 For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`.

 Internally this uses a standard JavaScript Array sort, so everything that applies there also applies here, including  
alphabetical sorting, mixing strings and numbers, and Unicode sorting. See MDN for more details.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string |  <optional> |  'z'  | The name of the property to sort on. Defaults to the objects z-depth value. |
| `order` | integer |  <optional> |  Phaser.Group.SORT\_ASCENDING  | Order ascending ([SORT\_ASCENDING](phaser.group#.SORT_ASCENDING)) or descending ([SORT\_DESCENDING](phaser.group#.SORT_DESCENDING)). |

  Inherited From * [Phaser.Group#sort](phaser.group#sort)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1855](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1855))   ### 
subAll(property, amount, checkAlive, checkVisible)

  Subtracts the amount from the given property on all children in this group.

 `Group.subAll('x', 10)` will minus 10 from the child.x value for each child.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `property` | string | The property to decrement, for example 'body.velocity.x' or 'angle'. |
| `amount` | number | The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. |
| `checkAlive` | boolean | If true the property will only be changed if the child is alive. |
| `checkVisible` | boolean | If true the property will only be changed if the child is visible. |

  Inherited From * [Phaser.Group#subAll](phaser.group#subAll)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1403](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1403))   ### 
swap(child1, child2)

  Swaps the position of two children in this group.

 Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child1` | any | The first child to swap. |
| `child2` | any | The second child to swap. |

  Inherited From * [Phaser.Group#swap](phaser.group#swap)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 891](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L891))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
<internal> update()

  The core update - as called by World.

   Inherited From * [Phaser.Group#update](phaser.group#update)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 1639](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L1639))   ### 
updateSpriteTransform()

  Core update.

   Source code: [physics/p2/BodyDebug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js) ([Line 72](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/p2/BodyDebug.js#L72))   ### 
<internal> updateZ()

  Internal method that re-applies all of the children's Z values.

 This must be called whenever children ordering is altered so that their `z` indices are correctly updated.

   Inherited From * [Phaser.Group#updateZ](phaser.group#updateZ)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 663](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L663))   ### 
xy(index, x, y)

  Positions the child found at the given index within this group to the given x and y coordinates.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | integer | The index of the child in the group to set the position of. |
| `x` | number | The new x position of the child. |
| `y` | number | The new y position of the child. |

  Inherited From * [Phaser.Group#xy](phaser.group#xy)
 Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 993](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L993))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.P2.BodyDebug.html>

Class: Phaser.Component.Bounds
==============================

 Constructor
-----------

 ### 
new Bounds()

  The Bounds component contains properties related to the bounds of the Game Object.

   Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L12))   Public Properties
-----------------

  ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))    Public Methods
--------------

  ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Bounds.html>

Class: Phaser.Component.Delta
=============================

 Constructor
-----------

 ### 
new Delta()

  The Delta component provides access to delta values between the Game Objects current and previous position.

   Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L12))   Public Properties
-----------------

  ### 
[readonly] deltaX : number

  Returns the delta x value. The difference between world.x now and in the previous frame.

 The value will be positive if the Game Object has moved to the right or negative if to the left.

   Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L24))   ### 
[readonly] deltaY : number

  Returns the delta y value. The difference between world.y now and in the previous frame.

 The value will be positive if the Game Object has moved down or negative if up.

   Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L42))   ### 
[readonly] deltaZ : number

  Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

   Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L58))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Delta.html>

Class: Phaser.Component.Destroy
===============================

 Constructor
-----------

 ### 
new Destroy()

  The Destroy component is responsible for destroying a Game Object.

   Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L12))   Public Properties
-----------------

  ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))    Public Methods
--------------

  ### 
destroy(destroyChildren, destroyTexture)

  Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present  
and nulls its reference to `game`, freeing it up for garbage collection.

 If this Game Object has the Events component it will also dispatch the `onDestroy` event.

 You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called as well? |
| `destroyTexture` | boolean |  <optional> |  false  | Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L37))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Destroy.html>

Class: Phaser.Component.FixedToCamera
=====================================

 Constructor
-----------

 ### 
new FixedToCamera()

  The FixedToCamera component enables a Game Object to be rendered relative to the game camera coordinates, regardless  
of where in the world the camera is. This is used for things like sticking game UI to the camera that scrolls as it moves around the world.

   Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 13](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L13))   Public Properties
-----------------

  ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))    Public Methods
--------------

  ### 
<static> postUpdate()

  The FixedToCamera component postUpdate handler.  
Called automatically by the Game Object.

   Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L21))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.FixedToCamera.html>

Class: global
=============

 Constructor
-----------

 Public Properties
-----------------

  ### 
<constant> ANGLE\_DOWN : integer

  The Angle (in degrees) a Game Object needs to be set to in order to face down.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 339](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L339))   ### 
<constant> ANGLE\_LEFT : integer

  The Angle (in degrees) a Game Object needs to be set to in order to face left.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 346](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L346))   ### 
<constant> ANGLE\_NORTH\_EAST : integer

  The Angle (in degrees) a Game Object needs to be set to in order to face north east.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 360](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L360))   ### 
<constant> ANGLE\_NORTH\_WEST : integer

  The Angle (in degrees) a Game Object needs to be set to in order to face north west.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 367](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L367))   ### 
<constant> ANGLE\_RIGHT : integer

  The Angle (in degrees) a Game Object needs to be set to in order to face right.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 353](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L353))   ### 
<constant> ANGLE\_SOUTH\_EAST : integer

  The Angle (in degrees) a Game Object needs to be set to in order to face south east.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 374](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L374))   ### 
<constant> ANGLE\_SOUTH\_WEST : integer

  The Angle (in degrees) a Game Object needs to be set to in order to face south west.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 381](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L381))   ### 
<constant> ANGLE\_UP : integer

  The Angle (in degrees) a Game Object needs to be set to in order to face up.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 332](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L332))   ### 
<constant> AUTO : integer

  AUTO renderer - picks between WebGL or Canvas based on device.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L31))   ### 
<constant> BITMAPDATA : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L185))   ### 
<constant> BITMAPTEXT : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 136](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L136))   ### 
<constant> blendModes

  Various blend modes supported by Pixi.

 IMPORTANT: The WebGL renderer only supports the NORMAL, ADD, MULTIPLY and SCREEN blend modes.

   ##### Properties:

  

| Name | Type | Description |
| --- | --- | --- |
| `blendModes.NORMAL` | Number |  |
| `blendModes.ADD` | Number |  |
| `blendModes.MULTIPLY` | Number |  |
| `blendModes.SCREEN` | Number |  |
| `blendModes.OVERLAY` | Number |  |
| `blendModes.DARKEN` | Number |  |
| `blendModes.LIGHTEN` | Number |  |
| `blendModes.COLOR_DODGE` | Number |  |
| `blendModes.COLOR_BURN` | Number |  |
| `blendModes.HARD_LIGHT` | Number |  |
| `blendModes.SOFT_LIGHT` | Number |  |
| `blendModes.DIFFERENCE` | Number |  |
| `blendModes.EXCLUSION` | Number |  |
| `blendModes.HUE` | Number |  |
| `blendModes.SATURATION` | Number |  |
| `blendModes.COLOR` | Number |  |
| `blendModes.LUMINOSITY` | Number |  |

  Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 499](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L499))   ### 
<constant> BOTTOM\_CENTER : integer

  A constant representing a bottom-center alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 465](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L465))   ### 
<constant> BOTTOM\_LEFT : integer

  A constant representing a bottom-left alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 458](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L458))   ### 
<constant> BOTTOM\_RIGHT : integer

  A constant representing a bottom-right alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 472](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L472))   ### 
<constant> BUTTON : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 101](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L101))   ### 
<constant> CANVAS : integer

  Canvas Renderer.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L38))   ### 
<constant> CANVAS\_FILTER : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 192](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L192))   ### 
<constant> CENTER : integer

  A constant representing a center alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 430](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L430))   ### 
<constant> CIRCLE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 241](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L241))   ### 
<constant> CREATURE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 283](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L283))   ### 
<constant> DOWN : integer

  Direction constant.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L87))   ### 
<constant> ELLIPSE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 206](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L206))   ### 
<constant> EMITTER : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L171))   ### 
<constant> GAMES :array

  An array of Phaser game instances.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L24))   ### 
<constant> GRAPHICS : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L115))   ### 
<constant> GROUP : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 143](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L143))   ### 
<constant> HEADLESS : integer

  Headless renderer (not visual output)

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L52))   ### 
<constant> HORIZONTAL : integer

  A horizontal orientation

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 304](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L304))   ### 
<constant> IMAGE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 108](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L108))   ### 
<constant> LANDSCAPE : integer

  A landscape orientation

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 318](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L318))   ### 
<constant> LEFT : integer

  Direction constant.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L66))   ### 
<constant> LEFT\_BOTTOM : integer

  A constant representing a left-bottom alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 423](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L423))   ### 
<constant> LEFT\_CENTER : integer

  A constant representing a left-center alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 416](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L416))   ### 
<constant> LEFT\_TOP : integer

  A constant representing a left-top alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 409](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L409))   ### 
<constant> LINE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 255](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L255))   ### 
<constant> MATRIX : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 262](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L262))   ### 
<constant> NONE : integer

  Direction constant.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L59))   ### 
<constant> PENDING\_ATLAS : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 297](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L297))   ### 
<constant> POINT : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 269](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L269))   ### 
<constant> POINTER : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 227](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L227))   ### 
<constant> POLYGON : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 178](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L178))   ### 
<constant> PORTRAIT : integer

  A portrait orientation

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 325](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L325))   ### 
<constant> RECTANGLE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L248))   ### 
<constant> RENDERTEXTURE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L150))   ### 
<constant> RETROFONT : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L220))   ### 
<constant> RIGHT : integer

  Direction constant.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L73))   ### 
<constant> RIGHT\_BOTTOM : integer

  A constant representing a right-bottom alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 451](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L451))   ### 
<constant> RIGHT\_CENTER : integer

  A constant representing a right-center alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 444](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L444))   ### 
<constant> RIGHT\_TOP : integer

  A constant representing a right-top alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L437))   ### 
<constant> ROPE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 234](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L234))   ### 
<constant> ROUNDEDRECTANGLE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 276](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L276))   ### 
<constant> scaleModes

  The scale modes that are supported by Pixi.

 The DEFAULT scale mode affects the default scaling mode of future operations.  
It can be re-assigned to either LINEAR or NEAREST, depending upon suitability.

   ##### Properties:

  

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `Phaser.scaleModes` | Object |  |  |
| `scaleModes.DEFAULT` | Number |  LINEAR  |  |
| `scaleModes.LINEAR` | Number |  | Smooth scaling |
| `scaleModes.NEAREST` | Number |  | Pixelating scaling |

  Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 532](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L532))   ### 
<constant> SPRITE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L94))   ### 
<constant> SPRITEBATCH : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L213))   ### 
<constant> TEXT : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 122](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L122))   ### 
<constant> TILEMAP : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 157](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L157))   ### 
<constant> TILEMAPLAYER : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 164](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L164))   ### 
<constant> TILESPRITE : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L129))   ### 
<constant> TOP\_CENTER : integer

  A constant representing a top-center alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 395](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L395))   ### 
<constant> TOP\_LEFT : integer

  A constant representing a top-left alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 388](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L388))   ### 
<constant> TOP\_RIGHT : integer

  A constant representing a top-right alignment or position.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 402](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L402))   ### 
<constant> UP : integer

  Direction constant.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L80))   ### 
<constant> VERSION : string

  The Phaser version number.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L17))   ### 
<constant> VERTICAL : integer

  A vertical orientation

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 311](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L311))   ### 
<constant> VIDEO : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 290](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L290))   ### 
<constant> WEBGL : integer

  WebGL Renderer.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L45))   ### 
<constant> WEBGL\_FILTER : integer

  Game Object type.

   Source code: [Phaser.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/Phaser.js#L199))    Public Methods
--------------

  ### 
displayList(displayObject)

  Call this function from the Dev Tools console.

 It will scan the display list and output all of the Objects it finds, and their renderOrderIDs.

 **Note** Requires a browser that supports console.group and console.groupEnd (such as Chrome)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `displayObject` | Object |  <optional> | The displayObject level display object to start from. Defaults to the World. |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 844](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L844))   ### 
emit(eventName) → {Boolean}

  Emit an event to all registered event listeners.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `eventName` | String | The name of the event. |

 ##### Returns

   Boolean -   Indication if we've emitted an event.

    Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L54))   ### 
listeners(eventName) → {Array}

  Return a list of assigned event listeners.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `eventName` | String | The events that should be listed. |

 ##### Returns

   Array -   An array of listener functions

    Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 41](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L41))   ### 
mixin(object)

  Mixes in the properties of the EventTarget prototype onto another object

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `object` | Object | The obj to mix into |

  Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L34))   ### 
off(eventName, callback)

  Remove event listeners.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `eventName` | String | The event we want to remove. |
| `callback` | function | The listener that we need to find. |

  Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 143](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L143))   ### 
on(eventName, callback)

  Register a new EventListener for the given event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `eventName` | String | Name of the event. |
| `callback` | Functon | fn Callback function. |

  Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L107))   ### 
once(eventName, callback)

  Add an EventListener that's only called once.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `eventName` | String | Name of the event. |
| `callback` | function | Callback function. |

  Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L124))   ### 
Phaser.Path#numPoints return {number} The total number of PathPoints in this Path.()

  The total number of PathPoints in this Path.

   Source code: [plugins/path/Path.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/Path.js) ([Line 536](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/Path.js#L536))   ### 
removeAllListeners(eventName)

  Remove all listeners or only the listeners for the specified event.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `eventName` | String | The event you want to remove all listeners for. |

  Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 173](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L173))   ### 
stopImmediatePropagation()

  Stops the propagation of events to sibling listeners (no longer calls any listeners).

   Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 277](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L277))   ### 
stopPropagation()

  Stops the propagation of events up the scene graph (prevents bubbling).

   Source code: [plugins/path/EventTarget.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js) ([Line 268](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/path/EventTarget.js#L268))    Type Definitions
----------------

  ### DisplayObject

  A display object is any object that can be rendered in the Phaser/pixi.js scene graph.

 This includes [Phaser.Group](phaser.group) (groups are display objects!),  
[Phaser.Sprite](phaser.sprite), [Phaser.Button](phaser.button), [Phaser.Text](phaser.text)  
as well as PIXI.DisplayObject and all derived types.

   Source code: [core/Group.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js) ([Line 2958](https://github.com/photonstorm/phaser/tree/v2.6.2/src/core/Group.js#L2958))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/global.html>

Class: Phaser.Component.Health
==============================

 Constructor
-----------

 ### 
new Health()

  The Health component provides the ability for Game Objects to have a `health` property  
that can be damaged and reset through game code.  
Requires the LifeSpan component.

   Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L14))   Public Properties
-----------------

  ### 
damage

  Damages the Game Object. This removes the given amount of health from the `health` property.

 If health is taken below or is equal to zero then the `kill` method is called.

   Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L46))   ### 
heal

  Heal the Game Object. This adds the given amount of health to the `health` property.

   Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L90))   ### 
health : number

  The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

 It can be used in combination with the `damage` method or modified directly.

   Default Value * 1
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L26))   ### 
maxHealth : number

  The Game Objects maximum health value. This works in combination with the `heal` method to ensure  
the health value never exceeds the maximum.

   Default Value * 100
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L35))   ### 
setHealth

  Sets the health property of the Game Object to the given amount.  
Will never exceed the `maxHealth` value.

   Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L70))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Health.html>

Class: Phaser.Component.InCamera
================================

 Constructor
-----------

 ### 
new InCamera()

  The InCamera component checks if the Game Object intersects with the Game Camera.

   Source code: [gameobjects/components/InCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InCamera.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InCamera.js#L12))   Public Properties
-----------------

  ### 
[readonly] inCamera : boolean

  Checks if this Game Objects bounds intersects with the Game Cameras bounds.

 It will be `true` if they intersect, or `false` if the Game Object is fully outside of the Cameras bounds.

 An object outside the bounds can be considered for camera culling if it has the AutoCull component.

   Source code: [gameobjects/components/InCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InCamera.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InCamera.js#L26))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.InCamera.html>

Class: Phaser.Color
===================

 Constructor
-----------

 ### 
new Color()

  The Phaser.Color class is a set of static methods that assist in color manipulation and conversion.

   Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L12))   Public Methods
--------------

  ### 
<static> blendAdd(a, b) → {integer}

  Adds the source and backdrop colors together and returns the value, up to a maximum of 255.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1058](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1058))   ### 
<static> blendAverage(a, b) → {integer}

  Takes the average of the source and backdrop colors.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1045](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1045))   ### 
<static> blendColorBurn(a, b) → {integer}

  Darkens the backdrop color to reflect the source color.  
Painting with white produces no change.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1217](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1217))   ### 
<static> blendColorDodge(a, b) → {integer}

  Brightens the backdrop color to reflect the source color.  
Painting with black produces no change.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1203))   ### 
<static> blendDarken(a, b) → {integer}

  Selects the darker of the backdrop and source colors.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1016](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1016))   ### 
<static> blendDifference(a, b) → {integer}

  Subtracts the darker of the two constituent colors from the lighter.

 Painting with white inverts the backdrop color; painting with black produces no change.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1084](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1084))   ### 
<static> blendExclusion(a, b) → {integer}

  Produces an effect similar to that of the Difference mode, but lower in contrast.  
Painting with white inverts the backdrop color; painting with black produces no change.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1127](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1127))   ### 
<static> blendGlow(a, b) → {integer}

  Glow blend mode. This mode is a variation of reflect mode with the source and backdrop colors swapped.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1331](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1331))   ### 
<static> blendHardLight(a, b) → {integer}

  Multiplies or screens the colors, depending on the source color value. 

 If the source color is lighter than 0.5, the backdrop is lightened, as if it were screened;  
this is useful for adding highlights to a scene. 

 If the source color is darker than 0.5, the backdrop is darkened, as if it were multiplied;  
this is useful for adding shadows to a scene. 

 The degree of lightening or darkening is proportional to the difference between the source color and 0.5;  
if it is equal to 0.5, the backdrop is unchanged.

 Painting with pure black or white produces pure black or white. The effect is similar to shining a harsh spotlight on the backdrop.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1179](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1179))   ### 
<static> blendHardMix(a, b) → {integer}

  Runs blendVividLight on the source and backdrop colors.  
If the resulting color is 128 or more, it receives a value of 255; if less than 128, a value of 0.  
Therefore, all blended pixels have red, green, and blue channel values of either 0 or 255.  
This changes all pixels to primary additive colors (red, green, or blue), white, or black.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1302](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1302))   ### 
<static> blendLighten(a, b) → {integer}

  Selects the lighter of the backdrop and source colors.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1003](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1003))   ### 
<static> blendLinearBurn(a, b) → {integer}

  An alias for blendSubtract, it simply sums the values of the two colors and subtracts 255.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1244](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1244))   ### 
<static> blendLinearDodge(a, b) → {integer}

  An alias for blendAdd, it simply sums the values of the two colors.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1231](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1231))   ### 
<static> blendLinearLight(a, b) → {integer}

  This blend mode combines Linear Dodge and Linear Burn (rescaled so that neutral colors become middle gray).  
Dodge applies to values of top layer lighter than middle gray, and burn to darker values.  
The calculation simplifies to the sum of bottom layer and twice the top layer, subtract 128. The contrast decreases.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1257](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1257))   ### 
<static> blendMultiply(a, b) → {integer}

  Multiplies the backdrop and source color values.  
The result color is always at least as dark as either of the two constituent  
colors. Multiplying any color with black produces black;  
multiplying with white leaves the original color unchanged.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1029](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1029))   ### 
<static> blendNegation(a, b) → {integer}

  Negation blend mode.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1099](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1099))   ### 
<static> blendNormal(a, b) → {integer}

  Blends the source color, ignoring the backdrop.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 990](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L990))   ### 
<static> blendOverlay(a, b) → {integer}

  Multiplies or screens the colors, depending on the backdrop color.  
Source colors overlay the backdrop while preserving its highlights and shadows.  
The backdrop color is not replaced, but is mixed with the source color to reflect the lightness or darkness of the backdrop.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1141](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1141))   ### 
<static> blendPhoenix(a, b) → {integer}

  Phoenix blend mode. This subtracts the lighter color from the darker color, and adds 255, giving a bright result.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1344](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1344))   ### 
<static> blendPinLight(a, b) → {integer}

  If the backdrop color (light source) is lighter than 50%, the blendDarken mode is used, and colors lighter than the backdrop color do not change.  
If the backdrop color is darker than 50% gray, colors lighter than the blend color are replaced, and colors darker than the blend color do not change.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1288](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1288))   ### 
<static> blendReflect(a, b) → {integer}

  Reflect blend mode. This mode is useful when adding shining objects or light zones to images.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1318](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1318))   ### 
<static> blendScreen(a, b) → {integer}

  Multiplies the complements of the backdrop and source color values, then complements the result.  
The result color is always at least as light as either of the two constituent colors.  
Screening any color with white produces white; screening with black leaves the original color unchanged.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1112))   ### 
<static> blendSoftLight(a, b) → {integer}

  Darkens or lightens the colors, depending on the source color value. 

 If the source color is lighter than 0.5, the backdrop is lightened, as if it were dodged;  
this is useful for adding highlights to a scene. 

 If the source color is darker than 0.5, the backdrop is darkened, as if it were burned in.  
The degree of lightening or darkening is proportional to the difference between the source color and 0.5;  
if it is equal to 0.5, the backdrop is unchanged.

 Painting with pure black or white produces a distinctly darker or lighter area, but does not result in pure black or white.  
The effect is similar to shining a diffused spotlight on the backdrop.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1156))   ### 
<static> blendSubtract(a, b) → {integer}

  Combines the source and backdrop colors and returns their value minus 255.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1071](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1071))   ### 
<static> blendVividLight(a, b) → {integer}

  This blend mode combines Color Dodge and Color Burn (rescaled so that neutral colors become middle gray).  
Dodge applies when values in the top layer are lighter than middle gray, and burn to darker values.  
The middle gray is the neutral color. When color is lighter than this, this effectively moves the white point of the bottom  
layer down by twice the difference; when it is darker, the black point is moved up by twice the difference. The perceived contrast increases.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | integer | The source color to blend, in the range 1 to 255. |
| `b` | integer | The backdrop color to blend, in the range 1 to 255. |

 ##### Returns

   integer -   The blended color value, in the range 1 to 255.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 1272](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L1272))   ### 
<static> componentToHex(color) → {string}

  Return a string containing a hex representation of the given color component.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | number | The color channel to get the hex value for, must be a value between 0 and 255. |

 ##### Returns

   string -   A string of length 2 characters, i.e. 255 = ff, 100 = 64.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 694](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L694))   ### 
<static> createColor(r, g, b, a, h, s, l, v) → {object}

  A utility function to create a lightweight 'color' object with the default components.  
Any components that are not specified will default to zero.

 This is useful when you want to use a shared color object for the getPixel and getPixelAt methods.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `r` | number |  <optional> |  0  | The red color component, in the range 0 - 255. |
| `g` | number |  <optional> |  0  | The green color component, in the range 0 - 255. |
| `b` | number |  <optional> |  0  | The blue color component, in the range 0 - 255. |
| `a` | number |  <optional> |  1  | The alpha color component, in the range 0 - 1. |
| `h` | number |  <optional> |  0  | The hue, in the range 0 - 1. |
| `s` | number |  <optional> |  0  | The saturation, in the range 0 - 1. |
| `l` | number |  <optional> |  0  | The lightness, in the range 0 - 1. |
| `v` | number |  <optional> |  0  | The value, in the range 0 - 1. |

 ##### Returns

   object -   The resulting object with r, g, b, a properties and h, s, l and v.

    Author:  * Matt DesLauriers (@mattdesl)

  Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 438](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L438))   ### 
<static> fromRGBA(rgba, out) → {object}

  A utility to convert an integer in 0xRRGGBBAA format to a color object.  
This does not rely on endianness.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `rgba` | number |  | An RGBA hex |
| `out` | object |  <optional> | The object to use, optional. |

 ##### Returns

   object -   A color object.

    Author:  * Matt DesLauriers (@mattdesl)

  Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 97](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L97))   ### 
<static> getAlpha(color) → {number}

  Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | number | In the format 0xAARRGGBB. |

 ##### Returns

   number -   The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)).

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 930](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L930))   ### 
<static> getAlphaFloat(color) → {number}

  Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | number | In the format 0xAARRGGBB. |

 ##### Returns

   number -   The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)).

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 942](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L942))   ### 
<static> getBlue(color) → {number}

  Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | number | In the format 0xAARRGGBB. |

 ##### Returns

   number -   The Blue component of the color, will be between 0 and 255 (0 being no color, 255 full Blue).

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 978](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L978))   ### 
<static> getColor(r, g, b) → {number}

  Given 3 color values this will return an integer representation of it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `r` | number | The red color component, in the range 0 - 255. |
| `g` | number | The green color component, in the range 0 - 255. |
| `b` | number | The blue color component, in the range 0 - 255. |

 ##### Returns

   number -   A native color value integer (format: 0xRRGGBB).

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 500](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L500))   ### 
<static> getColor32(a, r, g, b) → {number}

  Given an alpha and 3 color values this will return an integer representation of it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | number | The alpha color component, in the range 0 - 255. |
| `r` | number | The red color component, in the range 0 - 255. |
| `g` | number | The green color component, in the range 0 - 255. |
| `b` | number | The blue color component, in the range 0 - 255. |

 ##### Returns

   number -   A native color value integer (format: 0xAARRGGBB).

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 483](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L483))   ### 
<static> getGreen(color) → {number}

  Given a native color value (in the format 0xAARRGGBB) this will return the Green component, as a value between 0 and 255.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | number | In the format 0xAARRGGBB. |

 ##### Returns

   number -   The Green component of the color, will be between 0 and 255 (0 being no color, 255 full Green).

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 966](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L966))   ### 
<static> getRandomColor(min, max, alpha) → {number}

  Returns a random color value between black and white  
Set the min value to start each channel from the given offset.  
Set the max value to restrict the maximum color used per channel.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `min` | number |  <optional> |  0  | The lowest value to use for the color. |
| `max` | number |  <optional> |  255  | The highest value to use for the color. |
| `alpha` | number |  <optional> |  255  | The alpha value of the returning color (default 255 = fully opaque). |

 ##### Returns

   number -   32-bit color value with alpha.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 834](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L834))   ### 
<static> getRed(color) → {number}

  Given a native color value (in the format 0xAARRGGBB) this will return the Red component, as a value between 0 and 255.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | number | In the format 0xAARRGGBB. |

 ##### Returns

   number -   The Red component of the color, will be between 0 and 255 (0 being no color, 255 full Red).

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 954](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L954))   ### 
<static> getRGB(color) → {object}

  Return the component parts of a color as an Object with the properties alpha, red, green, blue.

 Alpha will only be set if it exist in the given color (0xAARRGGBB)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | number | Color in RGB (0xRRGGBB) or ARGB format (0xAARRGGBB). |

 ##### Returns

   object -   An Object with properties: alpha, red, green, blue (also r, g, b and a). Alpha will only be present if a color value > 16777215 was given.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 866](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L866))   ### 
<static> getWebRGB(color) → {string}

  Returns a CSS friendly string value from the given color.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | number | Object | Color in RGB (0xRRGGBB), ARGB format (0xAARRGGBB) or an Object with r, g, b, a properties. |

 ##### Returns

   string -   A string in the format: 'rgba(r,g,b,a)'

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 908](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L908))   ### 
<static> hexToColor(hex, out) → {object}

  Converts a hex string into a Phaser Color object.

 The hex string can supplied as `'#0033ff'` or the short-hand format of `'#03f'`; it can begin with an optional "#" or "0x", or be unprefixed. 

 An alpha channel is *not* supported.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `hex` | string |  | The color string in a hex format. |
| `out` | object |  <optional> | An object into which 3 properties will be created or set: r, g and b. If not provided a new object will be created. |

 ##### Returns

   object -   An object with the red, green and blue values set in the r, g and b properties.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 564](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L564))   ### 
<static> hexToRGB(hex) → {number}

  Converts a hex string into an integer color value.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `hex` | string | The hex string to convert. Can be in the short-hand format `#03f` or `#0033ff`. |

 ##### Returns

   number -   The rgb color value in the format 0xAARRGGBB.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 545](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L545))   ### 
<static> HSLColorWheel(s, l) → {array}

  Get HSL color wheel values in an array which will be 360 elements in size.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `s` | number |  <optional> |  0.5  | The saturation, in the range 0 - 1. |
| `l` | number |  <optional> |  0.5  | The lightness, in the range 0 - 1. |

 ##### Returns

   array -   An array containing 360 elements corresponding to the HSL color wheel.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 735](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L735))   ### 
<static> HSLtoRGB(h, s, l, out) → {object}

  Converts an HSL (hue, saturation and lightness) color value to RGB.  
Conversion forumla from http://en.wikipedia.org/wiki/HSL\_color\_space.  
Assumes HSL values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255].  
Based on code by Michael Jackson (https://github.com/mjijackson)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `h` | number |  | The hue, in the range 0 - 1. |
| `s` | number |  | The saturation, in the range 0 - 1. |
| `l` | number |  | The lightness, in the range 0 - 1. |
| `out` | object |  <optional> | An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. |

 ##### Returns

   object -   An object with the red, green and blue values set in the r, g and b properties.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L220))   ### 
<static> HSVColorWheel(s, v) → {array}

  Get HSV color wheel values in an array which will be 360 elements in size.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `s` | number |  <optional> |  1  | The saturation, in the range 0 - 1. |
| `v` | number |  <optional> |  1  | The value, in the range 0 - 1. |

 ##### Returns

   array -   An array containing 360 elements corresponding to the HSV color wheel.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 710](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L710))   ### 
<static> HSVtoRGB(h, s, v, out) → {object}

  Converts an HSV (hue, saturation and value) color value to RGB.  
Conversion forumla from http://en.wikipedia.org/wiki/HSL\_color\_space.  
Assumes HSV values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255].  
Based on code by Michael Jackson (https://github.com/mjijackson)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `h` | number |  | The hue, in the range 0 - 1. |
| `s` | number |  | The saturation, in the range 0 - 1. |
| `v` | number |  | The value, in the range 0 - 1. |
| `out` | object |  <optional> | An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. |

 ##### Returns

   object -   An object with the red, green and blue values set in the r, g and b properties.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 327](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L327))   ### 
<static> hueToColor(p, q, t) → {number}

  Converts a hue to an RGB color.  
Based on code by Michael Jackson (https://github.com/mjijackson)

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `p` | number |  |
| `q` | number |  |
| `t` | number |  |

 ##### Returns

   number -   The color component value.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 396](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L396))   ### 
<static> interpolateColor(color1, color2, steps, currentStep, alpha) → {number}

  Interpolates the two given colours based on the supplied step and currentStep properties.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color1` | number | The first color value. |
| `color2` | number | The second color value. |
| `steps` | number | The number of steps to run the interpolation over. |
| `currentStep` | number | The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two. |
| `alpha` | number | The alpha of the returned color. |

 ##### Returns

   number -   The interpolated color value.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 760](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L760))   ### 
<static> interpolateColorWithRGB(color, r, g, b, steps, currentStep) → {number}

  Interpolates the two given colours based on the supplied step and currentStep properties.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | number | The first color value. |
| `r` | number | The red color value, between 0 and 0xFF (255). |
| `g` | number | The green color value, between 0 and 0xFF (255). |
| `b` | number | The blue color value, between 0 and 0xFF (255). |
| `steps` | number | The number of steps to run the interpolation over. |
| `currentStep` | number | The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two. |

 ##### Returns

   number -   The interpolated color value.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 786](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L786))   ### 
<static> interpolateRGB(r1, g1, b1, r2, g2, b2, steps, currentStep) → {number}

  Interpolates the two given colours based on the supplied step and currentStep properties.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `r1` | number | The red color value, between 0 and 0xFF (255). |
| `g1` | number | The green color value, between 0 and 0xFF (255). |
| `b1` | number | The blue color value, between 0 and 0xFF (255). |
| `r2` | number | The red color value, between 0 and 0xFF (255). |
| `g2` | number | The green color value, between 0 and 0xFF (255). |
| `b2` | number | The blue color value, between 0 and 0xFF (255). |
| `steps` | number | The number of steps to run the interpolation over. |
| `currentStep` | number | The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two. |

 ##### Returns

   number -   The interpolated color value.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 810](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L810))   ### 
<static> packPixel(r, g, b, a) → {number}

  Packs the r, g, b, a components into a single integer, for use with Int32Array.  
If device is little endian then ABGR order is used. Otherwise RGBA order is used.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `r` | number | The red color component, in the range 0 - 255. |
| `g` | number | The green color component, in the range 0 - 255. |
| `b` | number | The blue color component, in the range 0 - 255. |
| `a` | number | The alpha color component, in the range 0 - 255. |

 ##### Returns

   number -   The packed color as uint32

    Author:  * Matt DesLauriers (@mattdesl)

  Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L14))   ### 
<static> RGBtoHSL(r, g, b, out) → {object}

  Converts an RGB color value to HSL (hue, saturation and lightness).  
Conversion forumla from http://en.wikipedia.org/wiki/HSL\_color\_space.  
Assumes RGB values are contained in the set [0, 255] and returns h, s and l in the set [0, 1].  
Based on code by Michael Jackson (https://github.com/mjijackson)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `r` | number |  | The red color component, in the range 0 - 255. |
| `g` | number |  | The green color component, in the range 0 - 255. |
| `b` | number |  | The blue color component, in the range 0 - 255. |
| `out` | object |  <optional> | An object into which 3 properties will be created, h, s and l. If not provided a new object will be created. |

 ##### Returns

   object -   An object with the hue, saturation and lightness values set in the h, s and l properties.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 161](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L161))   ### 
<static> RGBtoHSV(r, g, b, out) → {object}

  Converts an RGB color value to HSV (hue, saturation and value).  
Conversion forumla from http://en.wikipedia.org/wiki/HSL\_color\_space.  
Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1].  
Based on code by Michael Jackson (https://github.com/mjijackson)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `r` | number |  | The red color component, in the range 0 - 255. |
| `g` | number |  | The green color component, in the range 0 - 255. |
| `b` | number |  | The blue color component, in the range 0 - 255. |
| `out` | object |  <optional> | An object into which 3 properties will be created, h, s and v. If not provided a new object will be created. |

 ##### Returns

   object -   An object with the hue, saturation and value set in the h, s and v properties.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 271](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L271))   ### 
<static> RGBtoString(r, g, b, a, prefix) → {string}

  Converts the given color values into a string.  
If prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `r` | number |  |  | The red color component, in the range 0 - 255. |
| `g` | number |  |  | The green color component, in the range 0 - 255. |
| `b` | number |  |  | The blue color component, in the range 0 - 255. |
| `a` | number |  <optional> |  255  | The alpha color component, in the range 0 - 255. |
| `prefix` | string |  <optional> |  '#'  | The prefix used in the return string. If '#' it will return `#RRGGBB`, else `0xAARRGGBB`. |

 ##### Returns

   string -   A string containing the color values. If prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 516](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L516))   ### 
<static> toABGR(r, g, b, a) → {number}

  Converts RGBA components to a 32 bit integer in AABBGGRR format.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `r` | number | The red color component, in the range 0 - 255. |
| `g` | number | The green color component, in the range 0 - 255. |
| `b` | number | The blue color component, in the range 0 - 255. |
| `a` | number | The alpha color component, in the range 0 - 255. |

 ##### Returns

   number -   A RGBA-packed 32 bit integer

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L144))   ### 
<static> toRGBA(r, g, b, a) → {number}

  A utility to convert RGBA components to a 32 bit integer in RRGGBBAA format.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `r` | number | The red color component, in the range 0 - 255. |
| `g` | number | The green color component, in the range 0 - 255. |
| `b` | number | The blue color component, in the range 0 - 255. |
| `a` | number | The alpha color component, in the range 0 - 255. |

 ##### Returns

   number -   A RGBA-packed 32 bit integer

    Author:  * Matt DesLauriers (@mattdesl)

  Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 126](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L126))   ### 
<static> unpackPixel(rgba, out, hsl, hsv) → {object}

  Unpacks the r, g, b, a components into the specified color object, or a new  
object, for use with Int32Array. If little endian, then ABGR order is used when  
unpacking, otherwise, RGBA order is used. The resulting color object has the  
`r, g, b, a` properties which are unrelated to endianness.

 Note that the integer is assumed to be packed in the correct endianness. On little-endian  
the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA. If you want a  
endian-independent method, use fromRGBA(rgba) and toRGBA(r, g, b, a).

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rgba` | number |  |  | The integer, packed in endian order by packPixel. |
| `out` | object |  <optional> |  | An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. |
| `hsl` | boolean |  <optional> |  false  | Also convert the rgb values into hsl? |
| `hsv` | boolean |  <optional> |  false  | Also convert the rgb values into hsv? |

 ##### Returns

   object -   An object with the red, green and blue values set in the r, g and b properties.

    Author:  * Matt DesLauriers (@mattdesl)

  Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 40](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L40))   ### 
<static> updateColor(out) → {number}

  Takes a color object and updates the rgba, color and color32 properties.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `out` | object | The color object to update. |

 ##### Returns

   number -   A native color value integer (format: 0xAARRGGBB).

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 465](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L465))   ### 
<static> valueToColor(value, out) → {object}

  Converts a value - a "hex" string, a "CSS 'web' string", or a number - into red, green, blue, and alpha components.

 The value can be a string (see `hexToColor` and `webToColor` for the supported formats) or a packed integer (see `getRGB`).

 An alpha channel is *not* supported when specifying a hex string.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `value` | string | number |  | The color expressed as a recognized string format or a packed integer. |
| `out` | object |  <optional> | The object to use for the output. If not provided a new object will be created. |

 ##### Returns

   object -   The (`out`) object with the red, green, blue, and alpha values set as the r/g/b/a properties.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 641](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L641))   ### 
<static> webToColor(web, out) → {object}

  Converts a CSS 'web' string into a Phaser Color object.

 The web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1].

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `web` | string |  | The color string in CSS 'web' format. |
| `out` | object |  <optional> | An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created. |

 ##### Returns

   object -   An object with the red, green, blue and alpha values set in the r, g, b and a properties.

    Source code: [utils/Color.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js) ([Line 608](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Color.js#L608))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Color.html>

Class: Phaser.Utils.Debug
=========================

 Constructor
-----------

 ### 
new Debug(game)

  A collection of methods for displaying debug information about game objects.

 If your game is running in Canvas mode, then you should invoke all of the Debug methods from  
your games `render` function. This is because they are drawn directly onto the game canvas  
itself, so if you call any debug methods outside of `render` they are likely to be overwritten  
by the game itself.

 If your game is running in WebGL then Debug will create a Sprite that is placed at the top of the Stage display list and bind a canvas texture  
to it, which must be uploaded every frame. Be advised: this is very expensive, especially in browsers like Firefox. So please only enable Debug  
in WebGL mode if you really need it (or your desktop can cope with it well) and disable it for production!

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L23))   Public Properties
-----------------

  ### 
bmd : [Phaser.BitmapData](phaser.bitmapdata)

  In WebGL mode this BitmapData contains a copy of the debug canvas.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L38))   ### 
canvas :HTMLCanvasElement

  The canvas to which Debug calls draws.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L43))   ### 
columnWidth : number

  The spacing between columns.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L59))   ### 
context :CanvasRenderingContext2D

  The 2d context of the canvas.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 48](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L48))   ### 
currentAlpha : number

  The alpha of the Debug context, set before all debug information is rendered to it.

   Default Value * 1
 Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L87))   ### 
currentX : number

  The current X position the debug information will be rendered at.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L75))   ### 
currentY : number

  The current Y position the debug information will be rendered at.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 81](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L81))   ### 
dirty : boolean

  Does the canvas need re-rendering?

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L92))   ### 
font : string

  The font that the debug information is rendered in.

   Default Value * '14px Courier'
 Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L54))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L28))   ### 
lineHeight : number

  The line height between the debug text.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 64](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L64))   ### 
renderShadow : boolean

  Should the text be rendered with a slight shadow? Makes it easier to read on different types of background.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L69))   ### 
sprite : [Phaser.Image](phaser.image)

  If debugging in WebGL mode we need this.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 33](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L33))    Public Methods
--------------

  ### 
body(sprite, color, filled)

  Render a Sprites Physics body if it has one set. The body is rendered as a filled or stroked rectangle.  
This only works for Arcade Physics, Ninja Physics (AABB and Circle only) and Box2D Physics bodies.  
To display a P2 Physics body you should enable debug mode on the body when creating it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) |  |  | The Sprite who's body will be rendered. |
| `color` | string |  <optional> |  'rgba(0,255,0,0.4)'  | Color of the debug rectangle to be rendered. The format is a CSS color string such as '#ff0000' or 'rgba(255,0,0,0.5)'. |
| `filled` | boolean |  <optional> |  true  | Render the body as a filled rectangle (true) or a stroked rectangle (false) |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 747](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L747))   ### 
bodyInfo(sprite, x, y, color)

  Render a Sprites Physic Body information.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) |  |  | The sprite to be rendered. |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 781](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L781))   ### 
<internal> boot()

  Internal method that boots the debug displayer.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L98))   ### 
box2dBody(sprite, color)

  Renders 'debug draw' data for the given Box2D body.  
This uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) |  |  | The sprite whos body will be rendered. |
| `color` | string |  <optional> |  'rgb(0,255,0)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 828](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L828))   ### 
box2dWorld()

  Renders 'debug draw' data for the Box2D world if it exists.  
This uses the standard debug drawing feature of Box2D, so colors will be decided by  
the Box2D engine.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 810](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L810))   ### 
cameraInfo(camera, x, y, color)

  Render camera information including dimensions and location.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `camera` | [Phaser.Camera](phaser.camera) |  |  | The Phaser.Camera to show the debug information for. |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 285](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L285))   ### 
destroy()

  Destroy this object.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 877](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L877))   ### 
geom(object, color, filled)

  Renders a Rectangle.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object` | [Phaser.Rectangle](phaser.rectangle) | object |  |  | The geometry object to render. |
| `color` | string |  <optional> |  | Color of the debug info to be rendered (format is css color string). |
| `filled` | boolean |  <optional> |  true  | Render the objected as a filled (default, true) or a stroked (false) |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 645](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L645))   ### 
geom(object, color, filled, forceType)

  Renders a Phaser geometry object including Rectangle, Circle, Point or Line.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `object` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Circle](phaser.circle) | [Phaser.Point](phaser.point) | [Phaser.Line](phaser.line) |  |  | The geometry object to render. |
| `color` | string |  <optional> |  | Color of the debug info to be rendered (format is css color string). |
| `filled` | boolean |  <optional> |  true  | Render the objected as a filled (default, true) or a stroked (false) |
| `forceType` | number |  <optional> |  0  | Force rendering of a specific type. If 0 no type will be forced, otherwise 1 = Rectangle, 2 = Circle, 3 = Point and 4 = Line. |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 580](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L580))   ### 
inputInfo(x, y, color)

  Render debug information about the Input object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 433](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L433))   ### 
key(key, x, y, color)

  Renders Phaser.Key object information.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | [Phaser.Key](phaser.key) |  |  | The Key to render the information for. |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 412](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L412))   ### 
<internal> line()

  Internal method that outputs a single line of text split over as many columns as needed, one per parameter.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 226](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L226))   ### 
lineInfo(line, x, y, color)

  Renders Line information in the given color.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `line` | [Phaser.Line](phaser.line) |  |  | The Line to display the data for. |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 541](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L541))   ### 
pixel(x, y, color, size)

  Renders a single pixel at the given size.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | X position of the pixel to be rendered. |
| `y` | number |  |  | Y position of the pixel to be rendered. |
| `color` | string |  <optional> |  | Color of the pixel (format is css color string). |
| `size` | number |  <optional> |  2  | The 'size' to render the pixel at. |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 560](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L560))   ### 
pointer(pointer, hideIfUp, downColor, upColor, color)

  Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `pointer` | [Phaser.Pointer](phaser.pointer) |  |  | The Pointer you wish to display. |
| `hideIfUp` | boolean |  <optional> |  false  | Doesn't render the circle if the pointer is up. |
| `downColor` | string |  <optional> |  'rgba(0,255,0,0.5)'  | The color the circle is rendered in if down. |
| `upColor` | string |  <optional> |  'rgba(255,0,0,0.5)'  | The color the circle is rendered in if up (and hideIfUp is false). |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 331](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L331))   ### 
<internal> preUpdate()

  Internal method that clears the canvas (if a Sprite) ready for a new debug session.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 143](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L143))   ### 
quadTree(quadtree, color)

  Visually renders a QuadTree to the display.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `quadtree` | [Phaser.QuadTree](phaser.quadtree) | The quadtree to render. |
| `color` | string | The color of the lines in the quadtree. |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 707](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L707))   ### 
reset()

  Clears the Debug canvas.

   Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 162](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L162))   ### 
<internal> resize(scaleManager, width, height)

  Internal method that resizes the BitmapData and Canvas.  
Called by ScaleManager.onSizeChange only in WebGL mode.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `scaleManager` | [Phaser.ScaleManager](phaser.scalemanager) | The Phaser ScaleManager. |
| `width` | number | The new width of the game. |
| `height` | number | The new height of the game. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L124))   ### 
ropeSegments(rope, color, filled)

  Renders the Rope's segments. Note: This is really expensive as it has to calculate new segments every time you call it

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rope` | [Phaser.Rope](phaser.rope) |  |  | The rope to display the segments of. |
| `color` | string |  <optional> |  | Color of the debug info to be rendered (format is css color string). |
| `filled` | boolean |  <optional> |  true  | Render the rectangle as a fillRect (default, true) or a strokeRect (false) |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 472](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L472))   ### 
soundInfo(sound, x, y, color)

  Render Sound information, including decoded state, duration, volume and more.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sound` | [Phaser.Sound](phaser.sound) |  |  | The sound object to debug. |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L254))   ### 
spriteBounds(sprite, color, filled)

  Renders the Sprites bounds. Note: This is really expensive as it has to calculate the bounds every time you call it!

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) |  |  | The sprite to display the bounds of. |
| `color` | string |  <optional> |  | Color of the debug info to be rendered (format is css color string). |
| `filled` | boolean |  <optional> |  true  | Render the rectangle as a fillRect (default, true) or a strokeRect (false) |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 453](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L453))   ### 
spriteCoords(sprite, x, y, color)

  Renders the sprite coordinates in local, positional and world space.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) |  |  | The sprite to display the coordinates for. |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 515](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L515))   ### 
spriteInfo(sprite, x, y, color)

  Render debug infos (including name, bounds info, position and some other properties) about the Sprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) |  |  | The Sprite to display the information of. |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 492](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L492))   ### 
spriteInputInfo(sprite, x, y, color)

  Render Sprite Input Debug information.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `sprite` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) |  |  | The sprite to display the input data for. |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 391](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L391))   ### 
<internal> start(x, y, color, columnWidth)

  Internal method that resets and starts the debug output values.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  <optional> |  0  | The X value the debug info will start from. |
| `y` | number |  <optional> |  0  | The Y value the debug info will start from. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | The color the debug text will drawn in. |
| `columnWidth` | number |  <optional> |  0  | The spacing between columns. |

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 181](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L181))   ### 
<internal> stop()

  Internal method that stops the debug output.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 214](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L214))   ### 
text(text, x, y, color, font)

  Render a string of text.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `text` | string |  | The line of text to draw. |
| `x` | number |  | X position of the debug info to be rendered. |
| `y` | number |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> | Color of the debug info to be rendered (format is css color string). |
| `font` | string |  <optional> | The font of text to draw. |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 676](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L676))   ### 
timer(timer, x, y, color)

  Render Timer information.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `timer` | [Phaser.Timer](phaser.timer) |  |  | The Phaser.Timer to show the debug information for. |
| `x` | number |  |  | X position of the debug info to be rendered. |
| `y` | number |  |  | Y position of the debug info to be rendered. |
| `color` | string |  <optional> |  'rgb(255,255,255)'  | color of the debug info to be rendered. (format is css color string). |

  Source code: [utils/Debug.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js) ([Line 312](https://github.com/photonstorm/phaser/tree/v2.6.2/src/utils/Debug.js#L312))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Utils.Debug.html>

Class: Phaser.Component.InputEnabled
====================================

 Constructor
-----------

 ### 
new InputEnabled()

  The InputEnabled component allows a Game Object to have its own InputHandler and process input related events.

   Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L12))   Public Properties
-----------------

  ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.InputEnabled.html>

Class: Phaser.Component.InWorld
===============================

 Constructor
-----------

 ### 
new InWorld()

  The InWorld component checks if a Game Object is within the Game World Bounds.  
An object is considered as being "in bounds" so long as its own bounds intersects at any point with the World bounds.  
If the AutoCull component is enabled on the Game Object then it will check the Game Object against the Camera bounds as well.

   Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 14](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L14))   Public Properties
-----------------

  ### 
checkWorldBounds : boolean

  If this is set to `true` the Game Object checks if it is within the World bounds each frame. 

 When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

 If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

 It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

 When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L98))   ### 
[readonly] inWorld : boolean

  Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

   Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L129))   ### 
outOfBoundsKill : boolean

  If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

   Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L106))   ### 
outOfCameraBoundsKill : boolean

  If this and the `autoCull` property are both set to `true`, then the `kill` method  
is called as soon as the Game Object leaves the camera bounds.

   Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L115))    Public Methods
--------------

  ### 
<static> preUpdate()

  The InWorld component preUpdate handler.  
Called automatically by the Game Object.

   Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L22))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.InWorld.html>

Class: Phaser.Component.LifeSpan
================================

 Constructor
-----------

 ### 
new LifeSpan()

  LifeSpan Component Features.

   Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L12))   Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))    Public Methods
--------------

  ### 
<static> preUpdate()

  The LifeSpan component preUpdate handler.  
Called automatically by the Game Object.

   Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L20))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.LifeSpan.html>

Class: Phaser.Component.LoadTexture
===================================

 Constructor
-----------

 ### 
new LoadTexture()

  The LoadTexture component manages the loading of a texture into the Game Object and the changing of frames.

   Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L12))   Public Properties
-----------------

  ### 
frame : integer

  Gets or sets the current frame index of the texture being used to render this Game Object.

 To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,  
for example: `player.frame = 4`.

 If the frame index given doesn't exist it will revert to the first frame found in the texture.

 If you are using a texture atlas then you should use the `frameName` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L254))   ### 
frameName : string

  Gets or sets the current frame name of the texture being used to render this Game Object.

 To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use,  
for example: `player.frameName = "idle"`.

 If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

 If you are using a sprite sheet then you should use the `frame` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L279))    Public Methods
--------------

  ### 
loadTexture(key, frame, stopAnimation)

  Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

 If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

 You should only use `loadTexture` if you want to replace the base texture entirely.

 Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

 You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite.  
Doing this then sets the key to be the `frame` argument (the frame is set to zero). 

 This allows you to create sprites using `load.image` during development, and then change them  
to use a Texture Atlas later in development by simply searching your code for 'PENDING\_ATLAS'  
and swapping it to be the key of the atlas data.

 Note: You cannot use a RenderTexture as a texture for a TileSprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `stopAnimation` | boolean |  <optional> |  true  | If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. |

  Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L51))   ### 
resetFrame()

  Resets the texture frame dimensions that the Game Object uses for rendering.

   Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L232))   ### 
resizeFrame(parent, width, height)

  Resizes the Frame dimensions that the Game Object uses for rendering.

 You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData  
it can be useful to adjust the dimensions directly in this way.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | object | The parent texture object that caused the resize, i.e. a Phaser.Video object. |
| `width` | integer | The new width of the texture. |
| `height` | integer | The new height of the texture. |

  Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L220))   ### 
setFrame(frame)

  Sets the texture frame the Game Object uses for rendering.

 This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The Frame to be used by the texture. |

  Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L155))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.LoadTexture.html>

Class: Phaser.Component.Overlap
===============================

 Constructor
-----------

 ### 
new Overlap()

  The Overlap component allows a Game Object to check if it overlaps with the bounds of another Game Object.

   Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L12))   Public Methods
--------------

  ### 
overlap(displayObject) → {boolean}

  Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,  
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

 This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

 Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.  
It should be fine for low-volume testing where physics isn't required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Button](phaser.button) | PIXI.DisplayObject | The display object to check against. |

 ##### Returns

   boolean -   True if the bounds of this Game Object intersects at any point with the bounds of the given display object.

    Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L29))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Overlap.html>

Class: Phaser.Component.PhysicsBody
===================================

 Constructor
-----------

 ### 
new PhysicsBody()

  The PhysicsBody component manages the Game Objects physics body and physics enabling.  
It also overrides the x and y properties, ensuring that any manual adjustment of them is reflected in the physics body itself.

   Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 13](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L13))   Public Properties
-----------------

  ### 
body : [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated  
properties and methods via it.

 By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

 To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object  
and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

 You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

 Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5,  
so the physics body is centered on the Game Object.

 If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  ##### Type

 * [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L91))   ### 
x : number

  The position of the Game Object on the x axis relative to the local coordinates of the parent.

   Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L98))   ### 
y : number

  The position of the Game Object on the y axis relative to the local coordinates of the parent.

   Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L124))    Public Methods
--------------

  ### 
<static> postUpdate()

  The PhysicsBody component postUpdate handler.  
Called automatically by the Game Object.

   Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L61))   ### 
<static> preUpdate()

  The PhysicsBody component preUpdate handler.  
Called automatically by the Game Object.

   Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L21))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.PhysicsBody.html>

Class: Phaser.Component.Reset
=============================

 Constructor
-----------

 ### 
new Reset()

  The Reset component allows a Game Object to be reset and repositioned to a new location.

   Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L12))   Public Methods
--------------

  ### 
reset(x, y, health) → {PIXI.DisplayObject}

  Resets the Game Object.

 This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`,  
`visible` and `renderable` to true.

 If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

 If this Game Object has a Physics Body it will reset the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Game Object at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Game Object at. |
| `health` | number |  <optional> |  1  | The health to give the Game Object if it has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L30))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Reset.html>

Class: Phaser.Component.ScaleMinMax
===================================

 Constructor
-----------

 ### 
new ScaleMinMax()

  The ScaleMinMax component allows a Game Object to limit how far it can be scaled by its parent.

   Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L12))   Public Properties
-----------------

  ### 
scaleMax : [Phaser.Point](phaser.point)

  The maximum scale this Game Object will scale up to. 

 It allows you to prevent a parent from scaling this Game Object higher than the given value.

 Set it to `null` to remove the limit.

   Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L46))   ### 
scaleMin : [Phaser.Point](phaser.point)

  The minimum scale this Game Object will scale down to.

 It allows you to prevent a parent from scaling this Game Object lower than the given value.

 Set it to `null` to remove the limit.

   Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L36))   ### 
transformCallback : Function

  The callback that will apply any scale limiting to the worldTransform.

   Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L20))   ### 
transformCallbackContext : Object

  The context under which `transformCallback` is called.

   Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L26))    Public Methods
--------------

  ### 
setScaleMinMax(minX, minY, maxX, maxY)

  Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

 For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored  
and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

 By setting these values you can carefully control how Game Objects deal with responsive scaling.

 If only one parameter is given then that value will be used for both scaleMin and scaleMax:  
`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

 If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:  
`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

 If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly,  
or pass `null` for the `maxX` and `maxY` parameters.

 Call `setScaleMinMax(null)` to clear all previously set values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `minX` | number | null | The minimum horizontal scale value this Game Object can scale down to. |
| `minY` | number | null | The minimum vertical scale value this Game Object can scale down to. |
| `maxX` | number | null | The maximum horizontal scale value this Game Object can scale up to. |
| `maxY` | number | null | The maximum vertical scale value this Game Object can scale up to. |

  Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L110))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.ScaleMinMax.html>

Class: Phaser.Component.Smoothed
================================

 Constructor
-----------

 ### 
new Smoothed()

  The Smoothed component allows a Game Object to control anti-aliasing of an image based texture.

   Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L12))   Public Properties
-----------------

  ### 
smoothed : boolean

  Enable or disable texture smoothing for this Game Object.

 It only takes effect if the Game Object is using an image based texture.

 Smoothing is enabled by default.

   Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L25))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Component.Smoothed.html>

Class: PIXI.AbstractFilter
==========================

 Constructor
-----------

 ### 
new AbstractFilter(fragmentSrc, uniforms)

  This is the base class for creating a PIXI filter. Currently only webGL supports filters.  
If you want to make a custom filter this should be your base class.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `fragmentSrc` | Array | The fragment source in an array of strings. |
| `uniforms` | Object | An object containing the uniforms for this filter. |

  Source code: [pixi/filters/AbstractFilter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/filters/AbstractFilter.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/filters/AbstractFilter.js#L5))   Public Properties
-----------------

  ### 
dirty : boolean

  Source code: [pixi/filters/AbstractFilter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/filters/AbstractFilter.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/filters/AbstractFilter.js#L32))   ### 
padding : number

  Source code: [pixi/filters/AbstractFilter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/filters/AbstractFilter.js) ([Line 38](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/filters/AbstractFilter.js#L38))    Public Methods
--------------

  ### 
syncUniforms()

  Syncs the uniforms between the class object and the shaders.

   Source code: [pixi/filters/AbstractFilter.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/filters/AbstractFilter.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/filters/AbstractFilter.js#L61))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.AbstractFilter.html>

Class: PIXI.RenderTexture
=========================

 Constructor
-----------

 ### 
new RenderTexture(width, height, renderer, scaleMode, resolution)

  A RenderTexture is a special texture that allows any Pixi display object to be rendered to it.

 **Hint**: All DisplayObjects (i.e. Sprites) that render to a RenderTexture should be preloaded otherwise black rectangles will be drawn instead.

 A RenderTexture takes a snapshot of any Display Object given to its render method. The position and rotation of the given Display Objects is ignored. For example:

  var renderTexture = new PIXI.RenderTexture(800, 600);  
 var sprite = PIXI.Sprite.fromImage("spinObj\_01.png");  
 sprite.position.x = 800/2;  
 sprite.position.y = 600/2;  
 sprite.anchor.x = 0.5;  
 sprite.anchor.y = 0.5;  
 renderTexture.render(sprite);

 The Sprite in this case will be rendered to a position of 0,0. To render this sprite at its actual position a DisplayObjectContainer should be used:

  var doc = new PIXI.DisplayObjectContainer();  
 doc.addChild(sprite);  
 renderTexture.render(doc); // Renders to center of renderTexture

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | Number | The width of the render texture |
| `height` | Number | The height of the render texture |
| `renderer` | [PIXI.CanvasRenderer](pixi.canvasrenderer) | [PIXI.WebGLRenderer](pixi.webglrenderer) | The renderer used for this RenderTexture |
| `scaleMode` | Number | See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values |
| `resolution` | Number | The resolution of the texture being generated |

  Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L5))   Extends
-------

 * [PIXI.Texture](pixi.texture)

 Public Properties
-----------------

  ### 
baseTexture : [PIXI.BaseTexture](pixi.basetexture)

  The base texture object that this texture uses

   Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L78))   ### 
crop :Rectangle

  This is the area of the BaseTexture image to actually copy to the Canvas / WebGL when rendering,  
irrespective of the actual frame size or placement (which can be influenced by trimmed texture atlases)

   Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L69))   ### 
frame :Rectangle

  The framing rectangle of the render texture

   Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L61))   ### 
height : number

  The height of the render texture

   Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L45))   ### 
isTiling : boolean

  Is this a tiling texture? As used by the likes of a TilingSprite.

   Inherited From * [PIXI.Texture#isTiling](pixi.texture#isTiling)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 79](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L79))   ### 
noFrame : boolean

  Does this Texture have any frame data assigned to it?

   Inherited From * [PIXI.Texture#noFrame](pixi.texture#noFrame)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L28))   ### 
renderer : [PIXI.CanvasRenderer](pixi.canvasrenderer) | [PIXI.WebGLRenderer](pixi.webglrenderer)

  The renderer this RenderTexture uses. A RenderTexture can only belong to one renderer at the moment if its webGL.

  ##### Type

 * [PIXI.CanvasRenderer](pixi.canvasrenderer) | [PIXI.WebGLRenderer](pixi.webglrenderer)

  Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 99](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L99))   ### 
requiresReTint : boolean

  This will let a renderer know that a tinted parent has updated its texture.

   Inherited From * [PIXI.Texture#requiresReTint](pixi.texture#requiresReTint)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L95))   ### 
requiresUpdate : boolean

  This will let a renderer know that a texture has been updated (used mainly for webGL uv updates)

   Inherited From * [PIXI.Texture#requiresUpdate](pixi.texture#requiresUpdate)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L87))   ### 
resolution : number

  The Resolution of the texture.

   Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 53](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L53))   ### 
trim :Rectangle

  The texture trim data.

   Inherited From * [PIXI.Texture#trim](pixi.texture#trim)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L63))   ### 
valid : boolean

  Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L125))   ### 
width : number

  The with of the render texture

   Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L37))    Public Methods
--------------

  ### 
clear()

  Clears the RenderTexture.

   Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 175](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L175))   ### 
destroy(destroyBase)

  Destroys this texture

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `destroyBase` | Boolean | Whether to destroy the base texture as well |

  Inherited From * [PIXI.Texture#destroy](pixi.texture#destroy)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 165](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L165))   ### 
getBase64() → {String}

  Will return a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that.

  ##### Returns

   String -   A base64 encoded string of the texture.

    Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 309](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L309))   ### 
getCanvas() → {HTMLCanvasElement}

  Creates a Canvas element, renders this RenderTexture to it and then returns it.

  ##### Returns

   HTMLCanvasElement -   A Canvas element with the texture rendered on.

    Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 320](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L320))   ### 
getImage() → {Image}

  Will return a HTML Image of the texture

  ##### Returns

   Image -    Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 296](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L296))   ### 
resize(width, height, updateBase)

  Resizes the RenderTexture.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `width` | Number | The width to resize to. |
| `height` | Number | The height to resize to. |
| `updateBase` | Boolean | Should the baseTexture.width and height values be resized as well? |

  Source code: [pixi/textures/RenderTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js) ([Line 139](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/RenderTexture.js#L139))   ### 
setFrame(frame)

  Specifies the region of the baseTexture that this texture will use.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | Rectangle | The frame of the texture to set it to |

  Inherited From * [PIXI.Texture#setFrame](pixi.texture#setFrame)
 Source code: [pixi/textures/Texture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js) ([Line 178](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/textures/Texture.js#L178))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.RenderTexture.html>

Class: Phaser.PointerMode
=========================

 Constructor
-----------

 ### 
new PointerMode()

  Enumeration categorizing operational modes of pointers.

 PointerType values represent valid bitmasks.  
For example, a value representing both Mouse and Touch devices  
can be expressed as `PointerMode.CURSOR | PointerMode.CONTACT`.

 Values may be added for future mode categorizations.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1258](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1258))   Public Properties
-----------------

  ### 
[static] CONTACT

  A 'CONTACT' pointer has an *active cursor* that only tracks movement when actived; notably this is a touch-style input.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1273](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1273))   ### 
[static] CURSOR

  A 'CURSOR' is a pointer with a *passive cursor* such as a mouse, touchpad, watcom stylus, or even TV-control arrow-pad.

 It has the property that a cursor is passively moved without activating the input.  
This currently corresponds with [Phaser.Pointer#isMouse](phaser.pointer#isMouse) property.

   Source code: [input/Pointer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js) ([Line 1267](https://github.com/photonstorm/phaser/tree/v2.6.2/src/input/Pointer.js#L1267))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.PointerMode.html>

Class: PIXI.GraphicsData
========================

 Constructor
-----------

 ### 
new GraphicsData()

  A GraphicsData object.

   Source code: [pixi/primitives/GraphicsData.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/GraphicsData.js) ([Line 1](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/GraphicsData.js#L1))  

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.GraphicsData.html>

Class: Phaser.Particles.Arcade
==============================

 Constructor
-----------

 ### 
new Arcade()

  Arcade Particles is a Particle System integrated with Arcade Physics.

   Source code: [particles/arcade/ArcadeParticles.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/ArcadeParticles.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/particles/arcade/ArcadeParticles.js#L12))   Classes
-------

   [Emitter](phaser.particles.arcade.emitter)  

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Particles.Arcade.html>

Class: Phaser.Matrix
====================

 Constructor
-----------

 ### 
new Matrix(a, b, c, d, tx, ty)

  The Matrix is a 3x3 matrix mostly used for display transforms within the renderer.

 It is represented like so:

  | a | b | tx |   
 | c | d | ty |   
 | 0 | 0 | 1 | 

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `a` | number |  <optional> |  1  | Horizontal scaling |
| `b` | number |  <optional> |  0  | Horizontal skewing |
| `c` | number |  <optional> |  0  | Vertical skewing |
| `d` | number |  <optional> |  1  | Vertical scaling |
| `tx` | number |  <optional> |  0  | Horizontal translation |
| `ty` | number |  <optional> |  0  | Vertical translation |

  Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L26))   Public Properties
-----------------

  ### 
a : number

  Default Value * 1
 Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 39](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L39))   ### 
b : number

  Default Value * 0
 Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L45))   ### 
c : number

  Default Value * 0
 Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L51))   ### 
d : number

  Default Value * 1
 Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 57](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L57))   ### 
tx : number

  Default Value * 0
 Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 63](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L63))   ### 
ty : number

  Default Value * 0
 Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L69))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 75](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L75))    Public Methods
--------------

  ### 
append(matrix) → {[Phaser.Matrix](phaser.matrix)}

  Appends the given Matrix to this Matrix.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | [Phaser.Matrix](phaser.matrix) | The matrix to append to this one. |

 ##### Returns

   [Phaser.Matrix](phaser.matrix) -   This Matrix object.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 345](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L345))   ### 
apply(pos, newPos) → {[Phaser.Point](phaser.point)}

  Get a new position with the current transformation applied.

 Can be used to go from a childs coordinate space to the world coordinate space (e.g. rendering)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `pos` | [Phaser.Point](phaser.point) |  | The origin Point. |
| `newPos` | [Phaser.Point](phaser.point) |  <optional> | The point that the new position is assigned to. This can be same as input point. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new point, transformed through this matrix.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 233](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L233))   ### 
applyInverse(pos, newPos) → {[Phaser.Point](phaser.point)}

  Get a new position with the inverse of the current transformation applied.

 Can be used to go from the world coordinate space to a childs coordinate space. (e.g. input)

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `pos` | [Phaser.Point](phaser.point) |  | The origin Point. |
| `newPos` | [Phaser.Point](phaser.point) |  <optional> | The point that the new position is assigned to. This can be same as input point. |

 ##### Returns

   [Phaser.Point](phaser.point) -   The new point, inverse transformed through this matrix.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L254))   ### 
clone(output) → {[Phaser.Matrix](phaser.matrix)}

  Creates a new Matrix object based on the values of this Matrix.  
If you provide the output parameter the values of this Matrix will be copied over to it.  
If the output parameter is blank a new Matrix object will be created.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `output` | [Phaser.Matrix](phaser.matrix) |  <optional> | If provided the values of this Matrix will be copied to it, otherwise a new Matrix object is created. |

 ##### Returns

   [Phaser.Matrix](phaser.matrix) -   A clone of this Matrix.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 128](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L128))   ### 
copyFrom(matrix) → {[Phaser.Matrix](phaser.matrix)}

  Copies the properties from the given Matrix into this Matrix.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | [Phaser.Matrix](phaser.matrix) | The Matrix to copy from. |

 ##### Returns

   [Phaser.Matrix](phaser.matrix) -   This Matrix object.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 172](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L172))   ### 
copyTo(matrix) → {[Phaser.Matrix](phaser.matrix)}

  Copies the properties from this Matrix to the given Matrix.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | [Phaser.Matrix](phaser.matrix) | The Matrix to copy from. |

 ##### Returns

   [Phaser.Matrix](phaser.matrix) -   The destination Matrix object.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 157](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L157))   ### 
fromArray(array) → {[Phaser.Matrix](phaser.matrix)}

  Sets the values of this Matrix to the values in the given array.

 The Array elements should be set as follows:

 a = array[0]  
b = array[1]  
c = array[3]  
d = array[4]  
tx = array[2]  
ty = array[5]

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `array` | Array | The array to copy from. |

 ##### Returns

   [Phaser.Matrix](phaser.matrix) -   This Matrix object.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 81](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L81))   ### 
identity() → {[Phaser.Matrix](phaser.matrix)}

  Resets this Matrix to an identity (default) matrix.

  ##### Returns

   [Phaser.Matrix](phaser.matrix) -   This Matrix object.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 371](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L371))   ### 
rotate(angle) → {[Phaser.Matrix](phaser.matrix)}

  Applies a rotation transformation to this matrix.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `angle` | number | The angle to rotate by, given in radians. |

 ##### Returns

   [Phaser.Matrix](phaser.matrix) -   This Matrix object.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 318](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L318))   ### 
scale(x, y) → {[Phaser.Matrix](phaser.matrix)}

  Applies a scale transformation to this matrix.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The amount to scale horizontally. |
| `y` | number | The amount to scale vertically. |

 ##### Returns

   [Phaser.Matrix](phaser.matrix) -   This Matrix object.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 297](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L297))   ### 
setTo(a, b, c, d, tx, ty) → {[Phaser.Matrix](phaser.matrix)}

  Sets the values of this Matrix to the given values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `a` | number | Horizontal scaling |
| `b` | number | Horizontal skewing |
| `c` | number | Vertical skewing |
| `d` | number | Vertical scaling |
| `tx` | number | Horizontal translation |
| `ty` | number | Vertical translation |

 ##### Returns

   [Phaser.Matrix](phaser.matrix) -   This Matrix object.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L103))   ### 
toArray(transpose, array) → {PIXI.Float32Array}

  Creates a Float32 Array with values populated from this Matrix object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `transpose` | boolean |  <optional> |  false  | Whether the values in the array are transposed or not. |
| `array` | PIXI.Float32Array |  <optional> |  | If provided the values will be set into this array, otherwise a new Float32Array is created. |

 ##### Returns

   PIXI.Float32Array -   The newly created array which contains the matrix.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 192](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L192))   ### 
translate(x, y) → {[Phaser.Matrix](phaser.matrix)}

  Translates the matrix on the x and y.  
This is the same as Matrix.tx += x.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | number | The x value to translate on. |
| `y` | number | The y value to translate on. |

 ##### Returns

   [Phaser.Matrix](phaser.matrix) -   This Matrix object.

    Source code: [geom/Matrix.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/geom/Matrix.js#L279))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Matrix.html>

Class: PIXI.Rope
================

 Constructor
-----------

 ### 
new Rope(texture, points)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) | * The texture to use on the rope.
 |
| `points` | Array | * An array of {PIXI.Point}.
 |

  Source code: [pixi/extras/Rope.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Rope.js) ([Line 6](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Rope.js#L6))   Extends
-------

 * [PIXI.Strip](pixi.strip)

 Public Properties
-----------------

  ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

   Inherited From * [PIXI.Strip#blendMode](pixi.strip#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L51))   ### 
canvasPadding : number

  Triangles in canvas mode are automatically antialiased, use this value to force triangles to overlap a bit with each other.

   Inherited From * [PIXI.Strip#canvasPadding](pixi.strip#canvasPadding)
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L60))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
dirty : boolean

  Whether the strip is dirty or not

   Inherited From * [PIXI.Strip#dirty](pixi.strip#dirty)
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L43))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture of the strip

   Inherited From * [PIXI.Strip#texture](pixi.strip#texture)
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L20))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
getBounds(matrix) → {Rectangle}

  Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Matrix | the transformation matrix of the sprite |

 ##### Returns

   Rectangle -   the framing rectangle

    Inherited From * [PIXI.Strip#getBounds](pixi.strip#getBounds)
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 405](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L405))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.Rope.html>

Class: PIXI.TilingSprite
========================

 Constructor
-----------

 ### 
new TilingSprite(texture, width, height)

  A tiling sprite is a fast way of rendering a tiling image

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) | the texture of the tiling sprite |
| `width` | Number | the width of the tiling sprite |
| `height` | Number | the height of the tiling sprite |

  Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L5))   Extends
-------

 * [PIXI.Sprite](pixi.sprite)

 Public Properties
-----------------

  ### 
anchor :Point

  The anchor sets the origin point of the texture.  
The default is 0,0 this means the texture's origin is the top left  
Setting than anchor to 0.5,0.5 means the textures origin is centered  
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

   Inherited From * [PIXI.Sprite#anchor](pixi.sprite#anchor)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L17))   ### 
blendMode : number

  The blend mode to be applied to the sprite

   Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L86))   ### 
canvasBuffer :PIXICanvasBuffer

  The CanvasBuffer object that the tiled texture is drawn to.

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 95](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L95))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
exists : boolean

  Controls if this Sprite is processed by the core Phaser game loops and Group loops.

   Inherited From * [PIXI.Sprite#exists](pixi.sprite#exists)
 Default Value * true
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L103))   ### 
height : number

  The height of the tiling sprite

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 27](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L27))   ### 
height : number

  The height of the TilingSprite, setting this will actually modify the scale to achieve the value set

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 535](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L535))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
refreshTexture : boolean

  If true the TilingSprite will run generateTexture on its **next** render pass.  
This is set by the likes of Phaser.LoadTexture.setFrame.

   Default Value * true
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L119))   ### 
renderable : boolean

  Whether this sprite is renderable or not

   Default Value * true
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 59](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L59))   ### 
shader : [PIXI.AbstractFilter](pixi.abstractfilter)

  The shader that will be used to render this Sprite.  
Set to null to remove a current shader.

   Inherited From * [PIXI.Sprite#shader](pixi.sprite#shader)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L93))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture that the sprite is using

   Inherited From * [PIXI.Sprite#texture](pixi.sprite#texture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L28))   ### 
textureDebug : boolean

  If enabled a green rectangle will be drawn behind the generated tiling texture, allowing you to visually  
debug the texture being used.

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 77](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L77))   ### 
tilePattern :PIXITexture

  The Context fill pattern that is used to draw the TilingSprite in Canvas mode only (will be null in WebGL).

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 111](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L111))   ### 
tilePosition :Point

  The offset position of the image that is being tiled

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L51))   ### 
tileScale :Point

  The scaling of the image that is being tiled

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L35))   ### 
tileScaleOffset :Point

  A point that represents the scale of the texture object

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L43))   ### 
tilingTexture :PIXITexture

  An internal Texture object that holds the tiling texture that was generated from TilingSprite.texture.

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L103))   ### 
tint : number

  The tint applied to the sprite. This is a hex value

   Default Value * 0xFFFFFF
 Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 68](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L68))   ### 
tintedTexture :Canvas

  A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

   Inherited From * [PIXI.Sprite#tintedTexture](pixi.sprite#tintedTexture)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L73))   ### 
width : number

  The width of the sprite, setting this will actually modify the scale to achieve the value set

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 517](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L517))   ### 
width : number

  The width of the tiling sprite

   Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 19](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L19))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
generateTilingTexture(forcePowerOfTwo, renderSession)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `forcePowerOfTwo` | Boolean | Whether we want to force the texture to be a power of two |
| `renderSession` | RenderSession | - |

  Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 332](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L332))   ### 
getBounds() → {Rectangle}

  Returns the framing rectangle of the sprite as a PIXI.Rectangle object

  ##### Returns

   Rectangle -   the framing rectangle

    Source code: [pixi/extras/TilingSprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js) ([Line 417](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/TilingSprite.js#L417))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.Sprite#getLocalBounds](pixi.sprite#getLocalBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L315))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setTexture(texture, destroy)

  Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous  
texture this Sprite was using.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) |  |  | The PIXI texture that is displayed by the sprite |
| `destroy` | Boolean |  <optional> |  false  | Call Texture.destroy on the current texture before replacing it with the new one? |

  Inherited From * [PIXI.Sprite#setTexture](pixi.sprite#setTexture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L163))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.TilingSprite.html>

Class: PIXI.Strip
=================

 Constructor
-----------

 ### 
new Strip(texture, width, height)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) | The texture to use |
| `width` | Number | the width |
| `height` | Number | the height |

  Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L5))   Extends
-------

 * [PIXI.DisplayObjectContainer](pixi.displayobjectcontainer)

 Public Properties
-----------------

  ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

   Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L51))   ### 
canvasPadding : number

  Triangles in canvas mode are automatically antialiased, use this value to force triangles to overlap a bit with each other.

   Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L60))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
dirty : boolean

  Whether the strip is dirty or not

   Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L43))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture of the strip

   Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L20))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
getBounds(matrix) → {Rectangle}

  Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Matrix | the transformation matrix of the sprite |

 ##### Returns

   Rectangle -   the framing rectangle

    Source code: [pixi/extras/Strip.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js) ([Line 405](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/extras/Strip.js#L405))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.Strip.html>

Class: Phaser.Physics.Arcade.TilemapCollision
=============================================

 Constructor
-----------

 ### 
new TilemapCollision()

  The Arcade Physics Tile map collision methods.

   Source code: [physics/arcade/TilemapCollision.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/TilemapCollision.js) ([Line 13](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/TilemapCollision.js#L13))   Public Properties
-----------------

  ### 
TILE\_BIAS : number

  A value added to the delta values during collision with tiles. Adjust this if you get tunneling.

   Source code: [physics/arcade/TilemapCollision.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/TilemapCollision.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/physics/arcade/TilemapCollision.js#L20))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Physics.Arcade.TilemapCollision.html>

Class: Phaser.Easing.Back
=========================

 Constructor
-----------

 ### 
new Back()

  Back easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 457](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L457))   Public Methods
--------------

  ### 
In(k) → {number}

  Back ease-in.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 459](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L459))   ### 
InOut(k) → {number}

  Back ease-in/out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 487](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L487))   ### 
Out(k) → {number}

  Back ease-out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 473](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L473))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Back.html>

Class: Phaser.Easing.Bounce
===========================

 Constructor
-----------

 ### 
new Bounce()

  Bounce easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 509](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L509))   Public Methods
--------------

  ### 
In(k) → {number}

  Bounce ease-in.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 511](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L511))   ### 
InOut(k) → {number}

  Bounce ease-in/out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 553](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L553))   ### 
Out(k) → {number}

  Bounce ease-out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 524](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L524))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Bounce.html>

Class: Phaser.Easing.Circular
=============================

 Constructor
-----------

 ### 
new Circular()

  Circular easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 344](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L344))   Public Methods
--------------

  ### 
In(k) → {number}

  Circular ease-in.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 346](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L346))   ### 
InOut(k) → {number}

  Circular ease-in/out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 372](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L372))   ### 
Out(k) → {number}

  Circular ease-out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 359](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L359))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Circular.html>

Class: Phaser.Easing.Cubic
==========================

 Constructor
-----------

 ### 
new Cubic()

  Cubic easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 92](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L92))   Public Methods
--------------

  ### 
In(k) → {number}

  Cubic ease-in.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L94))   ### 
InOut(k) → {number}

  Cubic ease-in/out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 120](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L120))   ### 
Out(k) → {number}

  Cubic ease-out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L107))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Cubic.html>

Class: Phaser.Easing.Elastic
============================

 Constructor
-----------

 ### 
new Elastic()

  Elastic easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 393](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L393))   Public Methods
--------------

  ### 
In(k) → {number}

  Elastic ease-in.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 395](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L395))   ### 
InOut(k) → {number}

  Elastic ease-in/out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 431](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L431))   ### 
Out(k) → {number}

  Elastic ease-out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 413](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L413))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Elastic.html>

Class: Phaser.Easing.Exponential
================================

 Constructor
-----------

 ### 
new Exponential()

  Exponential easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 293](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L293))   Public Methods
--------------

  ### 
In(k) → {number}

  Exponential ease-in.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 295](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L295))   ### 
InOut(k) → {number}

  Exponential ease-in/out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L321))   ### 
Out(k) → {number}

  Exponential ease-out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 308](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L308))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Exponential.html>

Class: Phaser.Easing.Linear
===========================

 Constructor
-----------

 ### 
new Linear()

  Linear easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L21))   Public Methods
--------------

  ### 
None(k) → {number}

  Linear Easing (no variation).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   k.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L23))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Linear.html>

Class: Phaser.Easing.Quadratic
==============================

 Constructor
-----------

 ### 
new Quadratic()

  Quadratic easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 43](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L43))   Public Methods
--------------

  ### 
In(k) → {number}

  Ease-in.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   k^2.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L45))   ### 
InOut(k) → {number}

  Ease-in/out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 71](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L71))   ### 
Out(k) → {number}

  Ease-out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   k\* (2-k).

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L58))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Quadratic.html>

Class: Phaser.Easing.Quartic
============================

 Constructor
-----------

 ### 
new Quartic()

  Quartic easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 141](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L141))   Public Methods
--------------

  ### 
In(k) → {number}

  Quartic ease-in.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 143](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L143))   ### 
InOut(k) → {number}

  Quartic ease-in/out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 169](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L169))   ### 
Out(k) → {number}

  Quartic ease-out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 156](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L156))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Quartic.html>

Class: Phaser.Easing.Quintic
============================

 Constructor
-----------

 ### 
new Quintic()

  Quintic easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 190](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L190))   Public Methods
--------------

  ### 
In(k) → {number}

  Quintic ease-in.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 192](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L192))   ### 
InOut(k) → {number}

  Quintic ease-in/out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L218))   ### 
Out(k) → {number}

  Quintic ease-out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 205](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L205))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Quintic.html>

Class: Phaser.Easing.Sinusoidal
===============================

 Constructor
-----------

 ### 
new Sinusoidal()

  Sinusoidal easing.

   Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 239](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L239))   Public Methods
--------------

  ### 
In(k) → {number}

  Sinusoidal ease-in.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 241](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L241))   ### 
InOut(k) → {number}

  Sinusoidal ease-in/out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 271](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L271))   ### 
Out(k) → {number}

  Sinusoidal ease-out.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `k` | number | The value to be tweened. |

 ##### Returns

   number -   The tweened value.

    Source code: [tween/Easing.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js) ([Line 256](https://github.com/photonstorm/phaser/tree/v2.6.2/src/tween/Easing.js#L256))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Easing.Sinusoidal.html>

Class: PIXI.CanvasMaskManager
=============================

 Constructor
-----------

 ### 
new CanvasMaskManager()

  A set of functions used to handle masking.

   Source code: [pixi/renderers/canvas/utils/CanvasMaskManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/utils/CanvasMaskManager.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/utils/CanvasMaskManager.js#L5))   Public Methods
--------------

  ### 
popMask(renderSession)

  Restores the current drawing context to the state it was before the mask was applied.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `renderSession` | Object | The renderSession whose context will be used for this mask manager. |

  Source code: [pixi/renderers/canvas/utils/CanvasMaskManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/utils/CanvasMaskManager.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/utils/CanvasMaskManager.js#L49))   ### 
pushMask(maskData, renderSession)

  This method adds it to the current stack of masks.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `maskData` | Object | the maskData that will be pushed |
| `renderSession` | Object | The renderSession whose context will be used for this mask manager. |

  Source code: [pixi/renderers/canvas/utils/CanvasMaskManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/utils/CanvasMaskManager.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/canvas/utils/CanvasMaskManager.js#L17))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.CanvasMaskManager.html>

Class: Phaser.Creature
======================

 Constructor
-----------

 ### 
new Creature(game, x, y, key, mesh, animation)

  Creature is a custom Game Object used in conjunction with the Creature Runtime libraries by Kestrel Moon Studios.

 It allows you to display animated Game Objects that were created with the [Creature Automated Animation Tool](http://www.kestrelmoon.com/creature/).

 Note 1: You can only use Phaser.Creature objects in WebGL enabled games. They do not work in Canvas mode games.

 Note 2: You must use a build of Phaser that includes the CreatureMeshBone.js runtime and gl-matrix.js, or have them  
loaded before your Phaser game boots.

 See the Phaser custom build process for more details.

 By default the Creature runtimes are NOT included in any pre-configured version of Phaser.

 So you'll need to do `grunt custom` to create a build that includes them.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) |  |  | A reference to the currently running game. |
| `x` | number |  |  | The x coordinate of the Game Object. The coordinate is relative to any parent container this Game Object may be in. |
| `y` | number |  |  | The y coordinate of the Game Object. The coordinate is relative to any parent container this Game Object may be in. |
| `key` | string | [PIXI.Texture](pixi.texture) |  |  | The texture used by the Creature Object during rendering. It can be a string which is a reference to the Cache entry, or an instance of a PIXI.Texture. |
| `mesh` | string |  |  | The mesh data for the Creature Object. It should be a string which is a reference to the Cache JSON entry. |
| `animation` | string |  <optional> |  'default'  | The animation within the mesh data to play. |

  Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L42))   Extends
-------

 * [PIXI.DisplayObjectContainer](pixi.displayobjectcontainer)
* [Phaser.Component.Core](phaser.component.core)
* [Phaser.Component.Angle](phaser.component.angle)
* [Phaser.Component.AutoCull](phaser.component.autocull)
* [Phaser.Component.BringToTop](phaser.component.bringtotop)
* [Phaser.Component.Destroy](phaser.component.destroy)
* [Phaser.Component.FixedToCamera](phaser.component.fixedtocamera)
* [Phaser.Component.LifeSpan](phaser.component.lifespan)
* [Phaser.Component.Reset](phaser.component.reset)

 Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animation :CreatureAnimation

  The CreatureAnimation instance.

   Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 69](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L69))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> colors :PIXI.Uint16Array

  The vertices colors

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L142))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
<internal> creatureBoundsMax : [Phaser.Point](phaser.point)

  The maximum bounds point.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 111](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L111))   ### 
<internal> creatureBoundsMin : [Phaser.Point](phaser.point)

  The minimum bounds point.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 105](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L105))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Game Object is processed by the core game loop.  
If this Game Object has a physics body it also controls if its physics body is updated or not.  
When `exists` is set to `false` it will remove its physics body from the physics world if it has one.  
It also toggles the `visible` property to false as well.

 Setting `exists` to true will add its physics body back in to the physics world, if it has one.  
It will also set the `visible` property to `true`.

   Inherited From * [Phaser.Component.Core#exists](phaser.component.core#exists)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 284](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L284))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
<internal> indices :PIXI.Uint16Array

  Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 131](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L131))   ### 
isPlaying : boolean

  Is the *current* animation playing?

   Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 443](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L443))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
loop : boolean

  Should the *current* animation loop or not?

   Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 463](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L463))   ### 
manager :CreatureManager

  The CreatureManager instance for this object.

   Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 74](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L74))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture the animation is using.

   Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 94](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L94))   ### 
timeDelta : number

  How quickly the animation advances.

   Default Value * 0.05
 Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L80))   ### 
[readonly] type : number

  The const type of this object.

   Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L50))   ### 
<internal> uvs :PIXI.Float32Array

  The UV data.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L125))   ### 
<internal> vertices :PIXI.Float32Array

  The vertices data.

   Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 119](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L119))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#bringToTop](phaser.component.bringtotop#bringToTop)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
destroy(destroyChildren, destroyTexture)

  Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present  
and nulls its reference to `game`, freeing it up for garbage collection.

 If this Game Object has the Events component it will also dispatch the `onDestroy` event.

 You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called as well? |
| `destroyTexture` | boolean |  <optional> |  false  | Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Component.Destroy#destroy](phaser.component.destroy#destroy)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L37))   ### 
getBounds(targetCoordinateSpace) → {Rectangle}

  Retrieves the global bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration.

  ##### Parameters

 

| Name | Type | Argument | Description |
| --- | --- | --- | --- |
| `targetCoordinateSpace` | PIXIDisplayObject | PIXIMatrix |  <optional> | Returns a rectangle that defines the area of the display object relative to the coordinate system of the targetCoordinateSpace object. |

 ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getBounds](pixi.displayobjectcontainer#getBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 280](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L280))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the displayObjectContainer as a rectangle without any transformations. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.DisplayObjectContainer#getLocalBounds](pixi.displayobjectcontainer#getLocalBounds)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 437](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L437))   ### 
kill() → {PIXI.DisplayObject}

  Kills a Game Object. A killed Game Object has its `alive`, `exists` and `visible` properties all set to false.

 It will dispatch the `onKilled` event. You can listen to `events.onKilled` for the signal.

 Note that killing a Game Object is a way for you to quickly recycle it in an object pool,  
it doesn't destroy the object or free it up from memory.

 If you don't need this Game Object any more you should call `destroy` instead.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#kill](phaser.component.lifespan#kill)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 113](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L113))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveDown](phaser.component.bringtotop#moveDown)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveUp](phaser.component.bringtotop#moveUp)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
play(loop)

  Plays the currently set animation.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `loop` | boolean |  <optional> |  false  | Should the animation loop? |

  Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 413](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L413))   ### 
<internal> postUpdate()

  Internal method called by the World postUpdate cycle.

   Inherited From * [Phaser.Component.Core#postUpdate](phaser.component.core#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L338))   ### 
preUpdate()

  Automatically called by World.preUpdate.

   Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 169](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L169))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
reset(x, y, health) → {PIXI.DisplayObject}

  Resets the Game Object.

 This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`,  
`visible` and `renderable` to true.

 If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

 If this Game Object has a Physics Body it will reset the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Game Object at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Game Object at. |
| `health` | number |  <optional> |  1  | The health to give the Game Object if it has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.Reset#reset](phaser.component.reset#reset)
 Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L30))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#sendToBack](phaser.component.bringtotop#sendToBack)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   ### 
setAnimation(key)

  Sets the Animation this Creature object will play, as defined in the mesh data.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `key` | string | The key of the animation to set, as defined in the mesh data. |

  Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 400](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L400))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
stop()

  Stops the currently playing animation.

   Source code: [gameobjects/Creature.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js) ([Line 431](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Creature.js#L431))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Override this method in your own custom objects to handle any update requirements.  
It is called immediately after `preUpdate` and before `postUpdate`.  
Remember if this Game Object has any children you should call update on those too.

   Inherited From * [Phaser.Component.Core#update](phaser.component.core#update)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L328))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Creature.html>

Class: PIXI.Graphics
====================

 Constructor
-----------

 ### 
new Graphics()

  The Graphics class contains methods used to draw primitive shapes such as lines, circles and rectangles to the display, and color and fill them.

   Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L5))   Extends
-------

 * [PIXI.DisplayObjectContainer](pixi.displayobjectcontainer)

 Public Properties
-----------------

  ### 
blendMode : number

  The blend mode to be applied to the graphic shape. Apply a value of PIXI.blendModes.NORMAL to reset the blend mode.

   Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L61))   ### 
boundsPadding : number

  The bounds' padding used for bounds calculation.

   Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 96](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L96))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
fillAlpha : number

  The alpha value used when filling the Graphics object.

   Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 18](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L18))   ### 
height : number

  The height of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#height](pixi.displayobjectcontainer#height)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 600](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L600))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
isMask : boolean

  Whether this shape is being used as a mask.

   Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 88](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L88))   ### 
lineColor : string

  The color of any lines drawn.

   Default Value * 0
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 34](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L34))   ### 
lineWidth : number

  The width (thickness) of any lines drawn.

   Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L26))   ### 
tint : number

  The tint applied to the graphic shape. This is a hex value. Apply a value of 0xFFFFFF to reset the tint.

   Default Value * 0xFFFFFF
 Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 52](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L52))   ### 
width : number

  The width of the displayObjectContainer, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.DisplayObjectContainer#width](pixi.displayobjectcontainer#width)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 571](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L571))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
arc(cx, cy, radius, startAngle, endAngle, anticlockwise, segments) → {[PIXI.Graphics](pixi.graphics)}

  The arc method creates an arc/curve (used to create circles, or parts of circles).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `cx` | Number | The x-coordinate of the center of the circle |
| `cy` | Number | The y-coordinate of the center of the circle |
| `radius` | Number | The radius of the circle |
| `startAngle` | Number | The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle) |
| `endAngle` | Number | The ending angle, in radians |
| `anticlockwise` | Boolean | Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise. |
| `segments` | Number | Optional. The number of segments to use when calculating the arc. The default is 40. If you need more fidelity use a higher number. |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 405](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L405))   ### 
beginFill(color, alpha) → {[PIXI.Graphics](pixi.graphics)}

  Specifies a simple one-color fill that subsequent calls to other Graphics methods  
(such as lineTo() or drawCircle()) use when drawing.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `color` | Number | the color of the fill |
| `alpha` | Number | the alpha of the fill |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 491](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L491))   ### 
bezierCurveTo(cpX, cpY, cpX2, cpY2, toX, toY) → {[PIXI.Graphics](pixi.graphics)}

  Calculate the points for a bezier curve and then draws it.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `cpX` | Number | Control point x |
| `cpY` | Number | Control point y |
| `cpX2` | Number | Second Control point x |
| `cpY2` | Number | Second Control point y |
| `toX` | Number | Destination point x |
| `toY` | Number | Destination point y |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 276](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L276))   ### 
clear() → {[PIXI.Graphics](pixi.graphics)}

  Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings.

  ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 633](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L633))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
destroyCachedSprite()

  Destroys a previous cached sprite.

   Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 1173](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L1173))   ### 
drawCircle(x, y, diameter) → {[PIXI.Graphics](pixi.graphics)}

  Draws a circle.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | The X coordinate of the center of the circle |
| `y` | Number | The Y coordinate of the center of the circle |
| `diameter` | Number | The diameter of the circle |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 565](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L565))   ### 
drawEllipse(x, y, width, height) → {[PIXI.Graphics](pixi.graphics)}

  Draws an ellipse.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | The X coordinate of the center of the ellipse |
| `y` | Number | The Y coordinate of the center of the ellipse |
| `width` | Number | The half width of the ellipse |
| `height` | Number | The half height of the ellipse |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 581](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L581))   ### 
drawPolygon(path) → {[PIXI.Graphics](pixi.graphics)}

  Draws a polygon using the given path.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `path` | Array | PhaserPolygon | The path data used to construct the polygon. Can either be an array of points or a Phaser.Polygon object. |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 598](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L598))   ### 
drawRect(x, y, width, height) → {[PIXI.Graphics](pixi.graphics)}

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | The X coord of the top-left of the rectangle |
| `y` | Number | The Y coord of the top-left of the rectangle |
| `width` | Number | The width of the rectangle |
| `height` | Number | The height of the rectangle |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 534](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L534))   ### 
drawRoundedRect(x, y, width, height, radius)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | The X coord of the top-left of the rectangle |
| `y` | Number | The Y coord of the top-left of the rectangle |
| `width` | Number | The width of the rectangle |
| `height` | Number | The height of the rectangle |
| `radius` | Number | Radius of the rectangle corners. In WebGL this must be a value between 0 and 9. |

  Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 550](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L550))   ### 
drawShape(shape) → {[PIXI.GraphicsData](pixi.graphicsdata)}

  Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `shape` | Circle | Rectangle | Ellipse | Line | Polygon | The Shape object to draw. |

 ##### Returns

   [PIXI.GraphicsData](pixi.graphicsdata) -   The generated GraphicsData object.

    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 1184](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L1184))   ### 
endFill() → {[PIXI.Graphics](pixi.graphics)}

  Applies a fill to the lines and shapes that were added since the last call to the beginFill() method.

  ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 519](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L519))   ### 
generateTexture(resolution, scaleMode, padding) → {[PIXI.Texture](pixi.texture)}

  Useful function that returns a texture of the graphics object that can then be used to create sprites  
This can be quite useful if your geometry is complicated and needs to be reused multiple times.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `resolution` | Number |  <optional> |  1  | The resolution of the texture being generated |
| `scaleMode` | Number |  <optional> |  0  | Should be one of the PIXI.scaleMode consts |
| `padding` | Number |  <optional> |  0  | Add optional extra padding to the generated texture (default 0) |

 ##### Returns

   [PIXI.Texture](pixi.texture) -   a texture of the graphics object

    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 654](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L654))   ### 
getBounds() → {Rectangle}

  Retrieves the bounds of the graphic shape as a rectangle object

  ##### Returns

   Rectangle -   the rectangular bounding area

    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 848](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L848))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the graphic shape as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 936](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L936))   ### 
lineStyle(lineWidth, color, alpha) → {[PIXI.Graphics](pixi.graphics)}

  Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `lineWidth` | Number | width of the line to draw, will update the objects stored style |
| `color` | Number | color of the line to draw, will update the objects stored style |
| `alpha` | Number | alpha of the line to draw, will update the objects stored style |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 149](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L149))   ### 
lineTo(x, y) → {[PIXI.Graphics](pixi.graphics)}

  Draws a line using the current line style from the current drawing position to (x, y);  
The current drawing position is then set to (x, y).

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | the X coordinate to draw to |
| `y` | Number | the Y coordinate to draw to |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 198](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L198))   ### 
moveTo(x, y) → {[PIXI.Graphics](pixi.graphics)}

  Moves the current drawing position to x, y.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `x` | Number | the X coordinate to move to |
| `y` | Number | the Y coordinate to move to |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 183](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L183))   ### 
quadraticCurveTo(cpX, cpY, toX, toY) → {[PIXI.Graphics](pixi.graphics)}

  Calculate the points for a quadratic bezier curve and then draws it.  
Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `cpX` | Number | Control point x |
| `cpY` | Number | Control point y |
| `toX` | Number | Destination point x |
| `toY` | Number | Destination point y |

 ##### Returns

   [PIXI.Graphics](pixi.graphics) -    Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 221](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L221))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
updateLocalBounds()

  Update the bounds of the object

   Source code: [pixi/primitives/Graphics.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js) ([Line 997](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/primitives/Graphics.js#L997))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.Graphics.html>

Class: PIXI.WebGLBlendModeManager
=================================

 Constructor
-----------

 ### 
new WebGLBlendModeManager(gl)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `gl` | WebGLContext | the current WebGL drawing context |

  Source code: [pixi/renderers/webgl/utils/WebGLBlendModeManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js#L5))   Public Properties
-----------------

  ### 
currentBlendMode : number

  Source code: [pixi/renderers/webgl/utils/WebGLBlendModeManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js) ([Line 12](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js#L12))    Public Methods
--------------

  ### 
destroy()

  Destroys this object.

   Source code: [pixi/renderers/webgl/utils/WebGLBlendModeManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js#L54))   ### 
setBlendMode(blendMode)

  Sets-up the given blendMode from WebGL's point of view.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `blendMode` | Number | the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD |

  Source code: [pixi/renderers/webgl/utils/WebGLBlendModeManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js#L32))   ### 
setContext(gl)

  Sets the WebGL Context.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `gl` | WebGLContext | the current WebGL drawing context |

  Source code: [pixi/renderers/webgl/utils/WebGLBlendModeManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js) ([Line 21](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLBlendModeManager.js#L21))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.WebGLBlendModeManager.html>

Class: PIXI.WebGLFilterManager
==============================

 Constructor
-----------

 ### 
new WebGLFilterManager()

  Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 5](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L5))   Public Properties
-----------------

  ### 
filterStack : Array

  Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 11](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L11))   ### 
offsetX : number

  Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L17))   ### 
offsetY : number

  Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 23](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L23))    Public Methods
--------------

  ### 
applyFilterPass(filter, filterArea, width, height)

  Applies the filter to the specified area.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `filter` | [PIXI.AbstractFilter](pixi.abstractfilter) | the filter that needs to be applied |
| `filterArea` | [PIXI.Texture](pixi.texture) | TODO - might need an update |
| `width` | Number | the horizontal range of the filter |
| `height` | Number | the vertical range of the filter |

  Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 336](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L336))   ### 
begin(renderSession, buffer)

 ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `renderSession` | RenderSession | - |
| `buffer` | ArrayBuffer | - |

  Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L46))   ### 
destroy()

  Destroys the filter and removes it from the filter stack.

   Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 445](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L445))   ### 
initShaderBuffers()

  Initialises the shader buffers.

   Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 397](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L397))   ### 
popFilter()

  Removes the last filter from the filter stack and doesn't return it.

   Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 145](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L145))   ### 
pushFilter(filterBlock)

  Applies the filter and adds it to the current filter stack.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `filterBlock` | Object | the filter that will be pushed to the current filter stack |

  Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 62](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L62))   ### 
setContext(gl)

  Initialises the context and the properties.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `gl` | WebGLContext | the current WebGL drawing context |

  Source code: [pixi/renderers/webgl/utils/WebGLFilterManager.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js) ([Line 32](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/renderers/webgl/utils/WebGLFilterManager.js#L32))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/PIXI.WebGLFilterManager.html>

Class: Phaser.Bullet
====================

 Constructor
-----------

 ### 
new Bullet(game, x, y, key, frame)

  Create a new `Bullet` object. Bullets are used by the `Phaser.Weapon` class, and are normal Sprites,  
with a few extra properties in the data object to handle Weapon specific features.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `game` | [Phaser.Game](phaser.game) | A reference to the currently running game. |
| `x` | number | The x coordinate (in world space) to position the Particle at. |
| `y` | number | The y coordinate (in world space) to position the Particle at. |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [PIXI.Texture](pixi.texture) | This is the image or texture used by the Particle 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 Particle 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. |

  Source code: [plugins/weapon/Bullet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/Bullet.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/Bullet.js#L20))   Extends
-------

 * [Phaser.Sprite](phaser.sprite)

 Public Properties
-----------------

  ### 
alive : boolean

  A useful flag to control if the Game Object is alive or dead.

 This is set automatically by the Health components `damage` method should the object run out of health.  
Or you can toggle it via your game code.

 This property is mostly just provided to be used by your game - it doesn't effect rendering or logic updates.  
However you can use `Group.getFirstAlive` in conjunction with this property for fast object pooling and recycling.

   Inherited From * [Phaser.Component.LifeSpan#alive](phaser.component.lifespan#alive)
 Default Value * true
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 50](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L50))   ### 
anchor :Point

  The anchor sets the origin point of the texture.  
The default is 0,0 this means the texture's origin is the top left  
Setting than anchor to 0.5,0.5 means the textures origin is centered  
Setting the anchor to 1,1 would mean the textures origin points will be the bottom right corner

   Inherited From * [PIXI.Sprite#anchor](pixi.sprite#anchor)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L17))   ### 
angle : number

  The angle property is the rotation of the Game Object in *degrees* from its original orientation.

 Values from 0 to 180 represent clockwise rotation; values from 0 to -180 represent counterclockwise rotation.

 Values outside this range are added to or subtracted from 360 to obtain a value within the range.  
For example, the statement player.angle = 450 is the same as player.angle = 90.

 If you wish to work in radians instead of degrees you can use the property `rotation` instead.  
Working in radians is slightly faster as it doesn't have to perform any calculations.

   Inherited From * [Phaser.Component.Angle#angle](phaser.component.angle#angle)
 Source code: [gameobjects/components/Angle.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Angle.js#L29))   ### 
animations : [Phaser.AnimationManager](phaser.animationmanager)

  If the Game Object is enabled for animation (such as a Phaser.Sprite) this is a reference to its AnimationManager instance.  
Through it you can create, play, pause and stop animations.

   Inherited From * [Phaser.Component.Core#animations](phaser.component.core#animations)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 193](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L193))  See  * [Phaser.AnimationManager](phaser.animationmanager)

   ### 
autoCull : boolean

  A Game Object with `autoCull` set to true will check its bounds against the World Camera every frame.  
If it is not intersecting the Camera bounds at any point then it has its `renderable` property set to `false`.  
This keeps the Game Object alive and still processing updates, but forces it to skip the render step entirely.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.AutoCull#autoCull](phaser.component.autocull#autoCull)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L28))   ### 
blendMode : number

  The blend mode to be applied to the sprite. Set to PIXI.blendModes.NORMAL to remove any blend mode.

 Warning: You cannot have a blend mode and a filter active on the same Sprite. Doing so will render the sprite invisible.

   Inherited From * [PIXI.Sprite#blendMode](pixi.sprite#blendMode)
 Default Value * PIXI.blendModes.NORMAL;
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 82](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L82))   ### 
body : [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  `body` is the Game Objects physics body. Once a Game Object is enabled for physics you access all associated  
properties and methods via it.

 By default Game Objects won't add themselves to any physics system and their `body` property will be `null`.

 To enable this Game Object for physics you need to call `game.physics.enable(object, system)` where `object` is this object  
and `system` is the Physics system you are using. If none is given it defaults to `Phaser.Physics.Arcade`.

 You can alternatively call `game.physics.arcade.enable(object)`, or add this Game Object to a physics enabled Group.

 Important: Enabling a Game Object for P2 or Ninja physics will automatically set its `anchor` property to 0.5,  
so the physics body is centered on the Game Object.

 If you need a different result then adjust or re-create the Body shape offsets manually or reset the anchor after enabling physics.

  ##### Type

 * [Phaser.Physics.Arcade.Body](phaser.physics.arcade.body) | [Phaser.Physics.P2.Body](phaser.physics.p2.body) | [Phaser.Physics.Ninja.Body](phaser.physics.ninja.body) | null

  Inherited From * [Phaser.Component.PhysicsBody#body](phaser.component.physicsbody#body)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 91](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L91))   ### 
bottom : number

  The sum of the y and height properties.  
This is the same as `y + height - offsetY`.

   Inherited From * [Phaser.Component.Bounds#bottom](phaser.component.bounds#bottom)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 168](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L168))   ### 
cameraOffset : [Phaser.Point](phaser.point)

  The x/y coordinate offset applied to the top-left of the camera that this Game Object will be drawn at if `fixedToCamera` is true.

 The values are relative to the top-left of the camera view and in addition to any parent of the Game Object on the display list.

   Inherited From * [Phaser.Component.FixedToCamera#cameraOffset](phaser.component.fixedtocamera#cameraOffset)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L86))   ### 
centerX : number

  The center x coordinate of the Game Object.  
This is the same as `(x - offsetX) + (width / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerX](phaser.component.bounds#centerX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L58))   ### 
centerY : number

  The center y coordinate of the Game Object.  
This is the same as `(y - offsetY) + (height / 2)`.

   Inherited From * [Phaser.Component.Bounds#centerY](phaser.component.bounds#centerY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 80](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L80))   ### 
checkWorldBounds : boolean

  If this is set to `true` the Game Object checks if it is within the World bounds each frame. 

 When it is no longer intersecting the world bounds it dispatches the `onOutOfBounds` event.

 If it was *previously* out of bounds but is now intersecting the world bounds again it dispatches the `onEnterBounds` event.

 It also optionally kills the Game Object if `outOfBoundsKill` is `true`.

 When `checkWorldBounds` is enabled it forces the Game Object to calculate its full bounds every frame.

 This is a relatively expensive operation, especially if enabled on hundreds of Game Objects. So enable it only if you know it's required,  
or you have tested performance and find it acceptable.

   Inherited From * [Phaser.Component.InWorld#checkWorldBounds](phaser.component.inworld#checkWorldBounds)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L98))   ### 
[readonly] children : Array.<[DisplayObject](global#DisplayObject)>

  [read-only] The array of children of this container.

  ##### Type

 * Array.<[DisplayObject](global#DisplayObject)>

  Inherited From * [PIXI.DisplayObjectContainer#children](pixi.displayobjectcontainer#children)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 17](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L17))   ### 
<internal> components : Object

  The components this Game Object has installed.

   Inherited From * [Phaser.Component.Core#components](phaser.component.core#components)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 167](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L167))   ### 
cropRect : [Phaser.Rectangle](phaser.rectangle)

  The Rectangle used to crop the texture this Game Object uses.  
Set this property via `crop`.  
If you modify this property directly you must call `updateCrop` in order to have the change take effect.

   Inherited From * [Phaser.Component.Crop#cropRect](phaser.component.crop#cropRect)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L24))   ### 
damage

  Damages the Game Object. This removes the given amount of health from the `health` property.

 If health is taken below or is equal to zero then the `kill` method is called.

   Inherited From * [Phaser.Component.Health#damage](phaser.component.health#damage)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L46))   ### 
data : Object

  An empty Object that belongs to this Game Object.  
This value isn't ever used internally by Phaser, but may be used by your own code, or  
by Phaser Plugins, to store data that needs to be associated with the Game Object,  
without polluting the Game Object directly.

   Inherited From * [Phaser.Component.Core#data](phaser.component.core#data)
 Default Value * {}
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 160](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L160))   ### 
debug : boolean

  A debug flag designed for use with `Game.enableStep`.

   Inherited From * [Phaser.Component.Core#debug](phaser.component.core#debug)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 218](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L218))   ### 
[readonly] deltaX : number

  Returns the delta x value. The difference between world.x now and in the previous frame.

 The value will be positive if the Game Object has moved to the right or negative if to the left.

   Inherited From * [Phaser.Component.Delta#deltaX](phaser.component.delta#deltaX)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L24))   ### 
[readonly] deltaY : number

  Returns the delta y value. The difference between world.y now and in the previous frame.

 The value will be positive if the Game Object has moved down or negative if up.

   Inherited From * [Phaser.Component.Delta#deltaY](phaser.component.delta#deltaY)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L42))   ### 
[readonly] deltaZ : number

  Returns the delta z value. The difference between rotation now and in the previous frame. The delta value.

   Inherited From * [Phaser.Component.Delta#deltaZ](phaser.component.delta#deltaZ)
 Source code: [gameobjects/components/Delta.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js) ([Line 58](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Delta.js#L58))   ### 
[readonly] destroyPhase : boolean

  As a Game Object runs through its destroy method this flag is set to true,  
and can be checked in any sub-systems or plugins it is being destroyed from.

   Inherited From * [Phaser.Component.Destroy#destroyPhase](phaser.component.destroy#destroyPhase)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 22](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L22))   ### 
events : [Phaser.Events](phaser.events)

  All Phaser Game Objects have an Events class which contains all of the events that are dispatched when certain things happen to this  
Game Object, or any of its components.

   Inherited From * [Phaser.Component.Core#events](phaser.component.core#events)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 185](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L185))  See  * [Phaser.Events](phaser.events)

   ### 
exists : boolean

  Controls if this Sprite is processed by the core Phaser game loops and Group loops.

   Inherited From * [PIXI.Sprite#exists](pixi.sprite#exists)
 Default Value * true
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 103](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L103))   ### 
fixedToCamera : boolean

  A Game Object that is "fixed" to the camera uses its x/y coordinates as offsets from the top left of the camera during rendering.

 The values are adjusted at the rendering stage, overriding the Game Objects actual world position.

 The end result is that the Game Object will appear to be 'fixed' to the camera, regardless of where in the game world  
the camera is viewing. This is useful if for example this Game Object is a UI item that you wish to be visible at all times  
regardless where in the world the camera is.

 The offsets are stored in the `cameraOffset` property.

 Note that the `cameraOffset` values are in addition to any parent of this Game Object on the display list.

 Be careful not to set `fixedToCamera` on Game Objects which are in Groups that already have `fixedToCamera` enabled on them.

   Inherited From * [Phaser.Component.FixedToCamera#fixedToCamera](phaser.component.fixedtocamera#fixedToCamera)
 Source code: [gameobjects/components/FixedToCamera.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js) ([Line 56](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/FixedToCamera.js#L56))   ### 
frame : integer

  Gets or sets the current frame index of the texture being used to render this Game Object.

 To change the frame set `frame` to the index of the new frame in the sprite sheet you wish this Game Object to use,  
for example: `player.frame = 4`.

 If the frame index given doesn't exist it will revert to the first frame found in the texture.

 If you are using a texture atlas then you should use the `frameName` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frame](phaser.component.loadtexture#frame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 254](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L254))   ### 
frameName : string

  Gets or sets the current frame name of the texture being used to render this Game Object.

 To change the frame set `frameName` to the name of the new frame in the texture atlas you wish this Game Object to use,  
for example: `player.frameName = "idle"`.

 If the frame name given doesn't exist it will revert to the first frame found in the texture and throw a console warning.

 If you are using a sprite sheet then you should use the `frame` property instead.

 If you wish to fully replace the texture being used see `loadTexture`.

   Inherited From * [Phaser.Component.LoadTexture#frameName](phaser.component.loadtexture#frameName)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 279](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L279))   ### 
[readonly] fresh : boolean

  A Game Object is considered `fresh` if it has just been created or reset and is yet to receive a renderer transform update.  
This property is mostly used internally by the physics systems, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#fresh](phaser.component.core#fresh)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 248](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L248))   ### 
game : [Phaser.Game](phaser.game)

  A reference to the currently running Game.

   Inherited From * [Phaser.Component.Core#game](phaser.component.core#game)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 142](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L142))   ### 
heal

  Heal the Game Object. This adds the given amount of health to the `health` property.

   Inherited From * [Phaser.Component.Health#heal](phaser.component.health#heal)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 90](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L90))   ### 
health : number

  The Game Objects health value. This is a handy property for setting and manipulating health on a Game Object.

 It can be used in combination with the `damage` method or modified directly.

   Inherited From * [Phaser.Component.Health#health](phaser.component.health#health)
 Default Value * 1
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L26))   ### 
height : number

  The height of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#height](pixi.sprite#height)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 144](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L144))   ### 
ignoreChildInput : boolean

  If `ignoreChildInput` is `false` it will allow this objects *children* to be considered as valid for Input events.

 If this property is `true` then the children will *not* be considered as valid for Input events.

 Note that this property isn't recursive: only immediate children are influenced, it doesn't scan further down.

   Inherited From * [PIXI.DisplayObjectContainer#ignoreChildInput](pixi.displayobjectcontainer#ignoreChildInput)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L26))   ### 
[readonly] inCamera : boolean

  Checks if the Game Objects bounds intersect with the Game Camera bounds.  
Returns `true` if they do, otherwise `false` if fully outside of the Cameras bounds.

   Inherited From * [Phaser.Component.AutoCull#inCamera](phaser.component.autocull#inCamera)
 Source code: [gameobjects/components/AutoCull.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/AutoCull.js#L37))   ### 
input : [Phaser.InputHandler](phaser.inputhandler) | null

  The Input Handler for this Game Object.

 By default it is disabled. If you wish this Game Object to process input events you should enable it with: `inputEnabled = true`.

 After you have done this, this property will be a reference to the Phaser InputHandler.

  ##### Type

 * [Phaser.InputHandler](phaser.inputhandler) | null

  Inherited From * [Phaser.Component.InputEnabled#input](phaser.component.inputenabled#input)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L24))   ### 
inputEnabled : boolean

  By default a Game Object won't process any input events. By setting `inputEnabled` to true a Phaser.InputHandler is created  
for this Game Object and it will then start to process click / touch events and more.

 You can then access the Input Handler via `this.input`.

 Note that Input related events are dispatched from `this.events`, i.e.: `events.onInputDown`.

 If you set this property to false it will stop the Input Handler from processing any more input events.

 If you want to *temporarily* disable input for a Game Object, then it's better to set  
`input.enabled = false`, as it won't reset any of the Input Handlers internal properties.  
You can then toggle this back on as needed.

   Inherited From * [Phaser.Component.InputEnabled#inputEnabled](phaser.component.inputenabled#inputEnabled)
 Source code: [gameobjects/components/InputEnabled.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InputEnabled.js#L42))   ### 
[readonly] inWorld : boolean

  Checks if the Game Objects bounds are within, or intersect at any point with the Game World bounds.

   Inherited From * [Phaser.Component.InWorld#inWorld](phaser.component.inworld#inWorld)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 129](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L129))   ### 
key : string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  The key of the image or texture used by this Game Object during rendering.  
If it is a string it's the string used to retrieve the texture from the Phaser Image Cache.  
It can also be an instance of a RenderTexture, BitmapData, Video or PIXI.Texture.  
If a Game Object is created without a key it is automatically assigned the key `__default` which is a 32x32 transparent PNG stored within the Cache.  
If a Game Object is given a key which doesn't exist in the Image Cache it is re-assigned the key `__missing` which is a 32x32 PNG of a green box with a line through it.

  ##### Type

 * string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture)

  Inherited From * [Phaser.Component.Core#key](phaser.component.core#key)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 203](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L203))   ### 
left : number

  The left coordinate of the Game Object.  
This is the same as `x - offsetX`.

   Inherited From * [Phaser.Component.Bounds#left](phaser.component.bounds#left)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 102](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L102))   ### 
lifespan : number

  The lifespan allows you to give a Game Object a lifespan in milliseconds.

 Once the Game Object is 'born' you can set this to a positive value.

 It is automatically decremented by the millisecond equivalent of `game.time.physicsElapsed` each frame.  
When it reaches zero it will call the `kill` method.

 Very handy for particles, bullets, collectibles, or any other short-lived entity.

   Inherited From * [Phaser.Component.LifeSpan#lifespan](phaser.component.lifespan#lifespan)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 65](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L65))   ### 
maxHealth : number

  The Game Objects maximum health value. This works in combination with the `heal` method to ensure  
the health value never exceeds the maximum.

   Inherited From * [Phaser.Component.Health#maxHealth](phaser.component.health#maxHealth)
 Default Value * 100
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 35](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L35))   ### 
name : string

  A user defined name given to this Game Object.  
This value isn't ever used internally by Phaser, it is meant as a game level property.

   Inherited From * [Phaser.Component.Core#name](phaser.component.core#name)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 150](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L150))   ### 
[readonly] offsetX : number

  The amount the Game Object is visually offset from its x coordinate.  
This is the same as `width * anchor.x`.  
It will only be > 0 if anchor.x is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetX](phaser.component.bounds#offsetX)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L24))   ### 
[readonly] offsetY : number

  The amount the Game Object is visually offset from its y coordinate.  
This is the same as `height * anchor.y`.  
It will only be > 0 if anchor.y is not equal to zero.

   Inherited From * [Phaser.Component.Bounds#offsetY](phaser.component.bounds#offsetY)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L42))   ### 
outOfBoundsKill : boolean

  If this and the `checkWorldBounds` property are both set to `true` then the `kill` method is called as soon as `inWorld` returns false.

   Inherited From * [Phaser.Component.InWorld#outOfBoundsKill](phaser.component.inworld#outOfBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 106](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L106))   ### 
outOfCameraBoundsKill : boolean

  If this and the `autoCull` property are both set to `true`, then the `kill` method  
is called as soon as the Game Object leaves the camera bounds.

   Inherited From * [Phaser.Component.InWorld#outOfCameraBoundsKill](phaser.component.inworld#outOfCameraBoundsKill)
 Source code: [gameobjects/components/InWorld.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js) ([Line 115](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/InWorld.js#L115))   ### 
pendingDestroy : boolean

  A Game Object is that is pendingDestroy is flagged to have its destroy method called on the next logic update.  
You can set it directly to allow you to flag an object to be destroyed on its next update.

 This is extremely useful if you wish to destroy an object from within one of its own callbacks  
such as with Buttons or other Input events.

   Inherited From * [Phaser.Component.Core#pendingDestroy](phaser.component.core#pendingDestroy)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 259](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L259))   ### 
[readonly] physicsType : number

  The const physics body type of this object.

   Inherited From * [Phaser.Sprite#physicsType](phaser.sprite#physicsType)
 Source code: [gameobjects/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js) ([Line 61](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js#L61))   ### 
[readonly] previousPosition : [Phaser.Point](phaser.point)

  The position the Game Object was located in the previous frame.

   Inherited From * [Phaser.Component.Core#previousPosition](phaser.component.core#previousPosition)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 225](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L225))   ### 
[readonly] previousRotation : number

  The rotation the Game Object was in set to in the previous frame. Value is in radians.

   Inherited From * [Phaser.Component.Core#previousRotation](phaser.component.core#previousRotation)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L232))   ### 
[readonly] renderOrderID : number

  The render order ID is used internally by the renderer and Input Manager and should not be modified.  
This property is mostly used internally by the renderers, but is exposed for the use of plugins.

   Inherited From * [Phaser.Component.Core#renderOrderID](phaser.component.core#renderOrderID)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 240](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L240))   ### 
right : number

  The right coordinate of the Game Object.  
This is the same as `x + width - offsetX`.

   Inherited From * [Phaser.Component.Bounds#right](phaser.component.bounds#right)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L124))   ### 
scaleMax : [Phaser.Point](phaser.point)

  The maximum scale this Game Object will scale up to. 

 It allows you to prevent a parent from scaling this Game Object higher than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMax](phaser.component.scaleminmax#scaleMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 46](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L46))   ### 
scaleMin : [Phaser.Point](phaser.point)

  The minimum scale this Game Object will scale down to.

 It allows you to prevent a parent from scaling this Game Object lower than the given value.

 Set it to `null` to remove the limit.

   Inherited From * [Phaser.Component.ScaleMinMax#scaleMin](phaser.component.scaleminmax#scaleMin)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 36](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L36))   ### 
setHealth

  Sets the health property of the Game Object to the given amount.  
Will never exceed the `maxHealth` value.

   Inherited From * [Phaser.Component.Health#setHealth](phaser.component.health#setHealth)
 Source code: [gameobjects/components/Health.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js) ([Line 70](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Health.js#L70))   ### 
shader : [PIXI.AbstractFilter](pixi.abstractfilter)

  The shader that will be used to render this Sprite.  
Set to null to remove a current shader.

   Inherited From * [PIXI.Sprite#shader](pixi.sprite#shader)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 93](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L93))   ### 
smoothed : boolean

  Enable or disable texture smoothing for this Game Object.

 It only takes effect if the Game Object is using an image based texture.

 Smoothing is enabled by default.

   Inherited From * [Phaser.Component.Smoothed#smoothed](phaser.component.smoothed#smoothed)
 Source code: [gameobjects/components/Smoothed.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js) ([Line 25](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Smoothed.js#L25))   ### 
texture : [PIXI.Texture](pixi.texture)

  The texture that the sprite is using

   Inherited From * [PIXI.Sprite#texture](pixi.sprite#texture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 28](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L28))   ### 
tint : number

  The tint applied to the sprite. This is a hex value. A value of 0xFFFFFF will remove any tint effect.

   Inherited From * [PIXI.Sprite#tint](pixi.sprite#tint)
 Default Value * 0xFFFFFF
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 54](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L54))   ### 
tintedTexture :Canvas

  A canvas that contains the tinted version of the Sprite (in Canvas mode, WebGL doesn't populate this)

   Inherited From * [PIXI.Sprite#tintedTexture](pixi.sprite#tintedTexture)
 Default Value * null
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 73](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L73))   ### 
top : number

  The y coordinate of the Game Object.  
This is the same as `y - offsetY`.

   Inherited From * [Phaser.Component.Bounds#top](phaser.component.bounds#top)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 146](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L146))   ### 
transformCallback : Function

  The callback that will apply any scale limiting to the worldTransform.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallback](phaser.component.scaleminmax#transformCallback)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 20](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L20))   ### 
transformCallbackContext : Object

  The context under which `transformCallback` is called.

   Inherited From * [Phaser.Component.ScaleMinMax#transformCallbackContext](phaser.component.scaleminmax#transformCallbackContext)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 26](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L26))   ### 
[readonly] type : number

  The const type of this object.

   Inherited From * [Phaser.Sprite#type](phaser.sprite#type)
 Source code: [gameobjects/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js#L55))   ### 
width : number

  The width of the sprite, setting this will actually modify the scale to achieve the value set

   Inherited From * [PIXI.Sprite#width](pixi.sprite#width)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 125](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L125))   ### 
world : [Phaser.Point](phaser.point)

  The world coordinates of this Game Object in pixels.  
Depending on where in the display list this Game Object is placed this value can differ from `position`,  
which contains the x/y coordinates relative to the Game Objects parent.

   Inherited From * [Phaser.Component.Core#world](phaser.component.core#world)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 211](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L211))   ### 
x : number

  The position of the Game Object on the x axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#x](phaser.component.physicsbody#x)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 98](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L98))   ### 
y : number

  The position of the Game Object on the y axis relative to the local coordinates of the parent.

   Inherited From * [Phaser.Component.PhysicsBody#y](phaser.component.physicsbody#y)
 Source code: [gameobjects/components/PhysicsBody.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js) ([Line 124](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/PhysicsBody.js#L124))   ### 
[readonly] z : number

  The z depth of this Game Object within its parent Group.  
No two objects in a Group can have the same z value.  
This value is adjusted automatically whenever the Group hierarchy changes.  
If you wish to re-order the layering of a Game Object then see methods like Group.moveUp or Group.bringToTop.

   Inherited From * [Phaser.Component.Core#z](phaser.component.core#z)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 177](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L177))    Public Methods
--------------

  ### 
addChild(child) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to add to the container |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChild](pixi.displayobjectcontainer#addChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 42](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L42))   ### 
addChildAt(child, index) → {[DisplayObject](global#DisplayObject)}

  Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child to add |
| `index` | Number | The index to place the child in |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was added.

    Inherited From * [PIXI.DisplayObjectContainer#addChildAt](pixi.displayobjectcontainer#addChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 55](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L55))   ### 
alignIn(container, position, offsetX, offsetY) → {Object}

  Aligns this Game Object within another Game Object, or Rectangle, known as the  
'container', to one of 9 possible positions.

 The container must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the container. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`,  
`Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`,  
`Phaser.BOTTOM_CENTER` and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
container, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignIn(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the containers bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the container bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `container` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_CENTER`, `Phaser.CENTER`, `Phaser.RIGHT_CENTER`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignIn](phaser.component.bounds#alignIn)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 223](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L223))   ### 
alignTo(parent, position, offsetX, offsetY) → {Object}

  Aligns this Game Object to the side of another Game Object, or Rectangle, known as the  
'parent', in one of 11 possible positions.

 The parent must be a Game Object, or Phaser.Rectangle object. This can include properties  
such as `World.bounds` or `Camera.view`, for aligning Game Objects within the world  
and camera bounds. Or it can include other Sprites, Images, Text objects, BitmapText,  
TileSprites or Buttons.

 Please note that aligning a Sprite to another Game Object does **not** make it a child of  
the parent. It simply modifies its position coordinates so it aligns with it.

 The position constants you can use are:

 `Phaser.TOP_LEFT` (default), `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`,  
`Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`,  
`Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER`  
and `Phaser.BOTTOM_RIGHT`.

 The Game Objects are placed in such a way that their *bounds* align with the  
parent, taking into consideration rotation, scale and the anchor property.  
This allows you to neatly align Game Objects, irrespective of their position value.

 The optional `offsetX` and `offsetY` arguments allow you to apply extra spacing to the final  
aligned position of the Game Object. For example:

 `sprite.alignTo(background, Phaser.BOTTOM_RIGHT, -20, -20)`

 Would align the `sprite` to the bottom-right, but moved 20 pixels in from the corner.  
Think of the offsets as applying an adjustment to the parents bounds before the alignment takes place.  
So providing a negative offset will 'shrink' the parent bounds by that amount, and providing a positive  
one expands it.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `parent` | [Phaser.Rectangle](phaser.rectangle) | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.Text](phaser.text) | [Phaser.BitmapText](phaser.bitmaptext) | [Phaser.Button](phaser.button) | [Phaser.Graphics](phaser.graphics) | [Phaser.TileSprite](phaser.tilesprite) |  |  | The Game Object or Rectangle with which to align this Game Object to. Can also include properties such as `World.bounds` or `Camera.view`. |
| `position` | integer |  <optional> |  | The position constant. One of `Phaser.TOP_LEFT`, `Phaser.TOP_CENTER`, `Phaser.TOP_RIGHT`, `Phaser.LEFT_TOP`, `Phaser.LEFT_CENTER`, `Phaser.LEFT_BOTTOM`, `Phaser.RIGHT_TOP`, `Phaser.RIGHT_CENTER`, `Phaser.RIGHT_BOTTOM`, `Phaser.BOTTOM_LEFT`, `Phaser.BOTTOM_CENTER` or `Phaser.BOTTOM_RIGHT`. |
| `offsetX` | integer |  <optional> |  0  | A horizontal adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |
| `offsetY` | integer |  <optional> |  0  | A vertical adjustment of the Containers bounds, applied to the aligned position of the Game Object. Use a negative value to shrink the bounds, positive to increase it. |

 ##### Returns

   Object -   This Game Object.

    Inherited From * [Phaser.Component.Bounds#alignTo](phaser.component.bounds#alignTo)
 Source code: [gameobjects/components/Bounds.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js) ([Line 321](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Bounds.js#L321))   ### 
bringToTop() → {PIXI.DisplayObject}

  Brings this Game Object to the top of its parents display list.  
Visually this means it will render over the top of any old child in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will bring it to the top of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#bringToTop](phaser.component.bringtotop#bringToTop)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 24](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L24))   ### 
contains(child) → {Boolean}

  Determines whether the specified display object is a child of the DisplayObjectContainer instance or the instance itself.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |

 ##### Returns

   Boolean -    Inherited From * [PIXI.DisplayObjectContainer#contains](pixi.displayobjectcontainer#contains)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 449](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L449))   ### 
crop(rect, copy)

  Crop allows you to crop the texture being used to display this Game Object.  
Setting a crop rectangle modifies the core texture frame. The Game Object width and height properties will be adjusted accordingly.

 Cropping takes place from the top-left and can be modified in real-time either by providing an updated rectangle object to this method,  
or by modifying `cropRect` property directly and then calling `updateCrop`.

 The rectangle object given to this method can be either a `Phaser.Rectangle` or any other object  
so long as it has public `x`, `y`, `width`, `height`, `right` and `bottom` properties.

 A reference to the rectangle is stored in `cropRect` unless the `copy` parameter is `true`,  
in which case the values are duplicated to a local object.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `rect` | [Phaser.Rectangle](phaser.rectangle) |  |  | The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. |
| `copy` | boolean |  <optional> |  false  | If false `cropRect` will be stored as a reference to the given rect. If true it will copy the rect values into a local Phaser Rectangle object stored in cropRect. |

  Inherited From * [Phaser.Component.Crop#crop](phaser.component.crop#crop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 49](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L49))   ### 
destroy(destroyChildren, destroyTexture)

  Destroys the Game Object. This removes it from its parent group, destroys the input, event and animation handlers if present  
and nulls its reference to `game`, freeing it up for garbage collection.

 If this Game Object has the Events component it will also dispatch the `onDestroy` event.

 You can optionally also destroy the BaseTexture this Game Object is using. Be careful if you've  
more than one Game Object sharing the same BaseTexture.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `destroyChildren` | boolean |  <optional> |  true  | Should every child of this object have its destroy method called as well? |
| `destroyTexture` | boolean |  <optional> |  false  | Destroy the BaseTexture this Game Object is using? Note that if another Game Object is sharing the same BaseTexture it will invalidate it. |

  Inherited From * [Phaser.Component.Destroy#destroy](phaser.component.destroy#destroy)
 Source code: [gameobjects/components/Destroy.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js) ([Line 37](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Destroy.js#L37))   ### 
getBounds(matrix) → {Rectangle}

  Returns the bounds of the Sprite as a rectangle.  
The bounds calculation takes the worldTransform into account.

 It is important to note that the transform is not updated when you call this method.  
So if this Sprite is the child of a Display Object which has had its transform  
updated since the last render pass, those changes will not yet have been applied  
to this Sprites worldTransform. If you need to ensure that all parent transforms  
are factored into this getBounds operation then you should call `updateTransform`  
on the root most object in this Sprites display list first.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `matrix` | Matrix | the transformation matrix of the sprite |

 ##### Returns

   Rectangle -   the framing rectangle

    Inherited From * [PIXI.Sprite#getBounds](pixi.sprite#getBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 199](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L199))   ### 
getChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Returns the child at the specified index

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child at the given index, if any.

    Inherited From * [PIXI.DisplayObjectContainer#getChildAt](pixi.displayobjectcontainer#getChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 153](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L153))   ### 
getChildIndex(child) → {Number}

  Returns the index position of a child DisplayObject instance

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject instance to identify |

 ##### Returns

   Number -   The index position of the child display object to identify

    Inherited From * [PIXI.DisplayObjectContainer#getChildIndex](pixi.displayobjectcontainer#getChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 112](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L112))   ### 
getLocalBounds() → {Rectangle}

  Retrieves the non-global local bounds of the Sprite as a rectangle. The calculation takes all visible children into consideration.

  ##### Returns

   Rectangle -   The rectangular bounding area

    Inherited From * [PIXI.Sprite#getLocalBounds](pixi.sprite#getLocalBounds)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 315](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L315))   ### 
kill()

  Kills the Bullet, freeing it up for re-use by the Weapon bullet pool.  
Also dispatches the `Weapon.onKill` signal.

   Source code: [plugins/weapon/Bullet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/Bullet.js) ([Line 41](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/Bullet.js#L41))   ### 
kill()

  Updates the Bullet, killing as required.

   Source code: [plugins/weapon/Bullet.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/Bullet.js) ([Line 60](https://github.com/photonstorm/phaser/tree/v2.6.2/src/plugins/weapon/Bullet.js#L60))   ### 
loadTexture(key, frame, stopAnimation)

  Changes the base texture the Game Object is using. The old texture is removed and the new one is referenced or fetched from the Cache.

 If your Game Object is using a frame from a texture atlas and you just wish to change to another frame, then see the `frame` or `frameName` properties instead.

 You should only use `loadTexture` if you want to replace the base texture entirely.

 Calling this method causes a WebGL texture update, so use sparingly or in low-intensity portions of your game, or if you know the new texture is already on the GPU.

 You can use the new const `Phaser.PENDING_ATLAS` as the texture key for any sprite.  
Doing this then sets the key to be the `frame` argument (the frame is set to zero). 

 This allows you to create sprites using `load.image` during development, and then change them  
to use a Texture Atlas later in development by simply searching your code for 'PENDING\_ATLAS'  
and swapping it to be the key of the atlas data.

 Note: You cannot use a RenderTexture as a texture for a TileSprite.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `key` | string | [Phaser.RenderTexture](phaser.rendertexture) | [Phaser.BitmapData](phaser.bitmapdata) | [Phaser.Video](phaser.video) | [PIXI.Texture](pixi.texture) |  |  | This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache Image entry, or an instance of a RenderTexture, BitmapData, Video or PIXI.Texture. |
| `frame` | string | number |  <optional> |  | If this Sprite 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. |
| `stopAnimation` | boolean |  <optional> |  true  | If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. |

  Inherited From * [Phaser.Component.LoadTexture#loadTexture](phaser.component.loadtexture#loadTexture)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 51](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L51))   ### 
moveDown() → {PIXI.DisplayObject}

  Moves this Game Object down one place in its parents display list.  
This call has no effect if the Game Object is already at the bottom of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object down within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveDown](phaser.component.bringtotop#moveDown)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 87](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L87))   ### 
moveUp() → {PIXI.DisplayObject}

  Moves this Game Object up one place in its parents display list.  
This call has no effect if the Game Object is already at the top of the display list.

 If this Game Object hasn't been added to a custom Group then this method will move it one object up within the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#moveUp](phaser.component.bringtotop#moveUp)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 66](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L66))   ### 
overlap(displayObject) → {boolean}

  Checks to see if the bounds of this Game Object overlaps with the bounds of the given Display Object,  
which can be a Sprite, Image, TileSprite or anything that extends those such as Button or provides a `getBounds` method and result.

 This check ignores the `hitArea` property if set and runs a `getBounds` comparison on both objects to determine the result.

 Therefore it's relatively expensive to use in large quantities, i.e. with lots of Sprites at a high frequency.  
It should be fine for low-volume testing where physics isn't required.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `displayObject` | [Phaser.Sprite](phaser.sprite) | [Phaser.Image](phaser.image) | [Phaser.TileSprite](phaser.tilesprite) | [Phaser.Button](phaser.button) | PIXI.DisplayObject | The display object to check against. |

 ##### Returns

   boolean -   True if the bounds of this Game Object intersects at any point with the bounds of the given display object.

    Inherited From * [Phaser.Component.Overlap#overlap](phaser.component.overlap#overlap)
 Source code: [gameobjects/components/Overlap.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js) ([Line 29](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Overlap.js#L29))   ### 
play(name, frameRate, loop, killOnComplete) → {[Phaser.Animation](phaser.animation)}

  Plays an Animation.

 The animation should have previously been created via `animations.add`.

 If the animation is already playing calling this again won't do anything.  
If you need to reset an already running animation do so directly on the Animation object itself or via `AnimationManager.stop`.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `name` | string |  |  | The name of the animation to be played, e.g. "fire", "walk", "jump". Must have been previously created via 'AnimationManager.add'. |
| `frameRate` | number |  <optional> |  null  | The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. |
| `loop` | boolean |  <optional> |  false  | Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. |
| `killOnComplete` | boolean |  <optional> |  false  | If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. |

 ##### Returns

   [Phaser.Animation](phaser.animation) -   A reference to playing Animation.

    Inherited From * [Phaser.Component.Animation#play](phaser.component.animation#play)
 Source code: [gameobjects/components/Animation.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js) ([Line 31](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Animation.js#L31))   ### 
<internal> postUpdate()

  Internal method called by the World postUpdate cycle.

   Inherited From * [Phaser.Component.Core#postUpdate](phaser.component.core#postUpdate)
 Internal: * This member is *internal (protected)* and may be modified or removed in the future.
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 338](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L338))   ### 
preUpdate() → {boolean}

  Automatically called by World.preUpdate.

  ##### Returns

   boolean -   True if the Sprite was rendered, otherwise false.

    Inherited From * [Phaser.Sprite#preUpdate](phaser.sprite#preUpdate)
 Source code: [gameobjects/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js) ([Line 107](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/Sprite.js#L107))   ### 
removeChild(child) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The DisplayObject to remove |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChild](pixi.displayobjectcontainer#removeChild)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 171](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L171))   ### 
removeChildAt(index) → {[DisplayObject](global#DisplayObject)}

  Removes a child from the specified index position.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `index` | Number | The index to get the child from |

 ##### Returns

   [DisplayObject](global#DisplayObject) -   The child that was removed.

    Inherited From * [PIXI.DisplayObjectContainer#removeChildAt](pixi.displayobjectcontainer#removeChildAt)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 191](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L191))   ### 
removeChildren(beginIndex, endIndex)

  Removes all children from this container that are within the begin and end indexes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `beginIndex` | Number | The beginning position. Default value is 0. |
| `endIndex` | Number | The ending position. Default value is size of the container. |

  Inherited From * [PIXI.DisplayObjectContainer#removeChildren](pixi.displayobjectcontainer#removeChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 213](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L213))   ### 
reset(x, y, health) → {PIXI.DisplayObject}

  Resets the Game Object.

 This moves the Game Object to the given x/y world coordinates and sets `fresh`, `exists`,  
`visible` and `renderable` to true.

 If this Game Object has the LifeSpan component it will also set `alive` to true and `health` to the given value.

 If this Game Object has a Physics Body it will reset the Body.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `x` | number |  |  | The x coordinate (in world space) to position the Game Object at. |
| `y` | number |  |  | The y coordinate (in world space) to position the Game Object at. |
| `health` | number |  <optional> |  1  | The health to give the Game Object if it has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.Reset#reset](phaser.component.reset#reset)
 Source code: [gameobjects/components/Reset.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js) ([Line 30](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Reset.js#L30))   ### 
resetFrame()

  Resets the texture frame dimensions that the Game Object uses for rendering.

   Inherited From * [Phaser.Component.LoadTexture#resetFrame](phaser.component.loadtexture#resetFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 232](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L232))   ### 
resizeFrame(parent, width, height)

  Resizes the Frame dimensions that the Game Object uses for rendering.

 You shouldn't normally need to ever call this, but in the case of special texture types such as Video or BitmapData  
it can be useful to adjust the dimensions directly in this way.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `parent` | object | The parent texture object that caused the resize, i.e. a Phaser.Video object. |
| `width` | integer | The new width of the texture. |
| `height` | integer | The new height of the texture. |

  Inherited From * [Phaser.Component.LoadTexture#resizeFrame](phaser.component.loadtexture#resizeFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 220](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L220))   ### 
revive(health) → {PIXI.DisplayObject}

  Brings a 'dead' Game Object back to life, optionally resetting its health value in the process.

 A resurrected Game Object has its `alive`, `exists` and `visible` properties all set to true.

 It will dispatch the `onRevived` event. Listen to `events.onRevived` for the signal.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `health` | number |  <optional> |  100  | The health to give the Game Object. Only set if the GameObject has the Health component. |

 ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.LifeSpan#revive](phaser.component.lifespan#revive)
 Source code: [gameobjects/components/LifeSpan.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js) ([Line 78](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LifeSpan.js#L78))   ### 
sendToBack() → {PIXI.DisplayObject}

  Sends this Game Object to the bottom of its parents display list.  
Visually this means it will render below all other children in the same Group.

 If this Game Object hasn't been added to a custom Group then this method will send it to the bottom of the Game World,  
because the World is the root Group from which all Game Objects descend.

  ##### Returns

   PIXI.DisplayObject -   This instance.

    Inherited From * [Phaser.Component.BringToTop#sendToBack](phaser.component.bringtotop#sendToBack)
 Source code: [gameobjects/components/BringToTop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js) ([Line 45](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/BringToTop.js#L45))   ### 
setChildIndex(child, index)

  Changes the position of an existing child in the display object container

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | The child DisplayObject instance for which you want to change the index number |
| `index` | Number | The resulting index number for the child display object |

  Inherited From * [PIXI.DisplayObjectContainer#setChildIndex](pixi.displayobjectcontainer#setChildIndex)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 132](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L132))   ### 
setFrame(frame)

  Sets the texture frame the Game Object uses for rendering.

 This is primarily an internal method used by `loadTexture`, but is exposed for the use of plugins and custom classes.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `frame` | [Phaser.Frame](phaser.frame) | The Frame to be used by the texture. |

  Inherited From * [Phaser.Component.LoadTexture#setFrame](phaser.component.loadtexture#setFrame)
 Source code: [gameobjects/components/LoadTexture.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js) ([Line 155](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/LoadTexture.js#L155))   ### 
setScaleMinMax(minX, minY, maxX, maxY)

  Sets the scaleMin and scaleMax values. These values are used to limit how far this Game Object will scale based on its parent.

 For example if this Game Object has a `minScale` value of 1 and its parent has a `scale` value of 0.5, the 0.5 will be ignored  
and the scale value of 1 will be used, as the parents scale is lower than the minimum scale this Game Object should adhere to.

 By setting these values you can carefully control how Game Objects deal with responsive scaling.

 If only one parameter is given then that value will be used for both scaleMin and scaleMax:  
`setScaleMinMax(1)` = scaleMin.x, scaleMin.y, scaleMax.x and scaleMax.y all = 1

 If only two parameters are given the first is set as scaleMin.x and y and the second as scaleMax.x and y:  
`setScaleMinMax(0.5, 2)` = scaleMin.x and y = 0.5 and scaleMax.x and y = 2

 If you wish to set `scaleMin` with different values for x and y then either modify Game Object.scaleMin directly,  
or pass `null` for the `maxX` and `maxY` parameters.

 Call `setScaleMinMax(null)` to clear all previously set values.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `minX` | number | null | The minimum horizontal scale value this Game Object can scale down to. |
| `minY` | number | null | The minimum vertical scale value this Game Object can scale down to. |
| `maxX` | number | null | The maximum horizontal scale value this Game Object can scale up to. |
| `maxY` | number | null | The maximum vertical scale value this Game Object can scale up to. |

  Inherited From * [Phaser.Component.ScaleMinMax#setScaleMinMax](phaser.component.scaleminmax#setScaleMinMax)
 Source code: [gameobjects/components/ScaleMinMax.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js) ([Line 110](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/ScaleMinMax.js#L110))   ### 
setTexture(texture, destroy)

  Sets the texture of the sprite. Be warned that this doesn't remove or destroy the previous  
texture this Sprite was using.

  ##### Parameters

 

| Name | Type | Argument | Default | Description |
| --- | --- | --- | --- | --- |
| `texture` | [PIXI.Texture](pixi.texture) |  |  | The PIXI texture that is displayed by the sprite |
| `destroy` | Boolean |  <optional> |  false  | Call Texture.destroy on the current texture before replacing it with the new one? |

  Inherited From * [PIXI.Sprite#setTexture](pixi.sprite#setTexture)
 Source code: [pixi/display/Sprite.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js) ([Line 163](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/Sprite.js#L163))   ### 
swapChildren(child, child2)

  Swaps the position of 2 Display Objects within this container.

  ##### Parameters

 

| Name | Type | Description |
| --- | --- | --- |
| `child` | [DisplayObject](global#DisplayObject) | - |
| `child2` | [DisplayObject](global#DisplayObject) | - |

  Inherited From * [PIXI.DisplayObjectContainer#swapChildren](pixi.displayobjectcontainer#swapChildren)
 Source code: [pixi/display/DisplayObjectContainer.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js) ([Line 85](https://github.com/photonstorm/phaser/tree/v2.6.2/src/pixi/display/DisplayObjectContainer.js#L85))   ### 
update()

  Override this method in your own custom objects to handle any update requirements.  
It is called immediately after `preUpdate` and before `postUpdate`.  
Remember if this Game Object has any children you should call update on those too.

   Inherited From * [Phaser.Component.Core#update](phaser.component.core#update)
 Source code: [gameobjects/components/Core.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js) ([Line 328](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Core.js#L328))   ### 
updateCrop()

  If you have set a crop rectangle on this Game Object via `crop` and since modified the `cropRect` property,  
or the rectangle it references, then you need to update the crop frame by calling this method.

   Inherited From * [Phaser.Component.Crop#updateCrop](phaser.component.crop#updateCrop)
 Source code: [gameobjects/components/Crop.js](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js) ([Line 86](https://github.com/photonstorm/phaser/tree/v2.6.2/src/gameobjects/components/Crop.js#L86))   

 © 2016 Richard Davey, Photon Storm Ltd.  
Licensed under the MIT License.  

<http://phaser.io/docs/2.6.2/Phaser.Bullet.html>

phaser