phaser - v4.0.0-rc.4
    Preparing search index...

    Function WrapInRectangle

    • Iterates through the given array and makes sure that each objects x and y properties are wrapped to keep them contained within the given Rectangles area.

      Type Parameters

      Parameters

      • items: G

        An array of Game Objects. The contents of this array are updated by this Action.

      • rect: Geom.Rectangle

        The rectangle which the objects will be wrapped to remain within.

      • Optionalpadding: number

        An amount added to each side of the rectangle during the operation. Default 0.

      Returns G