You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- remove() rejects non-members
- createMultiple() stops creating objects if the Group becomes full
- isFull() returns true if the group size *exceeds* maxSize
- Group() calls createMultiple() only if config.key was passed
Copy file name to clipboardExpand all lines: src/gameobjects/group/Group.js
+32-5Lines changed: 32 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,7 @@ var Sprite = require('../sprite/Sprite');
49
49
*
50
50
* If `max` is positive, then the total created will not exceed `max`.
51
51
*
52
-
* `key` is required.
52
+
* `key` is required. {@link Phaser.GameObjects.Group#defaultKey} is not used.
53
53
*
54
54
* @property {?object} [classType] - The class of each new Game Object.
55
55
* @property {string} [key] - The texture key of each new Game Object.
@@ -105,7 +105,7 @@ var Sprite = require('../sprite/Sprite');
105
105
* @since 3.0.0
106
106
* @param {Phaser.Scene} scene - The scene this group belongs to.
107
107
* @param {?(Phaser.GameObjects.GameObject[]|GroupConfig)} [children] - Game objects to add to this group; or the `config` argument.
108
-
* @param {GroupConfig} [config] - Settings for this group.
108
+
* @param {GroupConfig|GroupCreateConfig} [config] - Settings for this group. If `key` is set, Phaser.GameObjects.Group#createMultiple is also called with these settings.
109
109
*
110
110
* @see Phaser.Physics.Arcade.Group
111
111
* @see Phaser.Physics.Arcade.StaticGroup
@@ -183,6 +183,9 @@ var Group = new Class({
183
183
/**
184
184
* A default texture key to use when creating new group members.
185
185
*
186
+
* This is used in {@link Phaser.GameObjects.Group#create}
187
+
* but not in {@link Phaser.GameObjects.Group#createMultiple}.
0 commit comments