GroupCallback
<static> GroupCallback
Type: function
Member of: Phaser.Types.GameObjects.Group
Source: src/gameobjects/group/typedefs/GroupCallback.js#L1
Since: 3.0.0
GroupClassTypeConstructor
<static> GroupClassTypeConstructor
Type: function
Member of: Phaser.Types.GameObjects.Group
Source: src/gameobjects/group/typedefs/GroupClassTypeConstructor.js#L1
Since: 3.0.0
GroupConfig
<static> GroupConfig
name | type | optional | default | description |
---|---|---|---|---|
classType | function | Yes | "Sprite" | Sets {@link Phaser.GameObjects.Group#classType}. |
name | string | Yes | "''" | Sets {@link Phaser.GameObjects.Group#name}. |
active | boolean | Yes | true | Sets {@link Phaser.GameObjects.Group#active}. |
maxSize | number | Yes | -1 | Sets {@link Phaser.GameObjects.Group#maxSize}. |
defaultKey | string | Yes | null | Sets {@link Phaser.GameObjects.Group#defaultKey}. |
defaultFrame | string | number | Yes | null | Sets {@link Phaser.GameObjects.Group#defaultFrame}. |
runChildUpdate | boolean | Yes | false | Sets {@link Phaser.GameObjects.Group#runChildUpdate}. |
createCallback | Yes | null | Sets {@link Phaser.GameObjects.Group#createCallback}. | |
removeCallback | Yes | null | Sets {@link Phaser.GameObjects.Group#removeCallback}. | |
createMultipleCallback | Yes | null | Sets {@link Phaser.GameObjects.Group#createMultipleCallback}. |
Type: object
Member of: Phaser.Types.GameObjects.Group
Source: src/gameobjects/group/typedefs/GroupConfig.js#L1
Since: 3.0.0
GroupCreateConfig
<static> GroupCreateConfig
The total number of objects created will be
key.length * frame.length * frameQuantity * (yoyo ? 2 : 1) * (1 + repeat)
If max
is nonzero, then the total created will not exceed max
.
key
is required. {@link Phaser.GameObjects.Group#defaultKey} is not used.
name | type | optional | default | description |
---|---|---|---|---|
key | string | Array.<string> | No | The texture key of each new Game Object. Must be provided or not objects will be created. | |
classType | function | Yes | The class of each new Game Object. | |
frame | string | Array.<string> | number | Array.<number> | Yes |
quantity | number | Yes | false | The number of Game Objects to create. If set, this overrides the |
visible | boolean | Yes | true | The visible state of each new Game Object. |
active | boolean | Yes | true | The active state of each new Game Object. |
repeat | number | Yes | 0 | The number of times each |
randomKey | boolean | Yes | false | Select a |
randomFrame | boolean | Yes | false | Select a |
yoyo | boolean | Yes | false | Select keys and frames by moving forward then backward through |
frameQuantity | number | Yes | 1 | The number of times each |
max | number | Yes | 0 | The maximum number of new Game Objects to create. 0 is no maximum. |
setXY | object | Yes | No description provided | |
setXY.x | number | Yes | 0 | The horizontal position of each new Game Object. |
setXY.y | number | Yes | 0 | The vertical position of each new Game Object. |
setXY.stepX | number | Yes | 0 | Increment each Game Object's horizontal position from the previous by this amount, starting from |
setXY.stepY | number | Yes | 0 | Increment each Game Object's vertical position from the previous by this amount, starting from |
setRotation | object | Yes | No description provided | |
setRotation.value | number | Yes | 0 | Rotation of each new Game Object. |
setRotation.step | number | Yes | 0 | Increment each Game Object's rotation from the previous by this amount, starting at |
setScale | object | Yes | No description provided | |
setScale.x | number | Yes | 0 | The horizontal scale of each new Game Object. |
setScale.y | number | Yes | 0 | The vertical scale of each new Game Object. |
setScale.stepX | number | Yes | 0 | Increment each Game Object's horizontal scale from the previous by this amount, starting from |
setScale.stepY | number | Yes | 0 | Increment each Game object's vertical scale from the previous by this amount, starting from |
setOrigin | object | Yes | No description provided | |
setOrigin.x | number | Yes | 0 | The horizontal origin of each new Game Object. |
setOrigin.y | number | Yes | 0 | The vertical origin of each new Game Object. |
setOrigin.stepX | number | Yes | 0 | Increment each Game Object's horizontal origin from the previous by this amount, starting from |
setOrigin.stepY | number | Yes | 0 | Increment each Game object's vertical origin from the previous by this amount, starting from |
setAlpha | object | Yes | No description provided | |
setAlpha.value | number | Yes | 0 | The alpha value of each new Game Object. |
setAlpha.step | number | Yes | 0 | Increment each Game Object's alpha from the previous by this amount, starting from |
setDepth | object | Yes | No description provided | |
setDepth.value | number | Yes | 0 | The depth value of each new Game Object. |
setDepth.step | number | Yes | 0 | Increment each Game Object's depth from the previous by this amount, starting from |
setScrollFactor | object | Yes | No description provided | |
setScrollFactor.x | number | Yes | 0 | The horizontal scroll factor of each new Game Object. |
setScrollFactor.y | number | Yes | 0 | The vertical scroll factor of each new Game Object. |
setScrollFactor.stepX | number | Yes | 0 | Increment each Game Object's horizontal scroll factor from the previous by this amount, starting from |
setScrollFactor.stepY | number | Yes | 0 | Increment each Game object's vertical scroll factor from the previous by this amount, starting from |
hitArea | * | Yes | A geometric shape that defines the hit area for the Game Object. | |
hitAreaCallback | Yes | A callback to be invoked when the Game Object is interacted with. | ||
gridAlign | Yes | false | Align the new Game Objects in a grid using these settings. |
Type: object
Member of: Phaser.Types.GameObjects.Group
Source: src/gameobjects/group/typedefs/GroupCreateConfig.js#L1
Since: 3.0.0
GroupMultipleCreateCallback
<static> GroupMultipleCreateCallback
Type: function
Member of: Phaser.Types.GameObjects.Group
Source: src/gameobjects/group/typedefs/GroupMultipleCreateCallback.js#L1
Since: 3.0.0