Options
All
  • Public
  • Public/Protected
  • All
Menu

Data for an entity's animation.

Hierarchy

  • Component
    • Animation

Indexable

[name: string]: any

Data for an entity's animation.

Index

Properties

entity

entity: Entity

frame

frame: number

The current frame number of the animation.

frames

frames: ITexture[]

The texture objects to use in each frame of the animation.

id

id: string

loop

loop: boolean

Whether to repeat the animation indefinitely.

paused

paused: boolean

Whether the animation is paused.

tick

tick: number

The current tick number of the animation.

ticksPerFrame

ticksPerFrame: number

The animation speed in ticks per frame.

Static key

key: string = "animation"

Static registered

registered: Boolean

Static serialize

serialize: Boolean

Static serializeFields

serializeFields: string[]

Static skipSerializeFields

skipSerializeFields: string[]

Static subbed

subbed: Boolean

Static typeName

typeName: string = "Animation"

Accessors

key

  • set key(arg: string): any
  • Parameters

    • arg: string

    Returns any

type

  • get type(): string
  • Returns string

Methods

destroy

  • destroy(): void
  • Returns void

getObject

  • getObject(withIds?: undefined | false | true): IComponentObject
  • Parameters

    • Optional withIds: undefined | false | true

    Returns IComponentObject

init

  • init(initial: any): void
  • Parameters

    • initial: any

    Returns void

postDestroy

  • postDestroy(): void
  • Returns void

preDestroy

  • preDestroy(): void
  • Returns void

preInit

  • preInit(initial: any): any
  • Parameters

    • initial: any

    Returns any

update

  • update(values?: IComponentUpdate): void
  • Parameters

    • Optional values: IComponentUpdate

    Returns void

Object literals

Static properties

properties: object

frame

frame: number = 0

frames

frames: never[] = []

loop

loop: boolean = false

paused

paused: boolean = false

tick

tick: number = 0

ticksPerFrame

ticksPerFrame: number = 1

Generated using TypeDoc