dacha
    Preparing search index...

    Class Animatable

    Holds the animation state machine of an actor: its states, frames and transitions. Build it in the animation editor. Animator plays it.

    Hierarchy (View Summary)

    Index
    actor?: Actor

    The actor that has this component. It is undefined until the component is added to an actor.

    duration: number

    Duration of the current state relative to the total duration of the timeline

    initialState: string

    Initial state of the animatable component

    • Returns the component of the same class on the parent actor.

      Returns Component<object> | undefined

      The component, or undefined if the actor has no parent actor or the parent has no such component.

    • Switches the animation to another state at once, without a transition.

      Parameters

      • currentState: string

        The id of the state.

      Returns void

      Error If there is no state with this id.