Options
All
  • Public
  • Public/Protected
  • All
Menu

The PointerSystem is responsible for dispatching pointer events to entities that need them.

The PointerSystem can be optionally configured by the PointerComponent, by default Entities use the Collider's shape for pointer events.

Hierarchy

Index

Constructors

Properties

currentFrameEntityToPointers: Map<number, number[]> = ...
lastFrameEntityToPointers: Map<number, number[]> = ...
overrideUseColliderShape: boolean = false

Optionally override component configuration for all entities

overrideUseGraphicsBounds: boolean = false

Optionally override component configuration for all entities

priority: number = -1

System can execute in priority order, by default all systems are priority 0. Lower values indicated higher priority. For a system to execute before all other a lower priority value (-1 for example) must be set. For a system to execute after all other a higher priority value (10 for example) must be set.

systemType: Update = SystemType.Update

Determine whether the system is called in the SystemType.Update or the SystemType.Draw phase. Update is first, then Draw.

types: readonly ["ex.transform", "ex.pointer"] = ...

The types of entities that this system operates on For example ['transform', 'motion']

Methods

  • addPointerToEntity(entity: Entity, pointerId: number): void
  • entered(entity: Entity, pointerId: number): boolean
  • entityCurrentlyUnderPointer(entity: Entity, pointerId: number): boolean
  • entityWasUnderPointer(entity: Entity, pointerId: number): boolean
  • initialize(scene: Scene): void
  • left(entity: Entity, pointerId: number): boolean
  • postupdate(engine: Scene, elapsedMs: number): void
  • preupdate(): void
  • update(_entities: Entity[]): void