Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StatChangeTimerFactory

Hierarchy

  • StatChangeTimerFactory

Index

Constructors

constructor

Methods

apply

getAmount

  • getAmount(): undefined | number
  • Returns undefined | number

    The amount the stat will be changed when the change timer completes.

getCurrentTimer

  • Returns number | Reset | Clamp | Difference | Ratio

    The strategy for calculating the current change timer given the changes.

getDecayRate

  • getDecayRate(): undefined | number
  • Returns undefined | number

    The amount the change timer will be reduced by every tick.

getNextTimer

  • getNextTimer(): number
  • Returns number

    The next change timer. This value is what the changeTimer will be reset to every time it reaches 0. If the next change timer is less than or equal to 0, upon reaching 0, the change timer will be removed from the stat.

isOverridable

  • isOverridable(): boolean
  • Returns boolean

    Whether this change timer's application is overridable through the statTimerWillChange event.

setAmount

  • setAmount(amount?: number): this
  • Parameters

    • Default value amount: number = 1

      The amount the stat will be changed when the change timer completes. Defaults to 1.

    Returns this

setCurrentTimer

  • Sets the strategy for calculating the current change timer given the changes.

    Parameters

    • Default value timer: StatChangeCurrentTimerStrategy = StatChangeCurrentTimerStrategy.Difference

      A number to precisely set the current timer, or a StatChangeCurrentTimerStrategy to calculate the new value automatically. See enum for more detail.

    Returns this

setDecayRate

  • setDecayRate(rate: number): this
  • Parameters

    • rate: number

      The amount the change timer will be reduced by every tick.

    Returns this

setNextTimer

  • setNextTimer(nextTimer: number): this
  • Parameters

    • nextTimer: number

      The next change timer. This value is what the changeTimer will be reset to every time it reaches 0. If the next change timer is less than or equal to 0, upon reaching 0, the change timer will be removed from the stat.

    Returns this

setOnce

  • setOnce(): this
  • Sets the next change timer to -1, which will cause the change timer to be removed from the stat when the timer reaches 0.

    Returns this

setOverridable

  • setOverridable(overridable?: boolean): this
  • Parameters

    • Default value overridable: boolean = true

      Whether this change timer's application is overridable through the statTimerWillChange event.

    Returns this

Generated using TypeDoc