Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TweenAwait

Calls the specific function and depending on the result it'll either finish or consume all duration

Hierarchy

  • TweenAwait

Implements

Index

Constructors

Accessors

Methods

Constructors

constructor

  • new TweenAwait(awaitFunction: function): TweenAwait
  • Parameters

    • awaitFunction: function

      Function to call to check if the tween should finish. If it returns true the tween will be finished and will take 0 duration, otherwise it'll take all the duration.

        • (): boolean
        • Returns boolean

    Returns TweenAwait

Accessors

isFinished

  • get isFinished(): boolean
  • Returns boolean

Methods

advance

  • advance(durationToAdvance: number): number
  • Calls the await function and depending on the result finishes the tween consuming 0 duration (true) or consumes all the duration (false)

    Parameters

    • durationToAdvance: number

    Returns number

    either 0 or durationToAdvance

finish

  • finish(): void
  • Will mark the tween as finished and won't call the await callback, identical to skip

    Returns void

skip

  • skip(): void
  • Will mark the tween as finished and won't call the await callback, identical to finish

    Returns void

Generated using TypeDoc