Phaser API Documentation

  Version: 
setDropZone([hitArea], [hitAreaCallback])

Description:

Allows you to define your own Geometry shape to be used as a Drop Zone.

Parameters:

name type arguments description
hitArea object <optional>

A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape. If not given it will try to create a Rectangle based on the size of this zone.

hitAreaCallback Phaser.Types.Input.HitAreaCallback <optional>

A function that will return true if the given x/y coords it is sent are within the shape. If you provide a shape you must also provide a callback.

Returns:
Description:

This Game Object.

Since: 3.0.0