PokéRogue
    Preparing search index...

    The Update List is a Scene plugin that maintains the list of Game Objects whose preUpdate method should be called every frame. Game Objects like Sprites add themselves to the Update List automatically so their animations are processed. You do not normally interact with the Update List directly; instead use addToUpdateList and removeFromUpdateList on individual Game Objects.

    Hierarchy (View Summary)

    Index
    checkQueue: boolean

    If true only unique objects will be allowed in the queue, preventing the same item from being added more than once.

    length: number

    The number of entries in the active list.

    scene: Scene

    The Scene that the Update List belongs to.

    systems: Systems

    The Scene's Systems.

    • Adds a new item to the Process Queue.

      The item is added to the pending list and made active in the next update.

      Parameters

      Returns ProcessQueue<GameObject>

      The item that was added.

    • Add a listener for a given event.

      Parameters

      • event: string | symbol

        The event name.

      • fn: Function

        The listener function.

      • Optionalcontext: any

        The context to invoke the listener with. Default this.

      Returns this

      this.

    • The Scene that owns this plugin is being destroyed.

      We need to shut down and then clear all external references.

      Returns void

    • Calls each of the listeners registered for a given event.

      Parameters

      • event: string | symbol

        The event name.

      • ...args: any[]

        Additional arguments that will be passed to the event handler.

      Returns boolean

      true if the event had listeners, else false.

    • Return an array listing the events for which the emitter has registered listeners.undefined

      Returns (string | symbol)[]

      undefined

    • Returns the current list of active items.

      This method returns a reference to the active list array, not a copy of it. Therefore, be careful to not modify this array outside of the ProcessQueue.undefined

      Returns GameObject[]

      A list of active items.

    • Return the number of listeners listening to a given event.

      Parameters

      • event: string | symbol

        The event name.

      Returns number

      The number of listeners.

    • Return the listeners registered for a given event.

      Parameters

      • event: string | symbol

        The event name.

      Returns Function[]

      The registered listeners.

    • Remove the listeners of a given event.

      Parameters

      • event: string | symbol

        The event name.

      • Optionalfn: Function

        Only remove the listeners that match this function.

      • Optionalcontext: any

        Only remove the listeners that have this context.

      • Optionalonce: boolean

        Only remove one-time listeners.

      Returns this

      this.

    • Add a listener for a given event.

      Parameters

      • event: string | symbol

        The event name.

      • fn: Function

        The listener function.

      • Optionalcontext: any

        The context to invoke the listener with. Default this.

      Returns this

      this.

    • Add a one-time listener for a given event. The listener is automatically removed the first time the event is emitted, so it will never be called more than once.

      Parameters

      • event: string | symbol

        The event name.

      • fn: Function

        The listener function.

      • Optionalcontext: any

        The context to invoke the listener with. Default this.

      Returns this

      this.

    • Removes an item from the Process Queue.

      The item is added to the 'destroy' list and is fully removed in the next update.

      Parameters

      • item: GameObject

        The item to be removed from the queue.

      Returns ProcessQueue<GameObject>

      The item that was removed.

    • Removes all active items from this Process Queue.

      All the items are marked as 'pending destroy' and fully removed in the next update.undefined

      Returns this

      This Process Queue object.

    • Remove all listeners, or those of the specified event.

      Parameters

      • Optionalevent: string | symbol

        The event name.

      Returns this

      this.

    • Remove the listeners of a given event.

      Parameters

      • event: string | symbol

        The event name.

      • Optionalfn: Function

        Only remove the listeners that match this function.

      • Optionalcontext: any

        Only remove the listeners that have this context.

      • Optionalonce: boolean

        Only remove one-time listeners.

      Returns this

      this.

    • The update step.

      Pre-updates every active Game Object in the list.

      Parameters

      • time: number

        The current timestamp.

      • delta: number

        The delta time elapsed since the last frame.

      Returns void

    • The Scene that owns this plugin is shutting down.

      We need to destroy all active, pending, and queued Game Objects, reset all internal properties, and stop listening to Scene events.

      Returns void

    • Update this queue. First it will process any items awaiting destruction, and remove them.

      Then it will check to see if there are any items pending insertion, and move them to an active state. Finally, it will return a list of active items for further processing.undefined

      Returns GameObject[]

      A list of active items.