Takes given Game Object and aligns it so that it is positioned relative to the other.
The alignment used is based on the position
argument, which is an ALIGN_CONST
value, such as LEFT_CENTER
or TOP_RIGHT
.
name | type | arguments | description |
---|---|---|---|
child | Phaser.GameObjects.GameObject |
The Game Object that will be positioned. |
|
alignIn | Phaser.GameObjects.GameObject |
The Game Object to base the alignment position on. |
|
position | number |
The position to align the Game Object with. This is an align constant, such as |
|
offsetX | number | <optional> |
Optional horizontal offset from the position. |
offsetY | number | <optional> |
Optional vertical offset from the position. |
The Game Object that was aligned.