clik-engine API
    Preparing search index...

    Class ComboGraph

    Directed graph of combat moves with input requirements on edges. Works with InputBuffer for buffered input reading and CancelWindow for timing.

    Usage:

    const graph = new ComboGraph();
    graph.addEdge('idle', { to: 'attack1', input: ['attack'], priority: 1 });
    graph.addEdge('attack1', { to: 'attack2', input: ['attack'], priority: 1 });
    graph.addEdge('attack1', { to: 'special', input: ['down', 'attack'], priority: 2 });

    const next = graph.evaluate('attack1', inputBuffer, 10, cancelWindow);
    Index

    Constructors

    Methods

    • Evaluate the graph: given current state and input buffer, find the best matching edge. If cancelWindow is provided, also checks that the cancel is allowed at currentFrame.

      Parameters

      Returns string | null

      The target state name, or null if no valid transition found