clik-engine API
    Preparing search index...

    Class AnimatorComponent

    Entity component wrapping AnimationStateMachine. Provides a sprite and animation state machine on an entity.

    Usage:

    const animator = new AnimatorComponent(sprite);
    animator.addState('idle', { animKey: 'player_idle', loop: true, priority: 0 });
    animator.addState('run', { animKey: 'player_run', loop: true, priority: 1 });
    entity.addComponent('animator', animator);
    animator.start('idle');

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    enabled: boolean = true
    entity: Entity

    Methods