Options
All
  • Public
  • Public/Protected
  • All
Menu

Class TweenSequence

Runs multiple tweens in sequence, one-by-one, in the order they were added.

Hierarchy

  • TweenSequence

Implements

Index

Constructors

constructor

Accessors

isFinished

  • get isFinished(): boolean
  • Returns boolean

tweenCount

  • get tweenCount(): number
  • Number of tweens remaining

    Returns number

tweens

  • get tweens(): Readonly<Tween[]>
  • Tweens remaining

    Returns Readonly<Tween[]>

Methods

add

  • add(tween: Tween): void
  • Adds a tween to the sequence. The same tween can't be added twice.

    Parameters

    • tween: Tween

      Tween to add.

    Returns void

advance

  • advance(durationToAdvance: number): number
  • Advances the first tween in the list. If it finishes and any duration is left then the next one is called with the remaining duration, untill all of the tweens finish or all the duration is used up. Finished tweens are removed from the list.

    Parameters

    • durationToAdvance: number

    Returns number

    Duration left after executing the tweens.

finish

  • finish(): void
  • Calls finish() on all the tweens, then calls the finish callback if there were any tweens in the first place

    Returns void

finishOne

  • finishOne(): void
  • Calls finish on the next tween in the list, and if it was the last one then calls the finish callback. Does nothing if there are no tweens.

    Returns void

skip

  • skip(): void
  • Calls skip() on all the tweens and does not call the finish callback.

    Returns void

skipOne

  • skipOne(callFinishCallback?: boolean): void
  • Calls skip() on the next tween and removes it and will call the finish callback depending on the argument passed.

    Parameters

    • Default value callFinishCallback: boolean = true

      Whether to call the finish callback if it's the last tween that is skipped.

    Returns void

Generated using TypeDoc