动画组件

Animator

2022.3.31

yisky

Hierarchy (view full)

Constructors

Properties

_awoken: boolean = false
_enabled: boolean = false
controller: AnimatorController

Animator Controller

Animator

entity: Entity
userData: {
    [key: string]: any;
}

Component user data

Component

Accessors

  • get enabled(): boolean
  • Indicates whether the component is enabled.

    Returns boolean

    Component

  • set enabled(value): void
  • Set whether the component is enabled.

    Parameters

    • value: boolean

    Returns void

    Component

  • get scene(): Scene
  • Scene own the component

    Returns Scene

    Component

Methods

  • Protected

    Awake component callback

    Returns void

    Component

  • Protected

    Enable

    Returns void

    Animator

  • Destroy component

    Returns void

    Component

  • Clear subscribers

    Returns void

    EventDispatcher

  • Emit event

    Parameters

    • event: {
          type: string;
          [key: string]: any;
      }
      • [key: string]: any
      • type: string

    Returns void

    EventDispatcher

  • Unsubscribe a event, if the callback param is not defined, all subscribers of this type will be removed.

    Parameters

    Returns void

    EventDispatcher

  • Subscribe a event

    Parameters

    • type: string

      event type

    • callback: SubscriberCallbackFn

      callback functions

    • Optionaloptions: {
          priority?: Priority;
          target?: any;
      } = {}

      options

      • Optionalpriority?: Priority
      • Optionaltarget?: any

    Returns void

    EventDispatcher

  • Subscribe a event, just emit once

    Parameters

    Returns void

    EventDispatcher

  • Update

    Parameters

    • deltaTime: number

    Returns void

    Animator