Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DiscreteAction

Class that represents a discrete action that can be in one of two states, started or stopped for each user. @see ActionState

Hierarchy

  • DiscreteAction

Index

Methods

Methods

getState

isActive

  • isActive(user?: User): boolean
  • Get whether the action is active for the user with the given id.

    Parameters

    • Optional user: User

      The user to get whether the action is active for, or null if active for any user is desired..

    Returns boolean

    • True if the action is active for the user, false if it is not. In the case that no user is given, the value is true if the action is active for any user, and false if not.

on

  • Add a handler for the given action state for when it is triggered.

    Parameters

    • actionState: ActionState

      The action state that the handle should be assigned to.

    • handler: ActionHandler

      The handler to call when the action state is triggered.

    Returns this