Options
All
  • Public
  • Public/Protected
  • All
Menu

Add this component to optionally configure how the pointer system detects pointer events.

By default the collider shape is used and graphics bounds is not.

If both collider shape and graphics bounds are enabled it will fire events if either or are intersecting the pointer.

Hierarchy

Index

Constructors

Properties

dependencies?: ComponentCtor<Component<string>>[]

Optionally list any component types this component depends on If the owner entity does not have these components, new components will be added to the entity

Only components with zero-arg constructors are supported as automatic component dependencies

optional?: ComponentCtor<Component<string>>[]
owner?: Entity = null

Current owning Entity, if any, of this component. Null if not added to any Entity

type: "ex.pointer" = 'ex.pointer'

Type of this component, must be a unique type among component types in you game.

useColliderShape: boolean = true

Use any existing Collider component geometry for pointer events. This is useful if you want user pointer events only to trigger on the same collision geometry used in the collider component for collision resolution. Default is true.

useGraphicsBounds: boolean = false

Use any existing Graphics component bounds for pointers. This is useful if you want the axis aligned bounds around the graphic to trigger pointer events. Default is false.

Methods

  • onRemove(previousOwner: Entity): void