phaser/docs/Phaser.World.html
2014-03-14 06:36:05 +00:00

11820 lines
No EOL
169 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phaser Class: World</title>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/sunlight.default.css">
<link type="text/css" rel="stylesheet" href="styles/site.cerulean.css">
</head>
<body>
<div class="container-fluid">
<div class="navbar navbar-fixed-top navbar-inverse">
<div class="navbar-inner">
<a class="brand" href="index.html">Phaser</a>
<ul class="nav">
<li class="dropdown">
<a href="namespaces.list.html" class="dropdown-toggle" data-toggle="dropdown">Namespaces<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.html">Phaser</a>
</li>
</ul>
</li>
<li class="dropdown">
<a href="classes.list.html" class="dropdown-toggle" data-toggle="dropdown">Classes<b
class="caret"></b></a>
<ul class="dropdown-menu ">
<li>
<a href="Phaser.Animation.html">Animation</a>
</li>
<li>
<a href="Phaser.AnimationManager.html">AnimationManager</a>
</li>
<li>
<a href="Phaser.AnimationParser.html">AnimationParser</a>
</li>
<li>
<a href="Phaser.BitmapData.html">BitmapData</a>
</li>
<li>
<a href="Phaser.BitmapText.html">BitmapText</a>
</li>
<li>
<a href="Phaser.Button.html">Button</a>
</li>
<li>
<a href="Phaser.Cache.html">Cache</a>
</li>
<li>
<a href="Phaser.Camera.html">Camera</a>
</li>
<li>
<a href="Phaser.Canvas.html">Canvas</a>
</li>
<li>
<a href="Phaser.Circle.html">Circle</a>
</li>
<li>
<a href="Phaser.Color.html">Color</a>
</li>
<li>
<a href="Phaser.Device.html">Device</a>
</li>
<li>
<a href="Phaser.Easing.html">Easing</a>
</li>
<li>
<a href="Phaser.Easing.Back.html">Back</a>
</li>
<li>
<a href="Phaser.Easing.Bounce.html">Bounce</a>
</li>
<li>
<a href="Phaser.Easing.Circular.html">Circular</a>
</li>
<li>
<a href="Phaser.Easing.Cubic.html">Cubic</a>
</li>
<li>
<a href="Phaser.Easing.Elastic.html">Elastic</a>
</li>
<li>
<a href="Phaser.Easing.Exponential.html">Exponential</a>
</li>
<li>
<a href="Phaser.Easing.Linear.html">Linear</a>
</li>
<li>
<a href="Phaser.Easing.Quadratic.html">Quadratic</a>
</li>
<li>
<a href="Phaser.Easing.Quartic.html">Quartic</a>
</li>
<li>
<a href="Phaser.Easing.Quintic.html">Quintic</a>
</li>
<li>
<a href="Phaser.Easing.Sinusoidal.html">Sinusoidal</a>
</li>
<li>
<a href="Phaser.Ellipse.html">Ellipse</a>
</li>
<li>
<a href="Phaser.Events.html">Events</a>
</li>
<li>
<a href="Phaser.Filter.html">Filter</a>
</li>
<li>
<a href="Phaser.Frame.html">Frame</a>
</li>
<li>
<a href="Phaser.FrameData.html">FrameData</a>
</li>
<li>
<a href="Phaser.Game.html">Game</a>
</li>
<li>
<a href="Phaser.GameObjectCreator.html">GameObjectCreator</a>
</li>
<li>
<a href="Phaser.GameObjectFactory.html">GameObjectFactory</a>
</li>
<li>
<a href="Phaser.Gamepad.html">Gamepad</a>
</li>
<li>
<a href="Phaser.GamepadButton.html">GamepadButton</a>
</li>
<li>
<a href="Phaser.Graphics.html">Graphics</a>
</li>
<li>
<a href="Phaser.Group.html">Group</a>
</li>
<li>
<a href="Phaser.Image.html">Image</a>
</li>
<li>
<a href="Phaser.Input.html">Input</a>
</li>
<li>
<a href="Phaser.InputHandler.html">InputHandler</a>
</li>
<li>
<a href="Phaser.Key.html">Key</a>
</li>
<li>
<a href="Phaser.Keyboard.html">Keyboard</a>
</li>
<li>
<a href="Phaser.Line.html">Line</a>
</li>
<li>
<a href="Phaser.LinkedList.html">LinkedList</a>
</li>
<li>
<a href="Phaser.Loader.html">Loader</a>
</li>
<li>
<a href="Phaser.LoaderParser.html">LoaderParser</a>
</li>
<li>
<a href="Phaser.Math.html">Math</a>
</li>
<li>
<a href="Phaser.Mouse.html">Mouse</a>
</li>
<li>
<a href="Phaser.MSPointer.html">MSPointer</a>
</li>
<li>
<a href="Phaser.Net.html">Net</a>
</li>
<li>
<a href="Phaser.Particles.html">Particles</a>
</li>
<li>
<a href="Phaser.Particles.Arcade.Emitter.html">Emitter</a>
</li>
<li>
<a href="Phaser.Physics.html">Physics</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.html">Arcade</a>
</li>
<li>
<a href="Phaser.Physics.Arcade.Body.html">Body</a>
</li>
<li>
<a href="Phaser.Physics.Ninja.html">Ninja</a>
</li>
<li>
<a href="Phaser.Physics.Ninja.AABB.html">AABB</a>
</li>
<li>
<a href="Phaser.Physics.Ninja.Body.html">Body</a>
</li>
<li>
<a href="Phaser.Physics.Ninja.Circle.html">Circle</a>
</li>
<li>
<a href="Phaser.Physics.Ninja.Tile.html">Tile</a>
</li>
<li>
<a href="Phaser.Physics.P2.html">P2</a>
</li>
<li>
<a href="Phaser.Physics.P2.Body.html">Body</a>
</li>
<li>
<a href="Phaser.Physics.P2.BodyDebug.html">BodyDebug</a>
</li>
<li>
<a href="Phaser.Physics.P2.CollisionGroup.html">CollisionGroup</a>
</li>
<li>
<a href="Phaser.Physics.P2.ContactMaterial.html">ContactMaterial</a>
</li>
<li>
<a href="Phaser.Physics.P2.DistanceConstraint.html">DistanceConstraint</a>
</li>
<li>
<a href="Phaser.Physics.P2.GearConstraint.html">GearConstraint</a>
</li>
<li>
<a href="Phaser.Physics.P2.InversePointProxy.html">InversePointProxy</a>
</li>
<li>
<a href="Phaser.Physics.P2.LockConstraint.html">LockConstraint</a>
</li>
<li>
<a href="Phaser.Physics.P2.Material.html">Material</a>
</li>
<li>
<a href="Phaser.Physics.P2.PointProxy.html">PointProxy</a>
</li>
<li>
<a href="Phaser.Physics.P2.PrismaticConstraint.html">PrismaticConstraint</a>
</li>
<li>
<a href="Phaser.Physics.P2.RevoluteConstraint.html">RevoluteConstraint</a>
</li>
<li>
<a href="Phaser.Physics.P2.Spring.html">Spring</a>
</li>
<li>
<a href="Phaser.Plugin.html">Plugin</a>
</li>
<li>
<a href="Phaser.PluginManager.html">PluginManager</a>
</li>
<li>
<a href="Phaser.Point.html">Point</a>
</li>
<li>
<a href="Phaser.Pointer.html">Pointer</a>
</li>
<li>
<a href="Phaser.Polygon.html">Polygon</a>
</li>
<li>
<a href="Phaser.QuadTree.html">QuadTree</a>
</li>
<li>
<a href="Phaser.RandomDataGenerator.html">RandomDataGenerator</a>
</li>
<li>
<a href="Phaser.Rectangle.html">Rectangle</a>
</li>
<li>
<a href="Phaser.RenderTexture.html">RenderTexture</a>
</li>
<li>
<a href="Phaser.RequestAnimationFrame.html">RequestAnimationFrame</a>
</li>
<li>
<a href="Phaser.RetroFont.html">RetroFont</a>
</li>
<li>
<a href="Phaser.ScaleManager.html">ScaleManager</a>
</li>
<li>
<a href="Phaser.Signal.html">Signal</a>
</li>
<li>
<a href="Phaser.SinglePad.html">SinglePad</a>
</li>
<li>
<a href="Phaser.Sound.html">Sound</a>
</li>
<li>
<a href="Phaser.SoundManager.html">SoundManager</a>
</li>
<li>
<a href="Phaser.Sprite.html">Sprite</a>
</li>
<li>
<a href="Phaser.SpriteBatch.html">SpriteBatch</a>
</li>
<li>
<a href="Phaser.Stage.html">Stage</a>
</li>
<li>
<a href="Phaser.State.html">State</a>
</li>
<li>
<a href="Phaser.StateManager.html">StateManager</a>
</li>
<li>
<a href="Phaser.Text.html">Text</a>
</li>
<li>
<a href="Phaser.Tile.html">Tile</a>
</li>
<li>
<a href="Phaser.Tilemap.html">Tilemap</a>
</li>
<li>
<a href="Phaser.TilemapLayer.html">TilemapLayer</a>
</li>
<li>
<a href="Phaser.TilemapParser.html">TilemapParser</a>
</li>
<li>
<a href="Phaser.Tileset.html">Tileset</a>
</li>
<li>
<a href="Phaser.TileSprite.html">TileSprite</a>
</li>
<li>
<a href="Phaser.Time.html">Time</a>
</li>
<li>
<a href="Phaser.Timer.html">Timer</a>
</li>
<li>
<a href="Phaser.TimerEvent.html">TimerEvent</a>
</li>
<li>
<a href="Phaser.Touch.html">Touch</a>
</li>
<li>
<a href="Phaser.Tween.html">Tween</a>
</li>
<li>
<a href="Phaser.TweenManager.html">TweenManager</a>
</li>
<li>
<a href="Phaser.Utils.html">Utils</a>
</li>
<li>
<a href="Phaser.Utils.Debug.html">Debug</a>
</li>
<li>
<a href="Phaser.World.html">World</a>
</li>
<li>
<a href="SignalBinding.html">SignalBinding</a>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="row-fluid">
<div class="span8">
<div id="main">
<h1 class="page-title">Class: World</h1>
<section>
<header>
<h2>
<span class="ancestors"><a href="Phaser.html">Phaser</a>.</span>
World
</h2>
<div class="class-description"><p>Phaser.World</p></div>
</header>
<article>
<div class="container-overview">
<dt>
<h4 class="name" id="World"><span class="type-signature"></span>new World<span class="signature">(game)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>&quot;This world is but a canvas to our imagination.&quot; - Henry David Thoreau</p>
<p>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.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>game</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
</td>
<td class="description last"><p>Reference to the current game instance.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-19">line 19</a>
</li></ul></dd>
</dl>
</dd>
</div>
<h3 class="subsection-title">Extends</h3>
<ul>
<li><a href="Phaser.Group.html">Phaser.Group</a></li>
</ul>
<h3 class="subsection-title">Members</h3>
<dl>
<dt>
<h4 class="name" id="alive"><span class="type-signature"></span>alive<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>alive</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>The alive property is useful for Groups that are children of other Groups and need to be included/excluded in checks like forEachAlive.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#alive">Phaser.Group#alive</a>
</li></dd>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>true</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-69">line 69</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="alpha"><span class="type-signature"></span>alpha<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>alpha</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The alpha value of the Group container.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#alpha">Phaser.Group#alpha</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1548">line 1548</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="angle"><span class="type-signature"></span>angle<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>The angle of rotation of the Group container. 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.</p>
</div>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>angle</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The angle of rotation given in degrees, where 0 degrees = to the right.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#angle">Phaser.Group#angle</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1489">line 1489</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="bounds"><span class="type-signature"></span>bounds<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>The World has no fixed size, but it does have a bounds outside of which objects are no longer considered as being &quot;in world&quot; 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.</p>
</div>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>bounds</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Rectangle.html">Phaser.Rectangle</a></span>
</td>
<td class="description last"><p>Bound of this world that objects can not escape from.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-30">line 30</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="camera"><span class="type-signature"></span>camera<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>camera</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Camera.html">Phaser.Camera</a></span>
</td>
<td class="description last"><p>Camera instance.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-35">line 35</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="cameraOffset"><span class="type-signature"></span>cameraOffset<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cameraOffset</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Point.html">Phaser.Point</a></span>
</td>
<td class="description last"><p>If this object is fixedToCamera then this stores the x/y offset that its drawn at, from the top-left of the camera view.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#cameraOffset">Phaser.Group#cameraOffset</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-100">line 100</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="centerX"><span class="type-signature">&lt;readonly> </span>centerX<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>centerX</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Gets the X position corresponding to the center point of the world.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-141">line 141</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="centerY"><span class="type-signature">&lt;readonly> </span>centerY<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>centerY</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Gets the Y position corresponding to the center point of the world.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-154">line 154</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="cursor"><span class="type-signature"></span>cursor<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>The cursor is a simple way to iterate through the objects in a Group using the Group.next and Group.previous functions.
The cursor is set to the first child added to the Group and doesn't change unless you call next, previous or set it directly with Group.cursor.</p>
</div>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>cursor</code></td>
<td class="type">
<span class="param-type">any</span>
</td>
<td class="description last"><p>The current display object that the Group cursor is pointing to.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#cursor">Phaser.Group#cursor</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-95">line 95</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="enableBody"><span class="type-signature"></span>enableBody<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enableBody</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If true all Sprites created by, or added to this Group, will have a physics body enabled on them. Change the body type with <code>Group.physicsBodyType</code>.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#enableBody">Phaser.Group#enableBody</a>
</li></dd>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>false</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-106">line 106</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="enableBodyDebug"><span class="type-signature"></span>enableBodyDebug<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>enableBodyDebug</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If true when a physics body is created (via Group.enableBody) it will create a physics debug object as well. Only works for P2 bodies.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#enableBodyDebug">Phaser.Group#enableBodyDebug</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-111">line 111</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="exists"><span class="type-signature"></span>exists<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>exists</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If exists is true the Group is updated, otherwise it is skipped.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#exists">Phaser.Group#exists</a>
</li></dd>
<dt class="tag-default">Default Value:</dt>
<dd class="tag-default"><ul class="dummy"><li>true</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-75">line 75</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="fixedToCamera"><span class="type-signature"></span>fixedToCamera<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>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</p>
</div>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>fixedToCamera</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>Set to true to fix this Group to the Camera at its current world coordinates.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#fixedToCamera">Phaser.Group#fixedToCamera</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1507">line 1507</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="game"><span class="type-signature"></span>game<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>game</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Game.html">Phaser.Game</a></span>
</td>
<td class="description last"><p>A reference to the currently running Game.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#game">Phaser.Group#game</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-28">line 28</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="height"><span class="type-signature"></span>height<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Gets or sets the current height of the game world.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-125">line 125</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="length"><span class="type-signature">&lt;readonly> </span>length<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>length</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The total number of children in this Group, regardless of their exists/alive status.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#length">Phaser.Group#length</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1474">line 1474</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="name"><span class="type-signature"></span>name<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>name</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>A name for this Group. Not used internally but useful for debugging.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#name">Phaser.Group#name</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-38">line 38</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="physicsBodyType"><span class="type-signature"></span>physicsBodyType<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>physicsBodyType</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>If Group.enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#physicsBodyType">Phaser.Group#physicsBodyType</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-116">line 116</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="randomX"><span class="type-signature">&lt;readonly> </span>randomX<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>randomX</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Gets a random integer which is lesser than or equal to the current width of the game world.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-167">line 167</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="randomY"><span class="type-signature">&lt;readonly> </span>randomY<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>randomY</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Gets a random integer which is lesser than or equal to the current height of the game world.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-189">line 189</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="rotation"><span class="type-signature"></span>rotation<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>The angle of rotation of the Group container. 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.</p>
</div>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>rotation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The angle of rotation given in radians.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#rotation">Phaser.Group#rotation</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1544">line 1544</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="scale"><span class="type-signature"></span>scale<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>scale</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Point.html">Phaser.Point</a></span>
</td>
<td class="description last"><p>The scale of the Group container.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#scale">Phaser.Group#scale</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-84">line 84</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="total"><span class="type-signature">&lt;readonly> </span>total<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>total</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The total number of children in this Group who have a state of exists = true.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#total">Phaser.Group#total</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1459">line 1459</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="type"><span class="type-signature">&lt;protected> </span>type<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Internal Phaser Type value.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#type">Phaser.Group#type</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-63">line 63</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="visible"><span class="type-signature"></span>visible<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>visible</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>The visible state of the Group. Non-visible Groups and all of their children are not rendered.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#visible">Phaser.Group#visible</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1546">line 1546</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="width"><span class="type-signature"></span>width<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Gets or sets the current width of the game world.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-109">line 109</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="x"><span class="type-signature"></span>x<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>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.</p>
</div>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The x coordinate of the Group container.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#x">Phaser.Group#x</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1540">line 1540</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="y"><span class="type-signature"></span>y<span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>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.</p>
</div>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The y coordinate of the Group container.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#y">Phaser.Group#y</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1542">line 1542</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="z"><span class="type-signature"></span>z<span class="type-signature"></span></h4>
</dt>
<dd>
<dl class="details">
<h5 class="subsection-title">Properties:</h5>
<dl>
<table class="props table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>z</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The z-depth value of this object within its Group (remember the World is a Group as well). No two objects in a Group can have the same z value.</p></td>
</tr>
</tbody>
</table>
</dl>
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#z">Phaser.Group#z</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-57">line 57</a>
</li></ul></dd>
</dl>
</dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<dl>
<dt>
<h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(child)</span><span class="type-signature"> &rarr; {*}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds an existing object to this Group. The object can be an instance of Phaser.Sprite, Phaser.Button or any other display object.
The child is automatically added to the top of the Group, so renders on-top of everything else within the Group. If you need to control
that then see the addAt method.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>An instance of Phaser.Sprite, Phaser.Button or any other display object..</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#add">Phaser.Group#add</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-176">line 176</a>
</li></ul></dd>
<dt class="tag-see">See:</dt>
<dd class="tag-see">
<ul>
<li><a href="Phaser.Group.html#create">Phaser.Group#create</a></li>
<li><a href="Phaser.Group.html#addAt">Phaser.Group#addAt</a></li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The child that was added to the Group.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addAll"><span class="type-signature"></span>addAll<span class="signature">(property, amount, checkAlive, checkVisible)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>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.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>property</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The property to increment, for example 'body.velocity.x' or 'angle'.</p></td>
</tr>
<tr>
<td class="name"><code>amount</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50.</p></td>
</tr>
<tr>
<td class="name"><code>checkAlive</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If true the property will only be changed if the child is alive.</p></td>
</tr>
<tr>
<td class="name"><code>checkVisible</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If true the property will only be changed if the child is visible.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#addAll">Phaser.Group#addAll</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-705">line 705</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="addAt"><span class="type-signature"></span>addAt<span class="signature">(child, index)</span><span class="type-signature"> &rarr; {*}</span></h4>
</dt>
<dd>
<div class="description">
<p>Adds an existing object to this Group. The object can be an instance of Phaser.Sprite, Phaser.Button or any other display object.
The child is added to the Group at the location specified by the index value, this allows you to control child ordering.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>An instance of Phaser.Sprite, Phaser.Button or any other display object..</p></td>
</tr>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The index within the Group to insert the child to.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#addAt">Phaser.Group#addAt</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-215">line 215</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The child that was added to the Group.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="ascendingSortHandler"><span class="type-signature"></span>ascendingSortHandler<span class="signature">(a, b)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>An internal helper function for the sort process.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>The first object being sorted.</p></td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>The second object being sorted.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#ascendingSortHandler">Phaser.Group#ascendingSortHandler</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1088">line 1088</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="boot"><span class="type-signature">&lt;protected> </span>boot<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Initialises the game world.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-42">line 42</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="bringToTop"><span class="type-signature"></span>bringToTop<span class="signature">(child)</span><span class="type-signature"> &rarr; {*}</span></h4>
</dt>
<dd>
<div class="description">
<p>Brings the given child to the top of this Group so it renders above all other children.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>The child to bring to the top of this Group.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#bringToTop">Phaser.Group#bringToTop</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-425">line 425</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The child that was moved.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="callAll"><span class="type-signature"></span>callAll<span class="signature">(method, <span class="optional">context</span>, parameter)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Calls a function on all of the children regardless if they are dead or alive (see callAllExists if you need control over that)
After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>method</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>A string containing the name of the function that will be called. The function must exist on the child.</p></td>
</tr>
<tr>
<td class="name"><code>context</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>A string containing the context under which the method will be executed. Set to null to default to the child.</p></td>
</tr>
<tr>
<td class="name"><code>parameter</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="attributes">
&lt;repeatable><br>
</td>
<td class="default">
</td>
<td class="description last"><p>Additional parameters that will be passed to the method.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#callAll">Phaser.Group#callAll</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-845">line 845</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="callAllExists"><span class="type-signature"></span>callAllExists<span class="signature">(callback, existsValue, parameter)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Calls a function on all of the children that have exists=true in this Group.
After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>The function that exists on the children that will be called.</p></td>
</tr>
<tr>
<td class="name"><code>existsValue</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
</td>
<td class="description last"><p>Only children with exists=existsValue will be called.</p></td>
</tr>
<tr>
<td class="name"><code>parameter</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="attributes">
&lt;repeatable><br>
</td>
<td class="description last"><p>Additional parameters that will be passed to the callback.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#callAllExists">Phaser.Group#callAllExists</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-769">line 769</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="callbackFromArray"><span class="type-signature">&lt;protected> </span>callbackFromArray<span class="signature">(child, callback, length)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Returns a reference to a function that exists on a child of the Group based on the given callback array.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>The object to inspect.</p></td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="description last"><p>The array of function names.</p></td>
</tr>
<tr>
<td class="name"><code>length</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The size of the array (pre-calculated in callAll).</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#callbackFromArray">Phaser.Group#callbackFromArray</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-792">line 792</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="countDead"><span class="type-signature"></span>countDead<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
</dt>
<dd>
<div class="description">
<p>Call this function to find out how many members of the group are dead.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#countDead">Phaser.Group#countDead</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1286">line 1286</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The number of children flagged as dead.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="countLiving"><span class="type-signature"></span>countLiving<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
</dt>
<dd>
<div class="description">
<p>Call this function to find out how many members of the group are alive.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#countLiving">Phaser.Group#countLiving</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1274">line 1274</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The number of children flagged as alive.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="create"><span class="type-signature"></span>create<span class="signature">(x, y, key, <span class="optional">frame</span>, <span class="optional">exists</span>)</span><span class="type-signature"> &rarr; {<a href="Phaser.Sprite.html">Phaser.Sprite</a>}</span></h4>
</dt>
<dd>
<div class="description">
<p>Automatically creates a new Phaser.Sprite object and adds it to the top of this Group.
Useful if you don't need to create the Sprite instances before-hand.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The x coordinate to display the newly created Sprite at. The value is in relation to the Group.x point.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The y coordinate to display the newly created Sprite at. The value is in relation to the Group.y point.</p></td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The Game.cache key of the image that this Sprite will use.</p></td>
</tr>
<tr>
<td class="name"><code>frame</code></td>
<td class="type">
<span class="param-type">number</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>If the Sprite image contains multiple frames you can specify which one to use here.</p></td>
</tr>
<tr>
<td class="name"><code>exists</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
true
</td>
<td class="description last"><p>The default exists state of the Sprite.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#create">Phaser.Group#create</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-272">line 272</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The child that was created.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="createMultiple"><span class="type-signature"></span>createMultiple<span class="signature">(quantity, key, <span class="optional">frame</span>, <span class="optional">exists</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Automatically creates multiple Phaser.Sprite objects and adds them to the top of this Group.
Useful if you need to quickly generate a pool of identical sprites, such as bullets. By default the sprites will be set to not exist
and will be positioned at 0, 0 (relative to the Group.x/y)</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>quantity</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The number of Sprites to create.</p></td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The Game.cache key of the image that this Sprite will use.</p></td>
</tr>
<tr>
<td class="name"><code>frame</code></td>
<td class="type">
<span class="param-type">number</span>
|
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>If the Sprite image contains multiple frames you can specify which one to use here.</p></td>
</tr>
<tr>
<td class="name"><code>exists</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>The default exists state of the Sprite.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#createMultiple">Phaser.Group#createMultiple</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-317">line 317</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="descendingSortHandler"><span class="type-signature"></span>descendingSortHandler<span class="signature">(a, b)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>An internal helper function for the sort process.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>a</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>The first object being sorted.</p></td>
</tr>
<tr>
<td class="name"><code>b</code></td>
<td class="type">
<span class="param-type">object</span>
</td>
<td class="description last"><p>The second object being sorted.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#descendingSortHandler">Phaser.Group#descendingSortHandler</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1119">line 1119</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="destroy"><span class="type-signature"></span>destroy<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Destroyer of worlds.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-95">line 95</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="divideAll"><span class="type-signature"></span>divideAll<span class="signature">(property, amount, checkAlive, checkVisible)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Divides the given property by the amount on all children in this Group.
Group.divideAll('x', 2) will half the child.x value.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>property</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The property to divide, for example 'body.velocity.x' or 'angle'.</p></td>
</tr>
<tr>
<td class="name"><code>amount</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50.</p></td>
</tr>
<tr>
<td class="name"><code>checkAlive</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If true the property will only be changed if the child is alive.</p></td>
</tr>
<tr>
<td class="name"><code>checkVisible</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If true the property will only be changed if the child is visible.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#divideAll">Phaser.Group#divideAll</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-753">line 753</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="forEach"><span class="type-signature"></span>forEach<span class="signature">(callback, callbackContext, checkExists)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Allows you to call your own function on each member of this Group. You must pass the callback and context in which it will run.
After the checkExists parameter you can add as many parameters as you like, which will all be passed to the callback along with the child.
For example: Group.forEach(awardBonusGold, this, true, 100, 500)
Note: Currently this will skip any children which are Groups themselves.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>The function that will be called. Each child of the Group will be passed to it as its first parameter.</p></td>
</tr>
<tr>
<td class="name"><code>callbackContext</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The context in which the function should be called (usually 'this').</p></td>
</tr>
<tr>
<td class="name"><code>checkExists</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If set only children with exists=true will be passed to the callback, otherwise all children will be passed.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#forEach">Phaser.Group#forEach</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-968">line 968</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="forEachAlive"><span class="type-signature"></span>forEachAlive<span class="signature">(callback, callbackContext)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Allows you to call your own function on each alive member of this Group (where child.alive=true). You must pass the callback and context in which it will run.
You can add as many parameters as you like, which will all be passed to the callback along with the child.
For example: Group.forEachAlive(causeDamage, this, 500)</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>The function that will be called. Each child of the Group will be passed to it as its first parameter.</p></td>
</tr>
<tr>
<td class="name"><code>callbackContext</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The context in which the function should be called (usually 'this').</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#forEachAlive">Phaser.Group#forEachAlive</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1018">line 1018</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="forEachDead"><span class="type-signature"></span>forEachDead<span class="signature">(callback, callbackContext)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Allows you to call your own function on each dead member of this Group (where alive=false). You must pass the callback and context in which it will run.
You can add as many parameters as you like, which will all be passed to the callback along with the child.
For example: Group.forEachDead(bringToLife, this)</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>The function that will be called. Each child of the Group will be passed to it as its first parameter.</p></td>
</tr>
<tr>
<td class="name"><code>callbackContext</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The context in which the function should be called (usually 'this').</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#forEachDead">Phaser.Group#forEachDead</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1036">line 1036</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="forEachExists"><span class="type-signature"></span>forEachExists<span class="signature">(callback, callbackContext)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Allows you to call your own function on each member of this Group where child.exists=true. You must pass the callback and context in which it will run.
You can add as many parameters as you like, which will all be passed to the callback along with the child.
For example: Group.forEachExists(causeDamage, this, 500)</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="description last"><p>The function that will be called. Each child of the Group will be passed to it as its first parameter.</p></td>
</tr>
<tr>
<td class="name"><code>callbackContext</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="description last"><p>The context in which the function should be called (usually 'this').</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#forEachExists">Phaser.Group#forEachExists</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1000">line 1000</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getAt"><span class="type-signature"></span>getAt<span class="signature">(index)</span><span class="type-signature"> &rarr; {*}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns the child found at the given index within this Group.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The index to return the child from.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#getAt">Phaser.Group#getAt</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-252">line 252</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The child that was found at the given index. If the index was out of bounds then this will return -1.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getBottom"><span class="type-signature"></span>getBottom<span class="signature">()</span><span class="type-signature"> &rarr; {Any}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns the child at the bottom of this Group. The bottom is the one being displayed (rendered) below every other child.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#getBottom">Phaser.Group#getBottom</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1259">line 1259</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The child at the bottom of the Group.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Any</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getFirstAlive"><span class="type-signature"></span>getFirstAlive<span class="signature">()</span><span class="type-signature"> &rarr; {Any}</span></h4>
</dt>
<dd>
<div class="description">
<p>Call this function to retrieve the first object with alive === true in the group.
This is handy for checking if everything has been wiped out, or choosing a squad leader, etc.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#getFirstAlive">Phaser.Group#getFirstAlive</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1218">line 1218</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The first alive child, or null if none found.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Any</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getFirstDead"><span class="type-signature"></span>getFirstDead<span class="signature">()</span><span class="type-signature"> &rarr; {Any}</span></h4>
</dt>
<dd>
<div class="description">
<p>Call this function to retrieve the first object with alive === false in the group.
This is handy for checking if everything has been wiped out, or choosing a squad leader, etc.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#getFirstDead">Phaser.Group#getFirstDead</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1231">line 1231</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The first dead child, or null if none found.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Any</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getFirstExists"><span class="type-signature"></span>getFirstExists<span class="signature">(state)</span><span class="type-signature"> &rarr; {Any}</span></h4>
</dt>
<dd>
<div class="description">
<p>Call this function to retrieve the first object with exists == (the given state) in the Group.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>state</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>True or false.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#getFirstExists">Phaser.Group#getFirstExists</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1200">line 1200</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The first child, or null if none found.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Any</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getIndex"><span class="type-signature"></span>getIndex<span class="signature">(child)</span><span class="type-signature"> &rarr; {number}</span></h4>
</dt>
<dd>
<div class="description">
<p>Get the index position of the given child in this Group. This should always match the childs z property.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>The child to get the index for.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#getIndex">Phaser.Group#getIndex</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-545">line 545</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The index of the child or -1 if it's not a member of this Group.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">number</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getRandom"><span class="type-signature"></span>getRandom<span class="signature">(startIndex, length)</span><span class="type-signature"> &rarr; {Any}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns a member at random from the group.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>startIndex</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Optional offset off the front of the array. Default value is 0, or the beginning of the array.</p></td>
</tr>
<tr>
<td class="name"><code>length</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Optional restriction on the number of values you want to randomly select from.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#getRandom">Phaser.Group#getRandom</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1298">line 1298</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>A random child of this Group.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Any</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="getTop"><span class="type-signature"></span>getTop<span class="signature">()</span><span class="type-signature"> &rarr; {Any}</span></h4>
</dt>
<dd>
<div class="description">
<p>Returns the child at the top of this Group. The top is the one being displayed (rendered) above every other child.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#getTop">Phaser.Group#getTop</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1244">line 1244</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The child at the top of the Group.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Any</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="iterate"><span class="type-signature"></span>iterate<span class="signature">(key, value, returnType, <span class="optional">callback</span>, <span class="optional">callbackContext</span>)</span><span class="type-signature"> &rarr; {any}</span></h4>
</dt>
<dd>
<div class="description">
<p>Iterates over the children of the Group. When a child has a property matching key that equals the given value, it is considered as a match.
Matched children can be sent to the optional callback, or simply returned or counted.
You can add as many callback parameters as you like, which will all be passed to the callback along with the child, after the callbackContext parameter.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The child property to check, i.e. 'exists', 'alive', 'health'</p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">any</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>If child.key === this value it will be considered a match. Note that a strict comparison is used.</p></td>
</tr>
<tr>
<td class="name"><code>returnType</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>How to return the data from this method. Either Phaser.Group.RETURN_NONE, Phaser.Group.RETURN_TOTAL or Phaser.Group.RETURN_CHILD.</p></td>
</tr>
<tr>
<td class="name"><code>callback</code></td>
<td class="type">
<span class="param-type">function</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
null
</td>
<td class="description last"><p>Optional function that will be called on each matching child. Each child of the Group will be passed to it as its first parameter.</p></td>
</tr>
<tr>
<td class="name"><code>callbackContext</code></td>
<td class="type">
<span class="param-type">Object</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
</td>
<td class="description last"><p>The context in which the function should be called (usually 'this').</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#iterate">Phaser.Group#iterate</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1143">line 1143</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>Returns either a numeric total (if RETURN_TOTAL was specified) or the child object.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">any</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="moveDown"><span class="type-signature"></span>moveDown<span class="signature">(child)</span><span class="type-signature"> &rarr; {*}</span></h4>
</dt>
<dd>
<div class="description">
<p>Moves the given child down one place in this Group unless it's already at the top.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>The child to move down in the Group.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#moveDown">Phaser.Group#moveDown</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-487">line 487</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The child that was moved.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="moveUp"><span class="type-signature"></span>moveUp<span class="signature">(child)</span><span class="type-signature"> &rarr; {*}</span></h4>
</dt>
<dd>
<div class="description">
<p>Moves the given child up one place in this Group unless it's already at the top.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>The child to move up in the Group.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#moveUp">Phaser.Group#moveUp</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-463">line 463</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The child that was moved.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="multiplyAll"><span class="type-signature"></span>multiplyAll<span class="signature">(property, amount, checkAlive, checkVisible)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Multiplies the given property by the amount on all children in this Group.
Group.multiplyAll('x', 2) will x2 the child.x value.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>property</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The property to multiply, for example 'body.velocity.x' or 'angle'.</p></td>
</tr>
<tr>
<td class="name"><code>amount</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20.</p></td>
</tr>
<tr>
<td class="name"><code>checkAlive</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If true the property will only be changed if the child is alive.</p></td>
</tr>
<tr>
<td class="name"><code>checkVisible</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If true the property will only be changed if the child is visible.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#multiplyAll">Phaser.Group#multiplyAll</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-737">line 737</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="next"><span class="type-signature"></span>next<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Advances the Group cursor to the next object in the Group. If it's at the end of the Group it wraps around to the first object.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#next">Phaser.Group#next</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-356">line 356</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="postUpdate"><span class="type-signature">&lt;protected> </span>postUpdate<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>The core postUpdate - as called by World.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#postUpdate">Phaser.Group#postUpdate</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-945">line 945</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="preUpdate"><span class="type-signature">&lt;protected> </span>preUpdate<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>The core preUpdate - as called by World.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#preUpdate">Phaser.Group#preUpdate</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-905">line 905</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="previous"><span class="type-signature"></span>previous<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Moves the Group cursor to the previous object in the Group. If it's at the start of the Group it wraps around to the last object.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#previous">Phaser.Group#previous</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-380">line 380</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="remove"><span class="type-signature"></span>remove<span class="signature">(child)</span><span class="type-signature"> &rarr; {boolean}</span></h4>
</dt>
<dd>
<div class="description">
<p>Removes the given child from this Group and sets its group property to null.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type">Any</span>
</td>
<td class="description last"><p>The child to remove.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#remove">Phaser.Group#remove</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1320">line 1320</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>true if the child was removed from this Group, otherwise false.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">boolean</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeAll"><span class="type-signature"></span>removeAll<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Removes all children from this Group, setting all group properties to null.
The Group container remains on the display list.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#removeAll">Phaser.Group#removeAll</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1352">line 1352</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="removeBetween"><span class="type-signature"></span>removeBetween<span class="signature">(startIndex, endIndex)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Removes all children from this Group whos index falls beteen the given startIndex and endIndex values.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>startIndex</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The index to start removing children from.</p></td>
</tr>
<tr>
<td class="name"><code>endIndex</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The index to stop removing children from. Must be higher than startIndex and less than the length of the Group.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#removeBetween">Phaser.Group#removeBetween</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1380">line 1380</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="replace"><span class="type-signature"></span>replace<span class="signature">(oldChild, newChild)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Replaces a child of this Group with the given newChild. The newChild cannot be a member of this Group.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>oldChild</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>The child in this Group that will be replaced.</p></td>
</tr>
<tr>
<td class="name"><code>newChild</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>The child to be inserted into this Group.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#replace">Phaser.Group#replace</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-558">line 558</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="reverse"><span class="type-signature"></span>reverse<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Reverses all children in this Group. Note that this does not propagate, only direct children are re-ordered.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#reverse">Phaser.Group#reverse</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-533">line 533</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="sendToBack"><span class="type-signature"></span>sendToBack<span class="signature">(child)</span><span class="type-signature"> &rarr; {*}</span></h4>
</dt>
<dd>
<div class="description">
<p>Sends the given child to the bottom of this Group so it renders below all other children.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>The child to send to the bottom of this Group.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#sendToBack">Phaser.Group#sendToBack</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-444">line 444</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<div class="param-desc">
<p>The child that was moved.</p>
</div>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">*</span>
</dd>
</dl>
</dd>
<dt>
<h4 class="name" id="set"><span class="type-signature"></span>set<span class="signature">(child, key, value, <span class="optional">checkAlive</span>, <span class="optional">checkVisible</span>, <span class="optional">operation</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>This function allows you to 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.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type"><a href="Phaser.Sprite.html">Phaser.Sprite</a></span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The child to set the property on.</p></td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The property, as a string, to be set. For example: 'body.velocity.x'</p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The value that will be set.</p></td>
</tr>
<tr>
<td class="name"><code>checkAlive</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>If set then the child will only be updated if alive=true.</p></td>
</tr>
<tr>
<td class="name"><code>checkVisible</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>If set then the child will only be updated if visible=true.</p></td>
</tr>
<tr>
<td class="name"><code>operation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>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.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#set">Phaser.Group#set</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-649">line 649</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="setAll"><span class="type-signature"></span>setAll<span class="signature">(key, value, <span class="optional">checkAlive</span>, <span class="optional">checkVisible</span>, <span class="optional">operation</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>This function allows you to quickly set the same property across all children 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.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The property, as a string, to be set. For example: 'body.velocity.x'</p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The value that will be set.</p></td>
</tr>
<tr>
<td class="name"><code>checkAlive</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>If set then only children with alive=true will be updated.</p></td>
</tr>
<tr>
<td class="name"><code>checkVisible</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
false
</td>
<td class="description last"><p>If set then only children with visible=true will be updated.</p></td>
</tr>
<tr>
<td class="name"><code>operation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>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.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#setAll">Phaser.Group#setAll</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-675">line 675</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="setBounds"><span class="type-signature"></span>setBounds<span class="signature">(x, y, width, height)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Updates the size of this world. Note that this doesn't modify the world x/y coordinates, just the width and height.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Top left most corner of the world.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>Top left most corner of the world.</p></td>
</tr>
<tr>
<td class="name"><code>width</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>New width of the world. Can never be smaller than the Game.width.</p></td>
</tr>
<tr>
<td class="name"><code>height</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>New height of the world. Can never be smaller than the Game.height.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="World.js___.html">core/World.js</a>, <a href="World.js___.html#sunlight-1-line-62">line 62</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="setProperty"><span class="type-signature"></span>setProperty<span class="signature">(child, key, value, <span class="optional">operation</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Sets the given property to the given value on the child. The operation controls the assignment of the value.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The child to set the property value on.</p></td>
</tr>
<tr>
<td class="name"><code>key</code></td>
<td class="type">
<span class="param-type">array</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>An array of strings that make up the property that will be set.</p></td>
</tr>
<tr>
<td class="name"><code>value</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="attributes">
</td>
<td class="default">
</td>
<td class="description last"><p>The value that will be set.</p></td>
</tr>
<tr>
<td class="name"><code>operation</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
0
</td>
<td class="description last"><p>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.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#setProperty">Phaser.Group#setProperty</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-589">line 589</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="sort"><span class="type-signature"></span>sort<span class="signature">(<span class="optional">index</span>, <span class="optional">order</span>)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Call this function to sort the group according to a particular value and order.
For example to depth sort Sprites for Zelda-style game you might call <code>group.sort('y', Phaser.Group.SORT_ASCENDING)</code> at the bottom of your <code>State.update()</code>.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th>Argument</th>
<th>Default</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
'z'
</td>
<td class="description last"><p>The <code>string</code> name of the property you want to sort on. Defaults to the objects z-depth value.</p></td>
</tr>
<tr>
<td class="name"><code>order</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="attributes">
&lt;optional><br>
</td>
<td class="default">
Phaser.Group.SORT_ASCENDING
</td>
<td class="description last"><p>The <code>Group</code> constant that defines the sort order. Possible values are Phaser.Group.SORT_ASCENDING and Phaser.Group.SORT_DESCENDING.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#sort">Phaser.Group#sort</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-1054">line 1054</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="subAll"><span class="type-signature"></span>subAll<span class="signature">(property, amount, checkAlive, checkVisible)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>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.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>property</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"><p>The property to decrement, for example 'body.velocity.x' or 'angle'.</p></td>
</tr>
<tr>
<td class="name"><code>amount</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10.</p></td>
</tr>
<tr>
<td class="name"><code>checkAlive</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If true the property will only be changed if the child is alive.</p></td>
</tr>
<tr>
<td class="name"><code>checkVisible</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>If true the property will only be changed if the child is visible.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#subAll">Phaser.Group#subAll</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-721">line 721</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="swap"><span class="type-signature"></span>swap<span class="signature">(child1, child2)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Swaps the position of two children in this Group. Both children must be in this Group.
You cannot swap a child with itself, or swap un-parented children, doing so will return false.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>child1</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>The first child to swap.</p></td>
</tr>
<tr>
<td class="name"><code>child2</code></td>
<td class="type">
<span class="param-type">*</span>
</td>
<td class="description last"><p>The second child to swap.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#swap">Phaser.Group#swap</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-404">line 404</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="update"><span class="type-signature">&lt;protected> </span>update<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>The core update - as called by World.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#update">Phaser.Group#update</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-929">line 929</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="updateZ"><span class="type-signature">&lt;protected> </span>updateZ<span class="signature">()</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Internal method that re-applies all of the childrens Z values.</p>
</div>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#updateZ">Phaser.Group#updateZ</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-339">line 339</a>
</li></ul></dd>
</dl>
</dd>
<dt>
<h4 class="name" id="xy"><span class="type-signature"></span>xy<span class="signature">(index, x, y)</span><span class="type-signature"></span></h4>
</dt>
<dd>
<div class="description">
<p>Positions the child found at the given index within this Group to the given x and y coordinates.</p>
</div>
<h5>Parameters:</h5>
<table class="params table table-striped">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The index of the child in the Group to set the position of.</p></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The new x position of the child.</p></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type">number</span>
</td>
<td class="description last"><p>The new y position of the child.</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="inherited-from">Inherited From:</dt>
<dd class="inherited-from"><ul class="dummy"><li>
<a href="Phaser.Group.html#xy">Phaser.Group#xy</a>
</li></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="Group.js.html">core/Group.js</a>, <a href="Group.js.html#sunlight-1-line-511">line 511</a>
</li></ul></dd>
</dl>
</dd>
</dl>
</article>
</section>
</div>
<div class="clearfix"></div>
<footer>
<span class="copyright">
Phaser Copyright © 2012-2014 Photon Storm Ltd.
</span>
<br />
<span class="jsdoc-message">
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-dev</a>
on Fri Mar 14 2014 06:34:37 GMT-0000 (GMT) using the <a href="https://github.com/terryweiss/docstrap">DocStrap template</a>.
</span>
</footer>
</div>
<div class="span3">
<div id="toc"></div>
</div>
<br clear="both">
</div>
</div>
<script src="scripts/sunlight.js"></script>
<script src="scripts/sunlight.javascript.js"></script>
<script src="scripts/sunlight-plugin.doclinks.js"></script>
<script src="scripts/sunlight-plugin.linenumbers.js"></script>
<script src="scripts/sunlight-plugin.menu.js"></script>
<script src="scripts/jquery.min.js"></script>
<script src="scripts/jquery.scrollTo.js"></script>
<script src="scripts/jquery.localScroll.js"></script>
<script src="scripts/bootstrap-dropdown.js"></script>
<script src="scripts/toc.js"></script>
<script> Sunlight.highlightAll({lineNumbers:true, showMenu: true, enableDoclinks :true}); </script>
<script>
$( function () {
$( "#toc" ).toc( {
anchorName : function(i, heading, prefix) {
return $(heading).attr("id") || ( prefix + i );
},
selectors : "h1,h2,h3,h4",
showAndHide : false,
scrollTo : 60
} );
$( "#toc>ul" ).addClass( "nav nav-pills nav-stacked" );
$( "#main span[id^='toc']" ).addClass( "toc-shim" );
} );
</script>
</body>
</html>