dacha
    Preparing search index...

    Class Behaviors

    Behaviors component for managing a list of behaviors.

    Behavior is a script that allows to add custom game logic to an actor, such as movement, AI or any other custom logic.

    // Create a behaviors component
    const behaviors = new Behaviors({
    list: [{ name: 'some-script', options: {} }],
    });

    // Add to actor
    actor.setComponent(behaviors);

    Hierarchy (View Summary)

    Index
    actor?: Actor
    list: BehaviorConfig[]
    componentName: string