BParallel class

Runs all its children in parallel, every frame.

The parallel is finished (returns true) only when all children are finished. Useful to combine independent actions, e.g. move + attack + play an animation at the same time.

BParallel(
  behaviors: [
    BMoveToComponent(target: player),
    BAction(action: (dt, comp, game) => attack.melee(damage: 10, size: Vector2.all(32))),
  ],
)
Inheritance

Constructors

BParallel({required List<Behavior> behaviors, dynamic id})

Properties

behaviors List<Behavior>
final
hashCode int
The hash code for this object.
no setterinherited
id → dynamic
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
process(double dt, GameComponent comp, BonfireGameInterface game) bool
Processes this behavior for the current frame.
override
toString() String
A string representation of this object.
inherited

Operators

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