Base class used to represent an action

Hierarchy (View Summary)

Constructors

Properties

Accessors

Methods

Constructors

  • Create a new instance of the custom action

    Parameters

    • alias: string

      Alias used to identify this action

    • needsObject: boolean

      Set to true if this action requires another GameObject to work, otherwise false.

    Returns Action

Properties

_alias: string

Alias used to identify this action

_needsObject: boolean

Set to true if this action requires another GameObject to work, otherwise false.

Accessors

  • get alias(): string
  • Get the alias used to identify this action

    Returns string

  • get needsObject(): boolean
  • Returns true if this action requires another GameObject to work, otherwise false.

    Returns boolean

Methods

  • Execute the action

    Parameters

    • alias: string

      Alias used to identify the kind of action

    • gameObjects: GameObject[]

      Array of game objects, where the first index is a reference to the game object on which the action should be executed.

    Returns undefined | ActionResult

    Result of the action or undefined if unhandled

  • Get the name of this action

    Returns SyncOrAsync<string>