Select Item

Select add-ons can be used to handle input.

First it's need to be imported into project.

import { selectItem } from '<Path to BoardPlugin>';

Select Arguments

parameters Type Default Weight Description
x number null required X location to check against
y number null required Y location to check against
checkAgainst Array 0 (the first board in boards array) optional You can pass items Array or control which items array to choose from in global config.

Note

Besides above arguments, its uses other options defined in global config.

example

this.input.on('pointerdown', (pointer) => {
  let item = selectItem(pointer.x, pointer.y);
})