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. Phaser.GameObjects.Group#defaultKey is not used.
name | type | arguments | Default | description |
---|---|---|---|---|
classType | function | <optional> |
The class of each new Game Object. |
|
key | string | Array.<string> | <optional> |
The texture key of each new Game Object. |
|
frame | string | Array.<string> | number | Array.<number> | <optional> | null |
The texture frame of each new Game Object. |
quantity | number | <optional> | false |
The number of Game Objects to create. If set, this overrides the |
visible | boolean | <optional> | true |
The visible state of each new Game Object. |
active | boolean | <optional> | true |
The active state of each new Game Object. |
repeat | number | <optional> | 0 |
The number of times each |
randomKey | boolean | <optional> | false |
Select a |
randomFrame | boolean | <optional> | false |
Select a |
yoyo | boolean | <optional> | false |
Select keys and frames by moving forward then backward through |
frameQuantity | number | <optional> | 1 |
The number of times each |
max | number | <optional> | 0 |
The maximum number of new Game Objects to create. 0 is no maximum. |
setXY | object | <optional> | ||
setXY.x | number | <optional> | 0 |
The horizontal position of each new Game Object. |
setXY.y | number | <optional> | 0 |
The vertical position of each new Game Object. |
setXY.stepX | number | <optional> | 0 |
Increment each Game Object's horizontal position from the previous by this amount, starting from |
setXY.stepY | number | <optional> | 0 |
Increment each Game Object's vertical position from the previous by this amount, starting from |
setRotation | object | <optional> | ||
setRotation.value | number | <optional> | 0 |
Rotation of each new Game Object. |
setRotation.step | number | <optional> | 0 |
Increment each Game Object's rotation from the previous by this amount, starting at |
setScale | object | <optional> | ||
setScale.x | number | <optional> | 0 |
The horizontal scale of each new Game Object. |
setScale.y | number | <optional> | 0 |
The vertical scale of each new Game Object. |
setScale.stepX | number | <optional> | 0 |
Increment each Game Object's horizontal scale from the previous by this amount, starting from |
setScale.stepY | number | <optional> | 0 |
Increment each Game object's vertical scale from the previous by this amount, starting from |
setOrigin | object | <optional> | ||
setOrigin.x | number | <optional> | 0 |
The horizontal origin of each new Game Object. |
setOrigin.y | number | <optional> | 0 |
The vertical origin of each new Game Object. |
setOrigin.stepX | number | <optional> | 0 |
Increment each Game Object's horizontal origin from the previous by this amount, starting from |
setOrigin.stepY | number | <optional> | 0 |
Increment each Game object's vertical origin from the previous by this amount, starting from |
setAlpha | object | <optional> | ||
setAlpha.value | number | <optional> | 0 |
The alpha value of each new Game Object. |
setAlpha.step | number | <optional> | 0 |
Increment each Game Object's alpha from the previous by this amount, starting from |
setDepth | object | <optional> | ||
setDepth.value | number | <optional> | 0 |
The depth value of each new Game Object. |
setDepth.step | number | <optional> | 0 |
Increment each Game Object's depth from the previous by this amount, starting from |
setScrollFactor | object | <optional> | ||
setScrollFactor.x | number | <optional> | 0 |
The horizontal scroll factor of each new Game Object. |
setScrollFactor.y | number | <optional> | 0 |
The vertical scroll factor of each new Game Object. |
setScrollFactor.stepX | number | <optional> | 0 |
Increment each Game Object's horizontal scroll factor from the previous by this amount, starting from |
setScrollFactor.stepY | number | <optional> | 0 |
Increment each Game object's vertical scroll factor from the previous by this amount, starting from |
hitArea | * | <optional> |
A geometric shape that defines the hit area for the Game Object. |
|
hitAreaCallback | Phaser.Types.Input.HitAreaCallback | <optional> |
A callback to be invoked when the Game Object is interacted with. |
|
gridAlign | false | Phaser.Types.Actions.GridAlignConfig | <optional> | false |
Align the new Game Objects in a grid using these settings. |