Skip to main content

ActionQueue

Action Queues represent an ordered sequence of actions

Action queues are part of the [[ActionContext|Action API]] and store the list of actions to be executed for an [[Actor]].

Actors implement [[Actor.actions]] which can be manipulated by advanced users to adjust the actions currently being executed in the queue.

Index

Constructors

constructor

Methods

publicadd

  • Add an action to the sequence


    Parameters

    Returns void

publicclearActions

  • clearActions(): void
  • Removes all actions from this sequence


    Returns void

publicgetActions


  • Returns Action[]

    The total list of actions in this sequence complete or not

publichasNext

  • hasNext(): boolean

  • Returns boolean

    true if there are more actions to process in the sequence

publicisComplete

  • isComplete(): boolean

  • Returns boolean

    true if the current sequence of actions is done

publicremove

  • Remove an action by reference from the sequence


    Parameters

    Returns void

publicreset

  • reset(): void
  • Resets the sequence of actions, this is used to restart a sequence from the beginning


    Returns void

publicupdate

  • update(elapsedMs: number): void
  • Update the queue which updates actions and handles completing actions


    Parameters

    • elapsedMs: number

    Returns void