EcsPlugin class abstract
A reusable bundle of systems, resources, and event wiring for an ECS
World. Named to distinguish it from the app-level Plugin (which owns
a DI scope rather than a World). Bevy's Plugin trait.
class PhysicsPlugin extends EcsPlugin {
const PhysicsPlugin();
@override
void build(World world) {
world
..insertResource(const Gravity(9.81))
..addSystem(GravitySystem())
..addSystem(MovementSystem());
}
}
Constructors
- EcsPlugin()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
World world) → void -
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