Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Sprite2DSequencePlayer

A component that is used by the SequencePlayer system to play play back a sequence of sprites when applied to an entity that also has the Sprite2DRenderer component.

Hierarchy

Index

Constructors

constructor

  • Parameters

    • Optional sequence: Entity
    • Optional paused: boolean
    • Optional loop: LoopMode
    • Optional speed: number
    • Optional time: number

    Returns Sprite2DSequencePlayer

Properties

loop

loop: LoopMode

Sets the looping behavior of the animation. Defaults to Loop.

  • Loop: Play the sequence in a loop forever [A][B][C][A][B][C][A][B][C]...
  • Once Play the sequence once [A][B][C] then pause and set time to 0
  • PingPong: Play the sequence in a ping pong loop forever [A][B][C][B][A][B][C][B]...
  • PingPongOnce: Play the sequence once forward then back to the start [A][B][C][B][A] then pause and set time to 0
  • ClampForever: Plays back the animation once, [A][B][C]. When it reaches the end, it will keep playing the last frame and never stop playing.

paused

paused: boolean

Set to true to pause animation sequence. Set back to false to continue animation. Default false.

sequence

sequence: Entity

Sequence entity, required to have Sprite2DSequence component

speed

speed: number

Speed multiplier for playback, defaults to 1

time

time: number

Current time for playback, 0 to infinity

Static _isSharedComp

_isSharedComp: boolean

Static _size

_size: number

Static _view

_view: any

Static cid

cid: number

Static paused

Static sequence

sequence: EntityComponentFieldDesc

Static speed

Static time

Methods

Static _dtorFn

Static _fromPtr

Static _tempHeapPtr

Static _toPtr

Generated using TypeDoc