VelocityIntegrationSystem class
Advances Transform2D by Velocity scaled to real time.
Runs after CollisionResolutionSystem has clamped Velocity for
the current step so blocked axes stay pinned to zero.
The dt source depends on PhysicsMode:
- PhysicsMode.variable reads
WallTime.delta. Schedule inSchedules.update. - PhysicsMode.fixed reads
FixedTimestep.stepSeconds. Schedule inSchedules.fixedUpdatealongside the paired resolution system.
Velocity is interpreted as pixels per 60 Hz frame, so
Velocity(0, 4) produces 240 px/s in either mode.
Constructors
- VelocityIntegrationSystem()
-
Creates a variable-timestep integration system.
const
- VelocityIntegrationSystem.fixed()
-
Creates a fixed-timestep integration system.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- meta → SystemMeta
-
Metadata describing this system's data access patterns.
no setter
- mode → PhysicsMode
-
Which clock this system reads.
final
- runCondition → RunCondition?
-
Optional condition that determines whether this system should run.
no setter
- 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
-
run(
World world) → Future< void> - Runs the system logic.
-
shouldRun(
World world) → bool - Returns true if this system should run, based on its runCondition.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- systemName → const String
-
The
SystemMeta.nameof VelocityIntegrationSystem. Games that order their own systems relative to this one use it inbefore:/after:.