Phaser API Documentation

  Version: 

Member of: Phaser.Actions

<static> RandomLine(items, line)

Description:

Takes an array of Game Objects and positions them at random locations on the Line.

If you wish to pass a Phaser.GameObjects.Line Shape to this function, you should pass its geom property.

Parameters:

name type description
items array | Array.<Phaser.GameObjects.GameObject>

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

line Phaser.Geom.Line

The Line to position the Game Objects randomly on.

Returns:
Description:

The array of Game Objects that was passed to this Action.

Type:
Since: 3.0.0
Source: src/actions/RandomLine.js (Line 9)