Sprint¶
Purpose¶
Applies force to the AI host during a bounded movement-state window and reports Sprinting / Idle through IMovementSource.
Key inputs / outputs¶
force: a bindableVector2force value.duration: the movement-state window; inRepeatedmode it also limits the force-application window.forceApplication:OnceorRepeated, defaulting toOnce.- Output:
Sprintingwhile active, thenIdleon completion or failure.
Success / Failure semantics¶
- Success when the configured duration completes.
- Failure when the movement source cannot move at startup or becomes unavailable while running.
Force application¶
Once: appliesForceMode2D.Forceonce when the action starts, then remains active untildurationelapses so the whole window reports asSprinting.Repeated: appliesForceMode2D.Forceon each eligible fixed update untildurationelapses.- With zero duration,
Oncestill applies one force but does not report a zero-lengthSprintingwindow;Repeatedapplies no force.
Lifecycle¶
- If the movement source cannot move when the action starts, the action fails without applying force.
- If movement becomes unavailable while running, force application stops, the action reports
Idle, and fails. - Successful completion and action destruction report
Idle. - The host must have a
Rigidbody2D, and the control target must implementIMovementSource. Force must be finite and duration must be finite and non-negative.