Phaser API Documentation

  Version: 
Filter
Namespace: In
Phaser.Display.Align.In

Methods

<static> BottomCenter(gameObject, alignIn, [offsetX], [offsetY])
Focus
Focus

Description:

Takes given Game Object and aligns it so that it is positioned in the bottom center of the other.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.GameObject

The Game Object that will be positioned.

alignIn Phaser.GameObjects.GameObject

The Game Object to base the alignment position on.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.

Returns:
Description:

The Game Object that was aligned.

Since: 3.0.0
Focus
Focus
<static> BottomLeft(gameObject, alignIn, [offsetX], [offsetY])
Focus
Focus

Description:

Takes given Game Object and aligns it so that it is positioned in the bottom left of the other.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.GameObject

The Game Object that will be positioned.

alignIn Phaser.GameObjects.GameObject

The Game Object to base the alignment position on.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.

Returns:
Description:

The Game Object that was aligned.

Since: 3.0.0
Focus
Focus
<static> BottomRight(gameObject, alignIn, [offsetX], [offsetY])
Focus
Focus

Description:

Takes given Game Object and aligns it so that it is positioned in the bottom right of the other.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.GameObject

The Game Object that will be positioned.

alignIn Phaser.GameObjects.GameObject

The Game Object to base the alignment position on.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.

Returns:
Description:

The Game Object that was aligned.

Since: 3.0.0
Focus
Focus
<static> Center(gameObject, alignIn, [offsetX], [offsetY])
Focus
Focus

Description:

Takes given Game Object and aligns it so that it is positioned in the center of the other.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.GameObject

The Game Object that will be positioned.

alignIn Phaser.GameObjects.GameObject

The Game Object to base the alignment position on.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.

Returns:
Description:

The Game Object that was aligned.

Since: 3.0.0
Focus
Focus
<static> LeftCenter(gameObject, alignIn, [offsetX], [offsetY])
Focus
Focus

Description:

Takes given Game Object and aligns it so that it is positioned in the left center of the other.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.GameObject

The Game Object that will be positioned.

alignIn Phaser.GameObjects.GameObject

The Game Object to base the alignment position on.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.

Returns:
Description:

The Game Object that was aligned.

Since: 3.0.0
Focus
Focus
<static> QuickSet(child, alignIn, position, [offsetX], [offsetY])
Focus
Focus

Description:

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.

Parameters:

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 ALIGN_CONST.LEFT_CENTER.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.

Returns:
Description:

The Game Object that was aligned.

Since: 3.0.0
Focus
Focus
<static> RightCenter(gameObject, alignIn, [offsetX], [offsetY])
Focus
Focus

Description:

Takes given Game Object and aligns it so that it is positioned in the right center of the other.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.GameObject

The Game Object that will be positioned.

alignIn Phaser.GameObjects.GameObject

The Game Object to base the alignment position on.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.

Returns:
Description:

The Game Object that was aligned.

Since: 3.0.0
Focus
Focus
<static> TopCenter(gameObject, alignIn, [offsetX], [offsetY])
Focus
Focus

Description:

Takes given Game Object and aligns it so that it is positioned in the top center of the other.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.GameObject

The Game Object that will be positioned.

alignIn Phaser.GameObjects.GameObject

The Game Object to base the alignment position on.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.

Returns:
Description:

The Game Object that was aligned.

Since: 3.0.0
Focus
Focus
<static> TopLeft(gameObject, alignIn, [offsetX], [offsetY])
Focus
Focus

Description:

Takes given Game Object and aligns it so that it is positioned in the top left of the other.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.GameObject

The Game Object that will be positioned.

alignIn Phaser.GameObjects.GameObject

The Game Object to base the alignment position on.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.

Returns:
Description:

The Game Object that was aligned.

Since: 3.0.0
Focus
Focus
<static> TopRight(gameObject, alignIn, [offsetX], [offsetY])
Focus
Focus

Description:

Takes given Game Object and aligns it so that it is positioned in the top right of the other.

Parameters:

name type arguments description
gameObject Phaser.GameObjects.GameObject

The Game Object that will be positioned.

alignIn Phaser.GameObjects.GameObject

The Game Object to base the alignment position on.

offsetX number <optional>

Optional horizontal offset from the position.

offsetY number <optional>

Optional vertical offset from the position.

Returns:
Description:

The Game Object that was aligned.

Since: 3.0.0
Focus
Focus