Represents a PulseScheduler that processes players.

Hierarchy

Constructors

  • Creates a new EntityPulseScheduler instance.

    Parameters

    • processor: ((t) => void)
        • (t): void
        • Parameters

          • t: Player

          Returns void

    • period: number

      The period of the scheduler.

    Returns PlayerPulseScheduler

Properties

compareEntities: any
items: Player[]
processor: ((t) => void)

Type declaration

    • (t): void
    • Parameters

      • t: Player

      Returns void

logger: any

Methods

  • Adds an item to the schedule.

    Parameters

    • item: Player

      The item to be added.

    Returns void

    Deprecated

    Use push instead.

  • Adds multiple items to the schedule.

    Parameters

    • items: Player[]

      The items to be added.

    Returns void

    Deprecated

    Use push instead.

  • Returns a list of the items in the schedule.

    Returns readonly Player[]

  • Returns undefined | Player

  • Parameters

    • Rest ...items: Player[]

    Returns number

  • Removes an item from the schedule at the specified index.

    Parameters

    • index: number

      The index of the item to remove.

    Returns void

  • Removes items from the schedule that satisfy the given predicate.

    Parameters

    • predicate: ((t) => boolean)

      The predicate function used to determine if an item should be removed.

        • (t): boolean
        • Parameters

          • t: Player

          Returns boolean

    Returns void

  • Returns undefined | Player

  • Parameters

    • start: number
    • Optional deleteCount: number

    Returns Player[]

  • Parameters

    • start: number
    • deleteCount: number
    • Rest ...items: Player[]

    Returns Player[]

  • Starts the schedule.

    Returns void

  • Stops the schedule.

    Returns void

  • Parameters

    • Rest ...items: Player[]

    Returns number