nape-js API
    Preparing search index...

    Class OptionType

    Composite callback option type — combines include and exclude CbType lists to express complex listener filter conditions.

    An interaction satisfies an OptionType when the interactor has at least one of the included types and none of the excluded types.

    // Listen only for bodies that are "enemy" but not "boss"
    const filter = new OptionType(enemyType).excluding(bossType);
    const listener = new BodyListener(CbEvent.WAKE, filter, (cb) => { ... });

    Converted from nape-compiled.js lines 2647–2698.

    Index

    Constructors

    Accessors

    Methods