- Source: src/display/align/in/index.js (Line 7)
Methods
-
<static> BottomCenter(gameObject, alignIn [, offsetX] [, offsetY])
-
Takes given Game Object and aligns it so that it is positioned in the bottom center of the other.
Parameters:
Name Type Argument Default Description gameObjectPhaser.GameObjects.GameObject The Game Object that will be positioned.
alignInPhaser.GameObjects.GameObject The Game Object to base the alignment position on.
offsetXnumber <optional>
0 Optional horizontal offset from the position.
offsetYnumber <optional>
0 Optional vertical offset from the position.
- Since: 3.0.0
- Source: src/display/align/in/BottomCenter.js (Line 12)
Returns:
The Game Object that was aligned.
-
<static> BottomLeft(gameObject, alignIn [, offsetX] [, offsetY])
-
Takes given Game Object and aligns it so that it is positioned in the bottom left of the other.
Parameters:
Name Type Argument Default Description gameObjectPhaser.GameObjects.GameObject The Game Object that will be positioned.
alignInPhaser.GameObjects.GameObject The Game Object to base the alignment position on.
offsetXnumber <optional>
0 Optional horizontal offset from the position.
offsetYnumber <optional>
0 Optional vertical offset from the position.
- Since: 3.0.0
- Source: src/display/align/in/BottomLeft.js (Line 12)
Returns:
The Game Object that was aligned.
-
<static> BottomRight(gameObject, alignIn [, offsetX] [, offsetY])
-
Takes given Game Object and aligns it so that it is positioned in the bottom right of the other.
Parameters:
Name Type Argument Default Description gameObjectPhaser.GameObjects.GameObject The Game Object that will be positioned.
alignInPhaser.GameObjects.GameObject The Game Object to base the alignment position on.
offsetXnumber <optional>
0 Optional horizontal offset from the position.
offsetYnumber <optional>
0 Optional vertical offset from the position.
- Since: 3.0.0
- Source: src/display/align/in/BottomRight.js (Line 12)
Returns:
The Game Object that was aligned.
-
<static> Center(gameObject, alignIn [, offsetX] [, offsetY])
-
Takes given Game Object and aligns it so that it is positioned in the center of the other.
Parameters:
Name Type Argument Default Description gameObjectPhaser.GameObjects.GameObject The Game Object that will be positioned.
alignInPhaser.GameObjects.GameObject The Game Object to base the alignment position on.
offsetXnumber <optional>
0 Optional horizontal offset from the position.
offsetYnumber <optional>
0 Optional vertical offset from the position.
- Since: 3.0.0
- Source: src/display/align/in/Center.js (Line 11)
Returns:
The Game Object that was aligned.
-
<static> LeftCenter(gameObject, alignIn [, offsetX] [, offsetY])
-
Takes given Game Object and aligns it so that it is positioned in the left center of the other.
Parameters:
Name Type Argument Default Description gameObjectPhaser.GameObjects.GameObject The Game Object that will be positioned.
alignInPhaser.GameObjects.GameObject The Game Object to base the alignment position on.
offsetXnumber <optional>
0 Optional horizontal offset from the position.
offsetYnumber <optional>
0 Optional vertical offset from the position.
- Since: 3.0.0
- Source: src/display/align/in/LeftCenter.js (Line 12)
Returns:
The Game Object that was aligned.
-
<static> QuickSet(child, alignIn, position [, offsetX] [, offsetY])
-
Takes given Game Object and aligns it so that it is positioned relative to the other. The alignment used is based on the
positionargument, which is anALIGN_CONSTvalue, such asLEFT_CENTERorTOP_RIGHT.Parameters:
Name Type Argument Default Description childPhaser.GameObjects.GameObject The Game Object that will be positioned.
alignInPhaser.GameObjects.GameObject The Game Object to base the alignment position on.
positionnumber The position to align the Game Object with. This is an align constant, such as
ALIGN_CONST.LEFT_CENTER.offsetXnumber <optional>
0 Optional horizontal offset from the position.
offsetYnumber <optional>
0 Optional vertical offset from the position.
- Since: 3.0.0
- Source: src/display/align/in/QuickSet.js (Line 25)
Returns:
The Game Object that was aligned.
-
<static> RightCenter(gameObject, alignIn [, offsetX] [, offsetY])
-
Takes given Game Object and aligns it so that it is positioned in the right center of the other.
Parameters:
Name Type Argument Default Description gameObjectPhaser.GameObjects.GameObject The Game Object that will be positioned.
alignInPhaser.GameObjects.GameObject The Game Object to base the alignment position on.
offsetXnumber <optional>
0 Optional horizontal offset from the position.
offsetYnumber <optional>
0 Optional vertical offset from the position.
- Since: 3.0.0
- Source: src/display/align/in/RightCenter.js (Line 12)
Returns:
The Game Object that was aligned.
-
<static> TopCenter(gameObject, alignIn [, offsetX] [, offsetY])
-
Takes given Game Object and aligns it so that it is positioned in the top center of the other.
Parameters:
Name Type Argument Default Description gameObjectPhaser.GameObjects.GameObject The Game Object that will be positioned.
alignInPhaser.GameObjects.GameObject The Game Object to base the alignment position on.
offsetXnumber <optional>
0 Optional horizontal offset from the position.
offsetYnumber <optional>
0 Optional vertical offset from the position.
- Since: 3.0.0
- Source: src/display/align/in/TopCenter.js (Line 12)
Returns:
The Game Object that was aligned.
-
<static> TopLeft(gameObject, alignIn [, offsetX] [, offsetY])
-
Takes given Game Object and aligns it so that it is positioned in the top left of the other.
Parameters:
Name Type Argument Default Description gameObjectPhaser.GameObjects.GameObject The Game Object that will be positioned.
alignInPhaser.GameObjects.GameObject The Game Object to base the alignment position on.
offsetXnumber <optional>
0 Optional horizontal offset from the position.
offsetYnumber <optional>
0 Optional vertical offset from the position.
- Since: 3.0.0
- Source: src/display/align/in/TopLeft.js (Line 12)
Returns:
The Game Object that was aligned.
-
<static> TopRight(gameObject, alignIn [, offsetX] [, offsetY])
-
Takes given Game Object and aligns it so that it is positioned in the top right of the other.
Parameters:
Name Type Argument Default Description gameObjectPhaser.GameObjects.GameObject The Game Object that will be positioned.
alignInPhaser.GameObjects.GameObject The Game Object to base the alignment position on.
offsetXnumber <optional>
0 Optional horizontal offset from the position.
offsetYnumber <optional>
0 Optional vertical offset from the position.
- Since: 3.0.0
- Source: src/display/align/in/TopRight.js (Line 12)
Returns:
The Game Object that was aligned.
