-
Phaser SpriteBatch constructor.
-The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles.
+
The SpriteBatch class is a really fast version of the DisplayObjectContainer built purely for speed, so use when you need a lot of sprites or particles.
It's worth mentioning that by default sprite batches are used through-out the renderer, so you only really need to use a SpriteBatch if you have over
1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled
Sprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices.
@@ -782,7 +789,7 @@ Sprites as it skips all of the Canvas setTransform calls, which helps performanc
Source:
@@ -924,7 +931,7 @@ Sprites as it skips all of the Canvas setTransform calls, which helps performanc
Source:
@@ -1031,7 +1038,7 @@ Sprites as it skips all of the Canvas setTransform calls, which helps performanc
Source:
@@ -1143,7 +1150,7 @@ This will have no impact on the rotation value of its children, but it will upda
Source:
@@ -1250,7 +1257,7 @@ This will have no impact on the rotation value of its children, but it will upda
Source:
@@ -1362,7 +1369,7 @@ When a new object is created it is passed the following parameters to its constr
Source:
@@ -1474,7 +1481,7 @@ The cursor is set to the first child added to the Group and doesn't change unles
Source:
@@ -1584,7 +1591,7 @@ The cursor is set to the first child added to the Group and doesn't change unles
Source:
@@ -1691,7 +1698,7 @@ The cursor is set to the first child added to the Group and doesn't change unles
Source:
@@ -1801,7 +1808,7 @@ The cursor is set to the first child added to the Group and doesn't change unles
Source:
@@ -1914,7 +1921,7 @@ So if this Group was in a Group that has x: 200, then this will be added to the
Source:
@@ -2021,7 +2028,117 @@ So if this Group was in a Group that has x: 200, then this will be added to the
Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ignoreDestroy
+
+
+
+
+
+
+
+
+
+
+
+
+ Properties:
+
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+
+
+
+ Description |
+
+
+
+
+
+
+
+
+ ignoreDestroy |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+
+ A Group with ignoreDestroy set to true ignores all calls to its destroy method. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+ - Default Value:
+
+
+
+
+ - Source:
+
@@ -2128,7 +2245,7 @@ So if this Group was in a Group that has x: 200, then this will be added to the
- Source:
@@ -2235,7 +2352,7 @@ So if this Group was in a Group that has x: 200, then this will be added to the
- Source:
@@ -2342,7 +2459,7 @@ So if this Group was in a Group that has x: 200, then this will be added to the
- Source:
@@ -2449,7 +2566,7 @@ So if this Group was in a Group that has x: 200, then this will be added to the
- Source:
@@ -2561,7 +2678,7 @@ This will have no impact on the rotation value of its children, but it will upda
- Source:
@@ -2668,7 +2785,7 @@ This will have no impact on the rotation value of its children, but it will upda
- Source:
@@ -2775,7 +2892,7 @@ This will have no impact on the rotation value of its children, but it will upda
- Source:
@@ -2877,7 +2994,7 @@ This will have no impact on the rotation value of its children, but it will upda
- Source:
@@ -2984,7 +3101,7 @@ This will have no impact on the rotation value of its children, but it will upda
- Source:
@@ -3096,7 +3213,7 @@ This will have no impact on the x/y coordinates of its children, but it will upd
- Source:
@@ -3208,7 +3325,7 @@ This will have no impact on the x/y coordinates of its children, but it will upd
- Source:
@@ -3315,7 +3432,7 @@ This will have no impact on the x/y coordinates of its children, but it will upd
- Source:
@@ -3491,7 +3608,7 @@ that then see the addAt method.
- Source:
@@ -3716,7 +3833,7 @@ Group.addAll('x', 10) will add 10 to the child.x value.
- Source:
@@ -3930,7 +4047,7 @@ The child is added to the Group at the location specified by the index value, th
- Source:
@@ -4133,7 +4250,7 @@ TODO: Add ability to pass the children as parameters rather than having to be an
- Source:
@@ -4302,7 +4419,7 @@ TODO: Add ability to pass the children as parameters rather than having to be an
- Source:
@@ -4425,7 +4542,7 @@ TODO: Add ability to pass the children as parameters rather than having to be an
- Source:
@@ -4664,7 +4781,7 @@ After the method parameter and context you can add as many extra parameters as y
- Source:
@@ -4862,7 +4979,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
- Source:
@@ -5031,7 +5148,7 @@ After the existsValue parameter you can add as many parameters as you like, whic
- Source:
@@ -5323,7 +5440,7 @@ This call doesn't descend down children, so if you have a Group inside of this G
- Source:
@@ -5571,7 +5688,7 @@ This call doesn't descend down children, so if you have a Group inside of this G
- Source:
@@ -5668,7 +5785,7 @@ This call doesn't descend down children, so if you have a Group inside of this G
- Source:
@@ -5765,7 +5882,7 @@ This call doesn't descend down children, so if you have a Group inside of this G
- Source:
@@ -6077,7 +6194,7 @@ You can change Group.classType to any object and this call will create an object
- Source:
@@ -6359,7 +6476,7 @@ You can change Group.classType to any object and this call will create an object
- Source:
@@ -6506,7 +6623,7 @@ It will be sent two parameters: the two children involved in the comparison (a a
- Source:
@@ -6652,7 +6769,7 @@ It will be sent two parameters: the two children involved in the comparison (a a
- Source:
@@ -6834,7 +6951,7 @@ It will be sent two parameters: the two children involved in the comparison (a a
- Source:
@@ -7027,7 +7144,7 @@ Group.divideAll('x', 2) will half the child.x value.
- Source:
@@ -7050,6 +7167,213 @@ Group.divideAll('x', 2) will half the child.x value.
+
+
+
+
+
+ filter(predicate, checkExists) → {Phaser.ArrayList}
+
+
+
+
+
+
+
+
Allows you to obtain a Phaser.ArrayList of children that return true for the given predicate
+For example:
+ var healthyList = Group.filter(function(child, index, children) {
+ return child.health > 10 ? true : false;
+ }, true);
+ healthyList.callAll('attack');
+Note: Currently this will skip any children which are Groups themselves.
+
+
+
+
+
+
+
+
+ Parameters:
+
+
+
+
+
+
+ Name |
+
+
+ Type |
+
+
+ Argument |
+
+
+
+ Default |
+
+
+ Description |
+
+
+
+
+
+
+
+
+ predicate |
+
+
+
+
+
+function
+
+
+
+ |
+
+
+
+
+
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+ The function that each child will be evaluated against. Each child of the Group will be passed to it as its first parameter, the index as the second, and the entire child array as the third |
+
+
+
+
+
+
+ checkExists |
+
+
+
+
+
+boolean
+
+
+
+ |
+
+
+
+
+ <optional>
+
+
+
+
+
+ |
+
+
+
+
+
+ false
+
+ |
+
+
+ If set only children with exists=true will be passed to the callback, otherwise all children will be passed. |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Inherited From:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - Source:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Returns:
+
+
+
+
Returns an array list containing all the children that the predicate returned true for
+
+
+
+
+
+ -
+ Type
+
+ -
+
+Phaser.ArrayList
+
+
+
+
+
+
+
+
+
@@ -7243,7 +7567,7 @@ Note: Currently this will skip any children which are Groups themselves.
Source:
@@ -7391,7 +7715,7 @@ For example: Group.forEachAlive(causeDamage, this, 500)
Source:
@@ -7539,7 +7863,7 @@ For example: Group.forEachDead(bringToLife, this)
Source:
@@ -7687,7 +8011,7 @@ For example: Group.forEachExists(causeDamage, this, 500)
Source:
@@ -7810,7 +8134,7 @@ For example: Group.forEachExists(causeDamage, this, 500)
Source:
@@ -7907,7 +8231,7 @@ For example: Group.forEachExists(causeDamage, this, 500)
Source:
@@ -8005,7 +8329,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
Source:
@@ -8103,7 +8427,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
Source:
@@ -8249,7 +8573,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
Source:
@@ -8395,7 +8719,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
Source:
@@ -8564,7 +8888,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
Source:
@@ -8661,7 +8985,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
Source:
@@ -8830,7 +9154,7 @@ This is handy for checking if everything has been wiped out, or choosing a squad
Source:
@@ -9140,7 +9464,7 @@ You can add as many callback parameters as you like, which will all be passed to
Source:
@@ -9286,7 +9610,7 @@ You can add as many callback parameters as you like, which will all be passed to
Source:
@@ -9432,7 +9756,7 @@ You can add as many callback parameters as you like, which will all be passed to
Source:
@@ -9648,7 +9972,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.
Source:
@@ -9722,7 +10046,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.
Source:
@@ -9819,7 +10143,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.
Source:
@@ -9893,7 +10217,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.
Source:
@@ -9967,7 +10291,7 @@ Group.multiplyAll('x', 2) will x2 the child.x value.
Source:
@@ -10208,7 +10532,7 @@ reset the Group cursor and optionally destroy the child.
Source:
@@ -10414,7 +10738,7 @@ The Group container remains on the display list.
Source:
@@ -10668,7 +10992,7 @@ The Group container remains on the display list.
Source:
@@ -10814,7 +11138,7 @@ The Group container remains on the display list.
Source:
@@ -10980,7 +11304,7 @@ The Group container remains on the display list.
Source:
@@ -11077,7 +11401,7 @@ The Group container remains on the display list.
Source:
@@ -11200,7 +11524,7 @@ The Group container remains on the display list.
Source:
@@ -11589,7 +11913,7 @@ The operation parameter controls how the new value is assigned to the property,
Source:
@@ -11945,7 +12269,7 @@ If you need that ability please see
Group.setAllChildren
.
Source:
@@ -12278,7 +12602,7 @@ Unlike with Group.setAll the property is NOT set on child Groups itself.
Source:
@@ -12570,7 +12894,7 @@ Operation 0 means set the existing value to the given value, or if force is
Source:
@@ -12776,7 +13100,7 @@ For example to depth sort Sprites for Zelda-style game you might call grou
Source:
@@ -12969,7 +13293,7 @@ Group.subAll('x', 10) will minus 10 from the child.x value.
Source:
@@ -13116,7 +13440,7 @@ You cannot swap a child with itself, or swap un-parented children.
Source:
@@ -13190,7 +13514,7 @@ You cannot swap a child with itself, or swap un-parented children.
Source:
@@ -13264,7 +13588,7 @@ You cannot swap a child with itself, or swap un-parented children.
Source:
@@ -13433,7 +13757,7 @@ You cannot swap a child with itself, or swap un-parented children.
Source:
@@ -13484,7 +13808,7 @@ You cannot swap a child with itself, or swap un-parented children.
Documentation generated by JSDoc 3.3.0-dev
- on Tue Sep 09 2014 15:29:39 GMT+0100 (BST) using the DocStrap template.
+ on Thu Oct 09 2014 16:10:07 GMT+0100 (BST) using the DocStrap template.
diff --git a/docs/Phaser.Stage.html b/docs/Phaser.Stage.html
index 1ad100dc1..159350006 100644
--- a/docs/Phaser.Stage.html
+++ b/docs/Phaser.Stage.html
@@ -58,6 +58,10 @@