Type Definitions
-
GroupCallback(item)
-
Parameters:
Name Type Description itemPhaser.GameObjects.GameObject A group member
- Since: 3.0.0
- Source: src/gameobjects/group/typedefs/GroupCallback.js (Line 1)
-
GroupConfig
-
Type:
- object
- Since: 3.0.0
- Source: src/gameobjects/group/typedefs/GroupConfig.js (Line 1)
Properties:
Name Type Argument Default Description classTypefunction <optional>
<nullable>
Sprite namestring <optional>
<nullable>
'' activeboolean <optional>
<nullable>
true maxSizenumber <optional>
<nullable>
-1 defaultKeystring <optional>
<nullable>
null defaultFramestring | number <optional>
<nullable>
null runChildUpdateboolean <optional>
<nullable>
false createCallbackPhaser.Types.GameObjects.Group.GroupCallback <optional>
<nullable>
null removeCallbackPhaser.Types.GameObjects.Group.GroupCallback <optional>
<nullable>
null createMultipleCallbackPhaser.Types.GameObjects.Group.GroupMultipleCreateCallback <optional>
<nullable>
null -
GroupCreateConfig
-
The total number of objects created will be
key.length * frame.length * frameQuantity * (yoyo ? 2 : 1) * (1 + repeat)If
maxis nonzero, then the total created will not exceedmax.keyis required. Phaser.GameObjects.Group#defaultKey is not used.Type:
- object
- Since: 3.0.0
- Source: src/gameobjects/group/typedefs/GroupCreateConfig.js (Line 1)
- See:
Properties:
Name Type Argument Default Description classTypefunction <optional>
<nullable>
The class of each new Game Object.
keystring | Array.<string> <optional>
The texture key of each new Game Object.
framestring | Array.<string> | number | Array.<number> <optional>
<nullable>
null The texture frame of each new Game Object.
quantitynumber <optional>
<nullable>
false The number of Game Objects to create. If set, this overrides the
frameQuantityvalue. UseframeQuantityfor more advanced control.visibleboolean <optional>
<nullable>
true The visible state of each new Game Object.
activeboolean <optional>
<nullable>
true The active state of each new Game Object.
repeatnumber <optional>
<nullable>
0 The number of times each
key×framecombination will be repeated (after the first combination).randomKeyboolean <optional>
<nullable>
false Select a
keyat random.randomFrameboolean <optional>
<nullable>
false Select a
frameat random.yoyoboolean <optional>
<nullable>
false Select keys and frames by moving forward then backward through
keyandframe.frameQuantitynumber <optional>
<nullable>
1 The number of times each
frameshould be combined with onekey.maxnumber <optional>
<nullable>
0 The maximum number of new Game Objects to create. 0 is no maximum.
setXYobject <optional>
<nullable>
Properties
Name Type Argument Default Description xnumber <optional>
<nullable>
0 The horizontal position of each new Game Object.
ynumber <optional>
<nullable>
0 The vertical position of each new Game Object.
stepXnumber <optional>
<nullable>
0 Increment each Game Object's horizontal position from the previous by this amount, starting from
setXY.x.stepYnumber <optional>
<nullable>
0 Increment each Game Object's vertical position from the previous by this amount, starting from
setXY.y.setRotationobject <optional>
<nullable>
Properties
Name Type Argument Default Description valuenumber <optional>
<nullable>
0 Rotation of each new Game Object.
stepnumber <optional>
<nullable>
0 Increment each Game Object's rotation from the previous by this amount, starting at
setRotation.value.setScaleobject <optional>
<nullable>
Properties
Name Type Argument Default Description xnumber <optional>
<nullable>
0 The horizontal scale of each new Game Object.
ynumber <optional>
<nullable>
0 The vertical scale of each new Game Object.
stepXnumber <optional>
<nullable>
0 Increment each Game Object's horizontal scale from the previous by this amount, starting from
setScale.x.stepYnumber <optional>
<nullable>
0 Increment each Game object's vertical scale from the previous by this amount, starting from
setScale.y.setOriginobject <optional>
<nullable>
Properties
Name Type Argument Default Description xnumber <optional>
<nullable>
0 The horizontal origin of each new Game Object.
ynumber <optional>
<nullable>
0 The vertical origin of each new Game Object.
stepXnumber <optional>
<nullable>
0 Increment each Game Object's horizontal origin from the previous by this amount, starting from
setOrigin.x.stepYnumber <optional>
<nullable>
0 Increment each Game object's vertical origin from the previous by this amount, starting from
setOrigin.y.setAlphaobject <optional>
<nullable>
Properties
Name Type Argument Default Description valuenumber <optional>
<nullable>
0 The alpha value of each new Game Object.
stepnumber <optional>
<nullable>
0 Increment each Game Object's alpha from the previous by this amount, starting from
setAlpha.value.setDepthobject <optional>
<nullable>
Properties
Name Type Argument Default Description valuenumber <optional>
<nullable>
0 The depth value of each new Game Object.
stepnumber <optional>
<nullable>
0 Increment each Game Object's depth from the previous by this amount, starting from
setDepth.value.setScrollFactorobject <optional>
<nullable>
Properties
Name Type Argument Default Description xnumber <optional>
<nullable>
0 The horizontal scroll factor of each new Game Object.
ynumber <optional>
<nullable>
0 The vertical scroll factor of each new Game Object.
stepXnumber <optional>
<nullable>
0 Increment each Game Object's horizontal scroll factor from the previous by this amount, starting from
setScrollFactor.x.stepYnumber <optional>
<nullable>
0 Increment each Game object's vertical scroll factor from the previous by this amount, starting from
setScrollFactor.y.hitArea* <optional>
<nullable>
A geometric shape that defines the hit area for the Game Object.
hitAreaCallbackPhaser.Types.Input.HitAreaCallback <optional>
<nullable>
A callback to be invoked when the Game Object is interacted with.
gridAlignfalse | Phaser.Types.Actions.GridAlignConfig <optional>
<nullable>
false Align the new Game Objects in a grid using these settings.
-
GroupMultipleCreateCallback(items)
-
Parameters:
Name Type Description itemsArray.<Phaser.GameObjects.GameObject> The newly created group members
- Since: 3.0.0
- Source: src/gameobjects/group/typedefs/GroupMultipleCreateCallback.js (Line 1)
