ComponentBundle class

Bundle of class based components to be added to an entity atomically.

Allows efficient spawning of entities with multiple components by reducing command queue overhead and enabling batch processing.

Constructors

ComponentBundle(ComponentsBatchList components, ComponentsBatchListExt extensionComponents)
ComponentBundle.fromExtensionList(List<(Type, Type)> extensionComponents)
Create a bundle from a list of extension components.
factory
ComponentBundle.fromLists(List<Component> components, [List<(Type, Type)> extensionComponents = const []])
Create a bundle from a list of components.
factory

Properties

components → ComponentsBatchList
final
extensionComponents → ComponentsBatchListExt
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add<T extends Component>(T component) → ComponentBundle
Add a component to the bundle.
addExtension<T extends Component, TExtension>() → ComponentBundle
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited