clik-engine API
    Preparing search index...

    Class AIAnimationAdapter

    Maps AI actions/states to animation states. Bridges behavior trees, GOAP plans, or utility AI with the animation system.

    Usage:

    const adapter = new AIAnimationAdapter(animStateMachine);
    adapter.map('patrol', 'walk');
    adapter.map('attack', 'attack');
    adapter.map('idle', 'idle');

    // When AI decides an action:
    adapter.setAIState('patrol'); // plays 'walk' animation
    Index

    Constructors

    Methods

    • Set a callback that maps velocity to animation state. Called by updateFromVelocity() to drive blend-tree-like behavior.

      Parameters

      • callback: (vx: number, vy: number) => string | null

      Returns this