Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ObjectTracker

Hierarchy

  • ObjectTracker

Index

Constructors

constructor

Properties

Private emitter

emitter: EventEmitter

Private trackedObjects

trackedObjects: object

Type declaration

  • [guid: string]: ObjectData[]

Private trackedTypes

trackedTypes: Set<number>

Methods

on

  • Attaches an event listener to the specified event.

    Parameters

    • event: number | "any"

      The event to attach the listener to.

    • listener: ObjectEventListener

      The function to invoke when the event is fired.

    Returns this

Private onNewTick

  • onNewTick(client: Client, newTick: NewTickPacket): void

Private onUpdate

  • onUpdate(client: Client, update: UpdatePacket): void

startTracking

  • Starts tracking the specified object, and optionally attaches an event listener.

    Parameters

    • objectType: number

      The object type to start track.

    • Optional listener: ObjectEventListener

      An optional event listener to attach.

    Returns this

stopTracking

  • stopTracking(objectType: number): this
  • Stops tracking the specified object and removes any event listeners for it.

    Parameters

    • objectType: number

      The object type to stop tracking.

    Returns this

Generated using TypeDoc