Phaser API Documentation

  Version: 
setTopOnly(value)

Description:

When set to true this Input Plugin will emulate DOM behavior by only emitting events from the top-most Game Objects in the Display List.

If set to false it will emit events from all Game Objects below a Pointer, not just the top one.

Parameters:

name type description
value boolean

true to only include the top-most Game Object, or false to include all Game Objects in a hit test.

Returns:
Description:

This InputPlugin object.

Examples:
Since: 3.0.0