Runs the behaviors listed in the Behaviors component of each actor.
Pass your behavior classes to the engine in resources, under BehaviorSystem.systemName.
resources
BehaviorSystem.systemName
const engine = new Engine({ config, systems: [BehaviorSystem, ...gameSystems], components: [Behaviors, ...gameComponents], assets: [], resources: { [BehaviorSystem.systemName]: [...gameBehaviors], },}); Copy
const engine = new Engine({ config, systems: [BehaviorSystem, ...gameSystems], components: [Behaviors, ...gameComponents], assets: [], resources: { [BehaviorSystem.systemName]: [...gameBehaviors], },});
Behaviors
Static
The name the configuration uses for the system.
DefineSystem sets it, so a game usually does not assign it.
Runs the behaviors listed in the Behaviors component of each actor.
Pass your behavior classes to the engine in
resources, underBehaviorSystem.systemName.Example
See
Behaviors