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 componentconst behaviors = new Behaviors({ list: [{ name: 'some-script', options: {} }],});// Add to actoractor.setComponent(behaviors); Copy
// Create a behaviors componentconst behaviors = new Behaviors({ list: [{ name: 'some-script', options: {} }],});// Add to actoractor.setComponent(behaviors);
Optional
Static
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.
Example