Class DiceManager

Hierarchy

  • DiceManager

Constructors

Properties

animationManager: AnimationManager
game: Game

the BGA game class, usually it will be this

registeredDieTypes: BgaDieType[] = []
stocks: DiceStock[] = []

Methods

  • Returns if the animations are active. Animation aren't active when the window is not visible (document.visibilityState === 'hidden'), or game.instantaneousMode is true.

    Returns boolean

    if the animations are active.

  • Parameters

    • die: BgaDie

      the die informations

    Returns HTMLElement

    the HTML element of an existing die

  • Returns number

    the default perspective for all stocks.

  • Returns string

    the class to apply to selectable dice. Default 'bga-dice_selectable-die'.

  • Returns string

    the class to apply to selected dice. Default 'bga-dice_selected-die'.

  • Returns string

    the class to apply to selectable dice. Default 'bga-dice_disabled-die'.

  • Remove a die.

    Parameters

    • die: BgaDie

      the die to remove

    Returns boolean

  • Update the die informations. Used when a change visible face.

    Parameters

    • die: BgaDie

      the die informations

    • Optional updateData: boolean

    Returns void

Generated using TypeDoc